For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

BRepBuilderAPI_MakeWire::Add(TopoDS_Wire) Bug?

Torsten Sadowski's picture
Forums: 

Hi,

if a wire is added in MakeWire all edges of the wire are added in sequence. I the last edge is the one connecting to the wire only this last edge is added because all others fail beforehand.

I would suggest something like this:

Standard_Boolean isd = true;
TopTools_MapOfShape moe;
TopExp_Explorer ex(W,TopAbs_EDGE);
while (ex.More()) {
moe.Add(ex.Current());
ex.Next();
}
while (isd && moe.Extent())
{
TopTools_MapIteratorOfMapOfShape mi(moe);
for (;mi.More(); mi.Next())
{
Add(TopoDS::Edge(mi.Key()));
isd = IsDone();
if (isd)
{
moe.Remove(mi.Key());
break;
}
}
}

This tries to add edges until no further edges succeed and it at least works for me.

Torsten

Hennig's picture

Thanks Torsten, this works quite well.

Dont know why it is not integrated in the general BRepBuilderAPI_MakeWire or ShapeAnalysis_FreeBounds::ConnectWiresToWires().... because there it doesnt work to..???

greetings