//
// Curves, Points
aFF.Init(aNbCurves, aNbPoints);
+
+ // Fix bounding box expanding coefficient.
+ Standard_Real aBoxExpandValue = aTolR3D;
+ if (aNbCurves > 0)
+ {
+ // Modify geometric expanding coefficient by topology value,
+ // since this bounging box used in sharing (vertex or edge).
+ Standard_Real aMaxVertexTol = Max (BRep_Tool::MaxTolerance(aFaceFace.Face1(), TopAbs_VERTEX),
+ BRep_Tool::MaxTolerance(aFaceFace.Face2(), TopAbs_VERTEX));
+ aBoxExpandValue += aMaxVertexTol;
+ }
//
// Curves
BOPDS_VectorOfCurve& aVNC=aFF.ChangeCurves();
//
const IntTools_Curve& aIC=aCvsX(i);
const Handle(Geom_Curve)& aC3D= aIC.Curve();
- bValid=IntTools_Tools::CheckCurve(aC3D, aTolR3D, aBox);
+ bValid=IntTools_Tools::CheckCurve(aC3D, aBoxExpandValue, aBox);
if (bValid) {
BOPDS_Curve& aNC=aVNC.Append1();
aNC.SetCurve(aIC);
Curve from Geom,
Surface from Geom,
Shape from GeomAbs,
+ ShapeEnum from TopAbs,
Triangulation from Poly,
Polygon3D from Poly,
raises
NullObject from Standard;
+ MaxTolerance(myclass;
+ theShape : Shape from TopoDS;
+ theSubShape : ShapeEnum from TopAbs)
+ returns Real from Standard;
+ ---Purpose:
+ -- Returns the maximum tolerance of input shape subshapes.
+ -- @param theShape - Shape to search tolerance.
+ -- @param theSubShape - Search subshape, only Face, Edge or Vertex are supported.
+
end Tool;
return bRet;
}
+//=======================================================================
+//function : MaxTolerance
+//purpose :
+//=======================================================================
+Standard_Real BRep_Tool::MaxTolerance (const TopoDS_Shape& theShape,
+ const TopAbs_ShapeEnum theSubShape)
+{
+ Standard_Real aTol = 0.0;
+
+ // Explorer Shape-Subshape.
+ TopExp_Explorer anExpSS(theShape, theSubShape);
+ if (theSubShape == TopAbs_FACE)
+ {
+ for( ; anExpSS.More() ; anExpSS.Next() )
+ {
+ const TopoDS_Shape& aCurrentSubShape = anExpSS.Current();
+ aTol = Max(aTol, Tolerance(TopoDS::Face(aCurrentSubShape)));
+ }
+ }
+ else if (theSubShape == TopAbs_EDGE)
+ {
+ for( ; anExpSS.More() ; anExpSS.Next() )
+ {
+ const TopoDS_Shape& aCurrentSubShape = anExpSS.Current();
+ aTol = Max(aTol, Tolerance(TopoDS::Edge(aCurrentSubShape)));
+ }
+ }
+ else if (theSubShape == TopAbs_VERTEX)
+ {
+ for( ; anExpSS.More() ; anExpSS.Next() )
+ {
+ const TopoDS_Shape& aCurrentSubShape = anExpSS.Current();
+ aTol = Max(aTol, Tolerance(TopoDS::Vertex(aCurrentSubShape)));
+ }
+ }
+
+ return aTol;
+}
# test script on make volume operation
# plane
+puts "TODO OCC26560 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC26020 ALL: Error: bopcheck failed"
+puts "TODO OCC26560 ALL: Error : The area of the resulting shape is"
# planar face
plane pln_f1 18.855982726712998 17.500000000800412 0 -0.96152394764524818 -0.27472112788189063 0
# test script on make volume operation
# cylinder plane
+puts "TODO OCC26737 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC26737 ALL: Error: bopcheck failed"
+
# planar face
plane pln_f1 0 515 1.1102230246251565e-015 0 -1 -1.1102230246251565e-016
erase pln_f1
--- /dev/null
+puts "========"
+puts "OCC27746"
+puts "========"
+puts ""
+#################################################
+# Incomplete result of SECTION operation
+#################################################
+
+restore [locate_data_file bug27746_first.brep] b1
+restore [locate_data_file bug27746_second.brep] b2
+
+settolerance b2 1.e-7
+fixshape b2 b2
+
+bclearobjects
+bcleartools
+baddobjects b1
+baddtools b2
+bfillds
+bbop result 4
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full nbv
+if { $nbv > 4 } { puts "Error : Section is incorrect" }
+
+set length 88.2082
\ No newline at end of file
--- /dev/null
+puts "========"
+puts "OCC27746"
+puts "========"
+puts ""
+#################################################
+# Incomplete result of SECTION operation
+#################################################
+
+restore [locate_data_file bug27746_first.brep] b1
+restore [locate_data_file bug27746_second.brep] b2
+
+explode b1 f; compound b1_60 b1_61 b1
+explode b2 f; compound b2_14 b2_18 b2
+donly b1 b2
+
+bclearobjects
+bcleartools
+baddobjects b1
+baddtools b2
+bfillds
+bbop result 4
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full nbv
+if { $nbv != 2 } { puts "Error : Section is incorrect" }
+
+set length 4.39869
\ No newline at end of file
--- /dev/null
+puts "========"
+puts "OCC27746"
+puts "========"
+puts ""
+#################################################
+# Incomplete result of SECTION operation
+#################################################
+
+restore [locate_data_file bug27746_first.brep] b1
+restore [locate_data_file bug27746_second.brep] b2
+
+explode b1 f; compound b1_60 b1_61 b1
+explode b2 f; compound b2_21 b2_37 b2
+donly b1 b2
+
+bclearobjects
+bcleartools
+baddobjects b1
+baddtools b2
+bfillds
+bbop result 4
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full nbv
+if { $nbv != 2 } { puts "Error : Section is incorrect" }
+
+set length 4.39869
\ No newline at end of file