1

I am new to catia and vba programming.

I tried to get start end endpoints from edges, to calculate interception points.

Its easy for RectilinearTriDimFeatEdge it provides a GetOrigin and GetDirection method where endpoint can be calculated by origin + length * direction. But for other types like BiDimFeatEdge I dont even get the origin point.

Is there a way to get start- and endpoints from every type of edges? Thanks

al-eax
  • 712
  • 5
  • 13

1 Answers1

2

for open curves, you can simply put the point on each side of the curve with function like this, where iCurve is your input, and iBeginEnd is switch from which side you want it.

Private Function endPoint(iCurve As Reference, Optional iBeginEnd As Boolean = False) As HybridShapePointOnCurve
    Set endPoint = CATIA.ActiveDocument.Part.HybridShapeFactory.AddNewPointOnCurveFromDistance(iCurve, 0#, iBeginEnd)
End Function

or you can use extremum in desired direction

this wont work of course for closed curves as they don't have start and end points, but if you need solution for those, ask..

if you simply wants to get lengt of an object then there is simpler measuring method.

tsolina
  • 141
  • 15