What's new

DimensionPattern script

Jholt

Member
Hi All,

I am writing a script to duplicate some of the patterning functionality I was used to in PTC/Creo. The script is pretty basic right now, but I hope that it will grow with time. I have a couple of other threads here and here, but I thought I would make a thread specifically for the script and its development.

The problem I'm trying to solve is this:
If you have a feature whose sketch depends on geometric constraints, the sketch does not update in pattern members as you might expect. To demonstrate, I have made a simple test part with a circular boss. The sketched circle is constrained by:
1. Center coincident with Y-Axis.
2. Center a dimensioned distance from the X-Axis.
3. Circle is tangent to a third axis which is at a 10-degree angle to the Y-axis.

If you change the distance from the X-Axis in the sketch, the diameter of the circle changes. however if you pattern the resulting boss using the Linear pattern tool, all instances have the same diameter as the pattern leader.

My script makes the pattern by changing the initial sketch to represent the dimension change for each instance, that way the pattern instances have varying diameters.
DimensionPatternTest.png
The script is currently in super-early alpha phase. and only works with extruded bosses that have an "extrude to depth" end condition. To try it out. open the test part and run the script. The script will prompt you to choose the feature you want to pattern, the dimension which drives the pattern, the number of instances and the dimension step.

Hopefully others can get some use out of it. Check back for improvements, as I plan to make it a lot better in the future.

Jenn
 

Attachments

  • DimensionPattern.py
    6 KB · Views: 8
  • DimensionPatternTest.AD_PRT
    252.5 KB · Views: 7
Last edited:
Top