Harold Black

Need help debugging issues with creating contrained sketch segments

Discussion created by Harold Black on Feb 13, 2020
Latest reply on Feb 20, 2020 by Harold Black

I'm creating a macro that will create a pattern that is driven by two bounding features. The part would have an extrusion feature with its direction Up To Vertex.

 

1)   Select a control path. This path is the upper bound of the feature direction axis.

2)   Select number of instances that you want total.

3)   Select the feature that you want to replicate. Upon selecting the feature, the macro will retrieve the line segment for the direction and the line segment for the normal on the surface. These will be used for creating the library feature and for inserting the library feature. Also, the lower bounding feature (terminating feature) is found from the selected feature to replicate.

 

4)   *PROBLEMS*

After clicking the check mark, the macro generates the direction and normal line segments for use for the library feature placement (which I have deactivated for now). For each direction line segment, the macro places one of the endpoints correctly on the upper curve. However, for the other endpoint the macro will 

 

1.   not place the endpoint on the terminating feature if the terminating feature is a face of a feature or a surface

Run macro on parts "term surface.SLDPRT" and "term partface.SLDPRT". Run with pattern instances = 7

 

2. place the endpoint on the terminating feature if the terminating feature is an edge or sketch but the sketch is over defined because there is a conflict between the perpendicular constraint of the direction line and the coincident constraint of the endpoint on the terminating feature.

Run macro on parts "term edge.SLDPRT" and "term sketch.SLDPRT". Run with pattern instances = 7

 

To get an idea of what the end result should look like, run "term plane.SLDPRT"

You can run the macro called "main". This will bring up the userform so you can make selections.

 

Attachments

Outcomes