
Wed, 02/03/2010 - 17:11
Forums:
Hi,
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
Til
Wed, 02/03/2010 - 17:49
I found a solutution using TopoDS and TopExp_Explorer O_o
Code:
BRepBuilderAPI_MakeWire wireMaker1;
for(TopExp_Explorer edger(aFace, TopAbs_EDGE);edger.More(); edger.Next())
{
wireMaker1.Add(TopoDS::Edge(edger.Current()));
}
wireMaker1.Build();
TopoDS_Wire aWire1 = wireMaker1.Wire();
Wed, 02/03/2010 - 17:58
Hi Tilman Leune,
try to search about BRepTools::OuterWire.
I hope it will help you.
Regards,
Fri, 02/05/2010 - 09:56
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.