Hi Steven,
the answer is quite simple - BRepBuilderAPI_MakeWire never gives an result with this example. After calling the Build-function of the BRepBuilderAPI_MakeWire object - the return value of IsDone is never trough (it seems to cycle infinitly). Moreover BRepBuilderAPI_MakeWire made problems in some other special cases.
Any ideas what causing the trouble with such an easy wire???
- Stefan
Here the code so that you could try yourself:
BRepBuilderAPI_MakePolygon lMakePolygonOne,lMakePolygonTwo;
lMakePolygonOne.Add(gp_Pnt(+15, +5,0));
lMakePolygonOne.Add(gp_Pnt(+15, -5,0));
lMakePolygonOne.Add(gp_Pnt(+ 5, -5,0));
lMakePolygonOne.Add(gp_Pnt(+ 5,-15,0));
lMakePolygonOne.Add(gp_Pnt(- 5,-15,0));
lMakePolygonOne.Add(gp_Pnt(- 5,- 5,0));
lMakePolygonOne.Add(gp_Pnt(-15,- 5,0));
lMakePolygonOne.Add(gp_Pnt(-15,+ 5,0));
lMakePolygonOne.Add(gp_Pnt(+15,+ 5,0));
lMakePolygonOne.Build();
while(!lMakePolygonOne.IsDone()){};
lMakePolygonOne.Check();
lMakePolygonTwo.Add(gp_Pnt(+13, +3,0));
lMakePolygonTwo.Add(gp_Pnt(+13, -3,0));
lMakePolygonTwo.Add(gp_Pnt(+ 3, -3,0));
lMakePolygonTwo.Add(gp_Pnt(+ 3,-13,0));
lMakePolygonTwo.Add(gp_Pnt(- 3,-13,0));
lMakePolygonTwo.Add(gp_Pnt(- 3,- 3,0));
lMakePolygonTwo.Add(gp_Pnt(-13,- 3,0));
lMakePolygonTwo.Add(gp_Pnt(-13,+ 3,0));
lMakePolygonTwo.Add(gp_Pnt(+13,+ 3,0));
lMakePolygonTwo.Build();
while(!lMakePolygonTwo.IsDone()){};
lMakePolygonTwo.Check();
BRepBuilderAPI_MakeWire lMakeWire;
lMakeWire.Add(lMakePolygonOne.Wire());
lMakeWire.Add(lMakePolygonTwo.Wire());
lMakeWire.Build();
while (!lMakeWire.IsDone()){};
lMakeWire.Check(); -> he never get here
lResult = BRepBuilderAPI_MakeFace(lMakeWire.Wire()).Face();