What's new

pattern features with variable geometry

Jholt

Member
I am making a test part to check clearances. It represents a series of rollers that gradually increase in length.
I have tried to model this by making reference planes and axis at the angle I need, and building the sketch for the prototype roller using constraints to the reference axis. However when i pattern the feature, all the rollers are the same size.

If I edit the sketch, I can drag the roller along the Y axis and it re-sizes appropriately. I have included the part file and the global parameters file that drives it.

Does anyone know how to get the patterned features to increase in length?

Thanks,
Jenn
 

Attachments

  • rollers.AD_PRT
    2.1 MB · Views: 2
  • Treadmill.AD_GLP
    12 KB · Views: 2
Jenn -- Assuming that the rollers.AD_PRT is based on variables defined by Treadmill.AD_GLP making a Package of the Part file is the better way to "transport: it. -- Lew
 

bigseb

Alibre Super User
I am really new to Alibre, sorry. I'll look up how to do that.

Jenn
To expand on what Lew says: If you go to File --> Package --> Create Alibre will save your design as a package that will contain all required files and maintain the links to one another. In your case the part file and the parameters file will maintain association.
 
I am really new to Alibre, sorry. I'll look up how to do that.
Hi Jenn -- Assuming that you have set Equation Editor variables to be defined by GLP variables, use the File->Package->Create command set yo create an "AD_PKG" file from your Part (and the Package will automagically include the GLP file). -- Lew
 

Jholt

Member
Hi Jenn -- Assuming that you have set Equation Editor variables to be defined by GLP variables, use the File->Package->Create command set yo create an "AD_PKG" file from your Part (and the Package will automagically include the GLP file). -- Lew

Took me a while to find the free time, but here is the package.
 

Attachments

  • rollers.AD_PKG
    340.1 KB · Views: 6

Jholt

Member
the programmer in me though up another solution. If there was a macro or special variable that evaluated to "pattern instance number" that could be used in an equation driving a dimension in a sketch, this could be used to get what I want. I can calculate the lengths I need for each instance fairly easily, but I don't know how I would make them vary with pattern instance number.
 

DavidJ

Administrator
Staff member
Try looking at configurations - each configuration can have different values driving the sketch. In a pattern within an assembly, you can change the configuration of each part instance in the pattern.
 

simonb65

Alibre Super User
I need for each instance fairly easily, but I don't know how I would make them vary with pattern instance number.
I don't think the global parameters or equation editor can index individual (and dynamic) instances of pattern items, but it's doable using Alibre Scripting, if your into programming, as you can reference each instance, iterate through each instance an and set the extrusion lengths for each roller.
 

bigseb

Alibre Super User
I doubt you can do this using EEs/GPs. Possibly a script can do it. I don't use scripts but possibly someone else can chip in.
 
And attached is the way I would create it (except that I would have created the Roller as a SubAssembly). -- Lew
 

Attachments

  • Treadmill Roller Assy 20200628A.AD_PKG
    73.4 KB · Views: 4

simonb65

Alibre Super User
It represents a series of rollers that gradually increase in length.
Lew, I think her original requirement was for the rollers to progressively increase their length, so a simple feature pattern is sadly not suffice, in this instance!
 

idslk

Alibre Super User
Hello Jenn,

do you need the rolls as single parts of different length in an assembly or do you need one part with the rolls as "bodies" in one part?

Regards
Stefan
 

Jholt

Member
Hello Jenn,

do you need the rolls as single parts of different length in an assembly or do you need one part with the rolls as "bodies" in one part?

Regards
Stefan
Stefan,
Either would work for my application of clearance checking. For manufacture, each roller will be cut to length from existing tube, so all that is needed is a list of lengths, which is easy to produce.

If they are implemented as multiple parts in an assembly, I would need some way of making the number of rollers in the assembly dynamic as well. I am currently looking into scripting, since I have a lot of experience with python. Does anyone know where to find detailed API documentation? So far all I have been able to find is the exercise manual.

I have also seen a couple of posts mentioning a C#/C++ API. Is this used to write add-ons? maybe I could write an add-on to do "dimension -based" patterning. basically, duplicate a feature in a loop with the driving dimensions in each loop set by some function of instance number.
 
Last edited:

DavidJ

Administrator
Staff member
Script Ribbon has links to the Script Reference manual (a CHM file), and to example scripts on the Alibre support web site.

For details of addons - see the Add-on Development Forum (at bottom of Forum Index page).
 

simonb65

Alibre Super User
I have also seen a couple of posts mentioning a C#/C++ API. Is this used to write add-ons? maybe I could write an add-on to do "dimension -based" patterning. basically, duplicate a feature in a loop with the driving dimensions in each loop set by some function of instance number.
There are 3 ways to programatically drive/automate Alibre:

1) Using then built-in Alibre Script which is Python based.
2) Using C#/C++ in an external standalone application that hooks into or creates a running instance of Alibre Design.
3) Using C++ to create an integrated Add-On that is loaded when Alibre Starts and appears in the Add-On menu.

The simplest to get going is 1 and the python wraps the internal Alibre functions in a object oriented hierarchy that is simple to use and well documented.
2 is easy if you are familiar with c#/c++ and dealing with pointer casting! The documentation is lacking examples, but it shows you how to get started. You need to figure how some stuff works by trawling through the Visual Studio object browser.
3 is pure c++ and needs much more work to get going.

2 and 3 have examples in the Add-On section of the forum.

As a programmer, most of my automation of AD is done using 2. If you need any help, just ask.
 

Jholt

Member
Script Ribbon has links to the Script Reference manual (a CHM file), and to example scripts on the Alibre support web site.

For details of addons - see the Add-on Development Forum (at bottom of Forum Index page).
Thanks, the reference is exactly what I need. I don't know how the search on the Alibre website works, but it would be nice if searches for "script API" would point the user to the ribbon. I would never have guessed to look there. I didn't even have Alibre open when I was looking for documentation by searching the web.
 

idslk

Alibre Super User
Hello Jenn,

here is something to play with. I've been a little lazy with the math...It's only to see the that the length are increasing...
upload_2020-7-4_20-10-46.png

Regards
Stefan
 

Attachments

  • Forum_rolls2.py
    3.6 KB · Views: 8

Jholt

Member
Hello Jenn,

here is something to play with. I've been a little lazy with the math...It's only to see the that the length are increasing...
View attachment 31076

Regards
Stefan

Thanks Stefan,
This looks good. I'll have to take some time to look it over and learn from it. As you may have guessed from my other thread in Scripting, I'm going to try to write a script for (mostly)general dimension driven feature patterning. If I get something that works, I'll post it so others can use it too.

Jenn
 
Top