Suppose I have a close wire, that is compose of 3 edges. All edges are connectibles and the wire is looking good at the screen.
If you look at the following code, can somebody can explain why the fisrt current edge from Wire1 is partner of EdgeA and the the second current edge of Wire1 is not partner of EdgeB (the third current is not partner with EdgeC) ?
TopExp_Explorer Explo;
Explo.Init(Wire1,TopAbs_EDGE);
while (Explo.More())
{
TopoDS_Shape EdgeWire= Explo.Current();
if ( EdgeWire.IsPartner( EdgeA) ) cout
if ( EdgeWire.IsPartner(EdgeB ) ) cout
if ( EdgeWire.IsPartner(EdgeC) ) cout
Explo.Next();
}
Thanks you for any answer...
Genevieve
Discussion
2 archived replies
Posts are displayed in their archived order.
01Commenter-1
I think it is possible that the sequence you get from iteration by TopExp_Explorer is different from the sequence you added them! This is very possible, e.g. the data store in TopoDS_TWire is using hashing table.
So in your code, EdgeA may the first one got from Explorer, but EdgeB becames the third element, I think.
02Commenter-2
Hi Genevieve,
you might want to try BRepTools_WireExplorer instead of TopExp_Explorer.