1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DimensionPattern script

Discussion in 'Alibre Script' started by Jholt, Jul 5, 2020.

  1. Jholt

    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.
    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.


    Attached Files:

    Last edited: Jul 5, 2020

Share This Page