Connectivity of the edges in sequence?

Hi,

 

Consider the following piece of code. 

 

TopExp_Explorer aEdgeExp (aFace, TopAbs_EDGE);

for(; aEdgeExp.More(); aEdgeExp.Next())

{

const TopoDS_Edge& aEdge = TopoDS::Edge(aEdgeExp.Current());

}

 

My question is, using TopExplorer, what edges we get are sequentially connected to each other or it returns list of random edges?

 

Thanks

Kirill Gavrilov's picture

TopExp_Explorer iterates through sub-shapes exactly in the order as they have been put into shape during construction.
Edges may be put in connected order or not - this is not required by valid topology.

ShapeExtend_WireData can be used for exploring Wires as ordered list of Edges.

Rakesh Patil's picture

Hi,

ShapeExtend_WireData will exist all the time? Or it depends on how the shape is constructed? How do I get ShapeExtend_WireData from a face?

Thanks

Guido van Hilst not specified's picture

Hi Rakesh,

To explore edges of a wire in sequence use: BRepTools_WireExplorer

https://www.opencascade.com/doc/occt-7.0.0/refman/html/class_b_rep_tools...

To see opencasde code examples see: OCCExplorer

Best regards,

Guido