OuterWire() : BUG?

I can not get the right result using ShapeAnalysis::OuterWire() or BrepTools::OuterWire(). Do you meet this situation?

Sun

Sharad Verma's picture

Yes, just now I met a situation where BRepTools::OuterWire is having different TShape as exploring face using TopExp_Explorer.

Is there any otherway of finding Outerwire and Innerhole of a Shape?

Cauchy Ding's picture

Hi Sharad,

That's a bug caused by sampling ratio.
In BRepTools.cxx void BRepTools::AddUVBounds(const TopoDS_Face& F,
const TopoDS_Edge& E,
Bnd_Box2d& B)
you can manually change nbp to 200
and set
Standard_Real u0,u1,v0,v1;
Baux.Get(u0,v0,u1,v1);
/* add following codes for face having big inner wire*/
if(du>(u1-u0)/1000.0)
du = (u1-u0)/1000.0;
if(dv>(v1-v0)/1000.0)
dv = (v1-v0)/1000.0;
du*=1.5;
dv*=1.5;

Ding