Archived issue #0023011
ShapeAnalysis_Wire returns an incorrect CheckOrder
Description
Create a Solid Cube and do some Analysis on it. So, I go through its faces and foreach face through all its wires (it is 1 in this case) and foreach wire I check the order.
To my utter shock the method
ShapeAnalysis_Wire::CheckOrder() returns true -- which basically means that the wire is not ordered correctly.
Either the solid cube is created wrong or the CheckOrder API is returing a wrong result or I am doing something utterly silly.
----------- THE CODE ---------
// create a solid bounding box
BRepPrimAPI_MakeBox outerBox(gp_Pnt(-10000, -10000, -10000), gp_Pnt(10000, 10000, 10000));
for (TopExp_Explorer faceIter(outerBox.Solid(), TopAbs_FACE);
faceIter.More();
faceIter.Next())
{
const TopoDS_Face& aFace = TopoDS::Face(faceIter.Current());
for (TopExp_Explorer wireIter(aFace, TopAbs_WIRE);
wireIter.More();
wireIter.Next())
{
const TopoDS_Wire& aWire = TopoDS::Wire(wireIter.Current());
double precision = 1e-04;
ShapeAnalysis_Wire saw(aWire, aFace, precision);
if (saw.CheckOrder())
{
throw gcnew Exception("Wire not ordered properly");
}
}
}
To my utter shock the method
ShapeAnalysis_Wire::CheckOrder() returns true -- which basically means that the wire is not ordered correctly.
Either the solid cube is created wrong or the CheckOrder API is returing a wrong result or I am doing something utterly silly.
----------- THE CODE ---------
// create a solid bounding box
BRepPrimAPI_MakeBox outerBox(gp_Pnt(-10000, -10000, -10000), gp_Pnt(10000, 10000, 10000));
for (TopExp_Explorer faceIter(outerBox.Solid(), TopAbs_FACE);
faceIter.More();
faceIter.Next())
{
const TopoDS_Face& aFace = TopoDS::Face(faceIter.Current());
for (TopExp_Explorer wireIter(aFace, TopAbs_WIRE);
wireIter.More();
wireIter.Next())
{
const TopoDS_Wire& aWire = TopoDS::Wire(wireIter.Current());
double precision = 1e-04;
ShapeAnalysis_Wire saw(aWire, aFace, precision);
if (saw.CheckOrder())
{
throw gcnew Exception("Wire not ordered properly");
}
}
}
Steps to reproduce
Create a small console app with the following code
// create a solid bounding box
BRepPrimAPI_MakeBox outerBox(gp_Pnt(-10000, -10000, -10000), gp_Pnt(10000, 10000, 10000));
for (TopExp_Explorer faceIter(outerBox.Solid(), TopAbs_FACE);
faceIter.More();
faceIter.Next())
{
const TopoDS_Face& aFace = TopoDS::Face(faceIter.Current());
for (TopExp_Explorer wireIter(aFace, TopAbs_WIRE);
wireIter.More();
wireIter.Next())
{
const TopoDS_Wire& aWire = TopoDS::Wire(wireIter.Current());
double precision = 1e-04;
ShapeAnalysis_Wire saw(aWire, aFace, precision);
if (saw.CheckOrder())
{
throw gcnew Exception("Wire not ordered properly");
}
}
}
// create a solid bounding box
BRepPrimAPI_MakeBox outerBox(gp_Pnt(-10000, -10000, -10000), gp_Pnt(10000, 10000, 10000));
for (TopExp_Explorer faceIter(outerBox.Solid(), TopAbs_FACE);
faceIter.More();
faceIter.Next())
{
const TopoDS_Face& aFace = TopoDS::Face(faceIter.Current());
for (TopExp_Explorer wireIter(aFace, TopAbs_WIRE);
wireIter.More();
wireIter.Next())
{
const TopoDS_Wire& aWire = TopoDS::Wire(wireIter.Current());
double precision = 1e-04;
ShapeAnalysis_Wire saw(aWire, aFace, precision);
if (saw.CheckOrder())
{
throw gcnew Exception("Wire not ordered properly");
}
}
}
Public activity
1 archived note
Participants are labeled by their role within this record.
Dear GKA,
could you put your opinion about it.
could you put your opinion about it.