
Mon, 12/26/2011 - 19:04
Forums:
Hello, I have a cluster of TopoDS_Edge and I want to build the face limited by the edges that contain a point (cursor position). Has OCC a double connected edge list structure to do that?
Thanks
Hello, I have a cluster of TopoDS_Edge and I want to build the face limited by the edges that contain a point (cursor position). Has OCC a double connected edge list structure to do that?
Thanks
Tue, 12/27/2011 - 11:36
Dear Gustavo,
OCCT supports single-linked list model.
Regards
Tue, 12/27/2011 - 16:45
Thanks by your answer.
Is there any way to find all possible faces inside a group of edges using OCC?
Tue, 12/27/2011 - 16:55
Yep, use the TopExplorer class...
Tue, 12/27/2011 - 17:00
You might want to check out the TopExp::MapShapesAndAncestors function. This can create a map with edges as keys. The values are lists of faces that contain the corresponding edge.
Tue, 12/27/2011 - 16:57
Dear Gustavo,
In fact what you need is back reference.
Unfortunately OCCT data structures use another approach of references: from top to down.
See chapter "5. 3. 1 The TopoDS_Shape class" of "Modeling Data User's Guide".
Each father knows its children. So, you can iterate faces and find all dependencies you need.
Regards
Tue, 12/27/2011 - 17:58
Thanks by your fast answer, I read the chapter that Forum supervisor suggest and I studied TopExp::MapShapesAndAncestors but I don't find the solution.
I believe that I did not explain my problem: I have a group of edges in a list, they do not share vertex, however some vertex have the same position (with Precision::Confusion()). I need to build the faces forms by that edges. Please see the attachment images.
Thanks in advance.
Wed, 12/28/2011 - 10:03
Dear Gustavo,
You can find some useful information at the chapters "3. 2. 3 Making Vertices, Edges and Faces" & "3. 2. 4 Making Wires and Shells" of the "Modeling Algorithms User's Guide".
Regards