Why can I not convert linear Edges to Lines?

By Augusto Goncalves

Why can I not convert linear Edges to Lines? Perhaps the name is a bit misleading, but Line in Inventor API represents a straight line with infinite length. It only has a ‘RootPoint’ and a ‘Direction’. In most scenarios, the LineSegment object can do the trick.

Dim oDoc As PartDocument

oDoc = m_inventorApplication.ActiveDocument

Dim oEdge As Edge

oEdge = oDoc.ComponentDefinition.SurfaceBodies(1).Faces(1).Edges(1)

Dim oLineSeg As LineSegment

If TypeOf oEdge.Geometry Is LineSegment Then

  oLineSeg = oEdge.Geometry

End If


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading