Std::Map of TopoDS_Shape

Hi All,

I got a TopoDS_Shape (main_shape) from BRepTools::Read. Then I created a std map in this way
map
and explored main_shape in TopAbs_EDGE and stored explorer.Current() (const TopoDS_Shape&) shapes into that map.
My question is: When I modify a shape in the map, main_shape is updated?

Kind Regards

Paul Jimenez's picture

It depends on the modification. As long as the Edge continue being the Same, the modification should be reflected in the main shape. Just be sure to Free the Edge before modifying it to avoid an exception.

It is also worth noting that certain modifications may require you to update the Edge, the Wire and the Face (I am not sure if it's really necessary to update Shells, Solids and so on). Keep in mind that if you change an Edge by replacing a Vertex, that Vertex is most likely shared by at least another Edge which you should also ensure gets such replacement.