#include <MMgt_TShared.hxx>
#include <NCollection_Map.hxx>
#include <NCollection_Vector.hxx>
+#include <Precision.hxx>
#include <Standard_Type.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Builder.hxx>
IMPLEMENT_STANDARD_RTTIEXT(BRepCheck_Solid,BRepCheck_Result)
-//
-//
-//
-//
-//
-//
-//
-//
//
class BRepCheck_HSC;
DEFINE_STANDARD_HANDLE(BRepCheck_HSC, MMgt_TShared);
BRepClass3d_SolidClassifier mySC;
};
-
-
//
//=======================================================================
//class : BRepCheck_ToolSolid
BRepCheck_ToolSolid() {
myIsHole=Standard_False;
+ myPntTol=Precision::Confusion();
myPnt.SetCoord(-1.,-1.,-1.);
};
return myPnt;
}
//
+ Standard_Real CheckTol() const {
+ return myPntTol;
+ };
+ //
// IsOut
Standard_Boolean IsOut(BRepCheck_ToolSolid& aOther) {
Standard_Boolean bFlag;
//
BRepClass3d_SolidClassifier& aSC=myHSC->SolidClassifier();
//
- aSC.Perform(aOther.myPnt, ::RealSmall());
+ aSC.Perform(aOther.InnerPoint(), aOther.CheckTol());
aState=aSC.State();
bFlag=(aState==TopAbs_OUT);
//
Handle(Geom_Curve) aC3D=BRep_Tool::Curve(aE, aT1, aT2);
aT=(1.-aPAR_T)*aT1 + aPAR_T*aT2;
myPnt=aC3D->Value(aT);
+ myPntTol = BRep_Tool::Tolerance(aE);
break;
}
}
//
protected:
Standard_Boolean myIsHole;
- gp_Pnt myPnt;
+ gp_Pnt myPnt;
+ Standard_Real myPntTol;
TopoDS_Solid mySolid;
Handle(BRepCheck_HSC) myHSC;
};
--- /dev/null
+puts "========"
+puts "OCC26955"
+puts "========"
+puts ""
+#################################
+# Invalid result of General Fuse operation
+#################################
+
+
+restore [locate_data_file bug26955_input0.brep] b1
+restore [locate_data_file bug26955_input1.brep] b2
+restore [locate_data_file bug26955_input2.brep] b3
+
+bclearobjects
+bcleartools
+baddobjects b1 b2 b3
+bfillds
+bbuild result
+
+set square 24516.1
+
+set nbshapes_expected "
+Number of shapes in shape
+ VERTEX : 14
+ EDGE : 22
+ WIRE : 14
+ FACE : 13
+ SHELL : 4
+ SOLID : 3
+ COMPSOLID : 0
+ COMPOUND : 1
+ SHAPE : 71
+"
+
+checknbshapes result -ref ${nbshapes_expected} -t
+
+set 2dviewer 1