Add back reference in TopoDS_Shape

eryar's picture

Dear OCCT Team,

I find the Note in the Modeling Data document Page 31:
that this data structure does not contain any back references. All references go from more complex underlying shapes to less complex ones.

For example, If I have a vertex and want to know which Edge contains it, I can use
TopExp::MapShapesAndAncestors() to find it.

If there is back reference in the TopoDS_Shape, then I access the parent shape (here is the edge) more convenient and straightforward.

kgv's picture

Re: Add back reference in TopoDS_Shape

If there is back reference in the TopoDS_Shape, then I access the parent shape (here is the edge) more convenient and straightforward.

Not single shape, but shapes. Most likely many-many shapes...

From my point of view, back references just do not lie onto existing TopoDS_Shape design. Introducing them would be not only painful, but also useless and meaningless in real scenarios.

www.opencascade.com

Copyright 2011-2017
OPEN CASCADE SAS
Contact us