DiscussionsIssue archiveOther usage issues

Archived discussion

Extracting Wire from a given Face

Other usage issuesWed, 02/03/2010 - 17:113 replies

Browse this forum
QuestionAuthor

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

Discussion

3 archived replies

Posts are displayed in their archived order.

01Author

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();

02Commenter-1

Hi Author,

try to search about BRepTools::OuterWire.

I hope it will help you.
Regards,

03Author

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.