
Thu, 06/19/2008 - 19:33
Hi,
I need to perform shape healing after iges import.
By now my healing procedure is as follow:
TopoDS_Shape Modeller::FixShape(TopoDS_Shape shape)
{
TopoDS_Shape rShape=shape;
BRepCheck_Analyzer *checker=new BRepCheck_Analyzer(rShape,Standard_True);
if (!checker->IsValid())
{
Handle(ShapeFix_Shape) sfs=new ShapeFix_Shape();
sfs->Init(rShape);
double tollerance=0.001;
sfs->SetPrecision(tollerance);
sfs->Perform();
rShape=sfs->Shape();
sfs=NULL;
}
Handle(ShapeFix_FixSmallFace) sfsf=new ShapeFix_FixSmallFace;
sfsf->Init (rShape);
sfsf->Perform();
if (!sfsf->Shape().IsNull())
{
rShape=sfsf->Shape ();
}
checker=NULL;
return rShape;
}
Is this the right way? or i'm missing something?
I'using the "fixed shape" as surface for projection (GeomLibProj::Curve2d) and i get null curve from Curve2d. I know that the projection works cause it fails only with some "real life model", so i think i need to fix the imported data...
any hints?
Wed, 02/11/2009 - 16:40
do you solve the problem?