
Thu, 06/03/2010 - 10:20
Forums:
I have ad IGES file that contains arcs and lines.
Each element is connected, at least to another one... the result is a kind of path made by these elements.
I tried to import these elements, and I got elements of type TopoDS_Edge.
Now, what's the simplest way to order these elements?
Thank's in andvance.
Thu, 06/03/2010 - 14:36
Hi Cristian,
If you need the underlaying geometry, you could use BRepAdaptor_Curve to see if your edge is an arc, circle, line etc. Maybe you can use ShapeAnalysis_FreeBounds::ConnectEdgesToWires to connect them to one wire, never used it myself though.
Kind Regards,
Arjan
Thu, 06/03/2010 - 17:05
With the BRepAdaptor_Curve I can retrieve points of the underlying geometry? For example,
if my edge is a line, I can retrieve start and end point?
I try to explain better.
I would to retrieve geometry of each edge and, respectively, IGESGeom_CircularArc for arcs and IGESGeom_Line for lines. Once I have these structures, I can evaluate start and end point of each geometry and sort the whole structure.
I can do that?
Thu, 06/03/2010 - 23:16
Yes you can,
pseudo code
BRepAdaptor_Curve Adaptor;
foreach edge in edges
Adaptor.Initialize(yourEdge);
GeomAbs_CurveType curveType = Adaptor.GetType();
switch(curveType)
case line : gp_Lin = Adaptor.Line();
case circle : gp_Circ = Adaptor.Circle();
look in the BRepAdaptor_Curve documentation for details
Regards Arjan
Fri, 06/04/2010 - 12:10
Hi Arjan, thank you for your answers!
That was exactly what I need.
Regards, Cristian