class BOPAlgo_WireSplitter
- static function:
Standard_Real Angle2D (const TopoDS_Vertex& aV,
const TopoDS_Edge& anEdge,
const TopoDS_Face& myFace,
const GeomAdaptor_Surface& aGAS,
const Standard_Boolean bIsIN)
The treatment of circles has been chenged to prevent
the loss of accuracy due to small differences in large values.
Small correction of test case for issue CR26582
Test case for issue CR26582
Conflicts:
src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx
GeomAbs_CurveType aType;
Geom2dAdaptor_Curve aGAC2D(aC2D);
aType=aGAC2D.GetType();
- if (aType==GeomAbs_BSplineCurve || aType==GeomAbs_BezierCurve) {
+ if (aType==GeomAbs_BSplineCurve ||
+ aType==GeomAbs_BezierCurve) {
dt=1.1*dt;
}
if (fabs (aTV-aFirst) < fabs(aTV - aLast)) {
aTV1=aTV - dt;
}
//
- aC2D->D0 (aTV1, aPV1);
- aC2D->D0 (aTV, aPV);
+ if (aType==GeomAbs_Circle) {
+ Standard_Real aTM;
+ TopAbs_Orientation aOrE;
+ gp_Pnt2d aPM;
+ //
+ aTM=0.5*(aTV1+aTV);
+ //
+ aC2D->D1(aTM, aPM, aV2D);
+ aOrE=anEdge.Orientation();
+ if (aOrE==TopAbs_REVERSED) {
+ aV2D.Reverse();
+ }
+ }
+ else {
+ aC2D->D0 (aTV1, aPV1);
+ aC2D->D0 (aTV, aPV);
//
aV2D = bIsIN ? gp_Vec2d(aPV1, aPV) : gp_Vec2d(aPV, aPV1);
+ }
//
gp_Dir2d aDir2D(aV2D);
anAngle=Angle(aDir2D);
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
+puts "TODO OCC26582 ALL: Error : The square of result shape is"
puts "========="
puts " OCC497 "
--- /dev/null
+puts "============"
+puts "OCC26582"
+puts "============"
+puts ""
+###############################
+## Wrong result obtained by Common operator.
+###############################
+
+restore [locate_data_file bug26582_bx.brep] bx
+
+explode bx
+copy bx_1 b1
+copy bx_2 b2
+
+bclearobjects
+bcleartools
+baddobjects b1
+baddtools b2
+
+bfillds
+bbop result 0
+
+set square 39.1778
+
+set nbshapes_expected "
+Number of shapes in shape
+ VERTEX : 5
+ EDGE : 7
+ WIRE : 3
+ FACE : 3
+ SHELL : 1
+ SOLID : 0
+ COMPSOLID : 0
+ COMPOUND : 1
+ SHAPE : 20
+"
+checknbshapes result -ref ${nbshapes_expected} -t -m "result obtained by Common operator"
+
+set 3dviewer 1