Guarentee getting the same edge

Need help, or want to share a macro? Post here!
silicontrip
Posts: 2
Joined: Tue Feb 14, 2017 6:42 am

Guarentee getting the same edge

Postby silicontrip » Mon Mar 13, 2017 11:55 pm

I'm not sure what to search for to resolve this problem, so I apologise if this has been answered before.

I have a script which gets dimensions for later parts based on edges from earlier parts.

Code: Select all

j1 = shoulder.InnerRear_common.Shape.Edges[23]
j2 = shoulder.LowerFront_common.Shape.Edges[0]
j1.reverse()

shoulder.recompute()
shoulder.addObject('Part::Feature', 'LeftJoin').Shape=Part.makeRuledSurface(j1,j2)


but on some occasions the edges are in a different order, so Edge[0] or Edge[23] are not the ones I expect.
How do I ensure that I always get the same edge?

Thanks
Mark