Extracting Wire from a given Face


I would like to extract the outer wire of a planar face. I looked at TopExp_Explorer but that does not retreive wires. My next idea, TopoDS::Wire expects a TopoDS_Shape as a Parameter, so that one is not viable, either.

I think i need a nudge in the right direction...

thank you

Tilman Leune's picture

I found a solutution using TopoDS and TopExp_Explorer O_o


BRepBuilderAPI_MakeWire wireMaker1;
for(TopExp_Explorer edger(aFace, TopAbs_EDGE);edger.More(); edger.Next())
TopoDS_Wire aWire1 = wireMaker1.Wire();

tmacedo29's picture

Hi Tilman Leune,

try to search about BRepTools::OuterWire.

I hope it will help you.

Tilman Leune's picture

Thanks a lot!

Not only is my codes reduced from 7 lines to 2,

it also is faster by a power of 10: 0.02 ms with my approach and 0.002 ms using the Outerwire function.