mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0026582: Wrong result obtained by Common operator
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
This commit is contained in:
@@ -743,7 +743,8 @@ Standard_Integer NbWaysOut(const BOPAlgo_ListOfEdgeInfo& aLEInfo)
|
||||
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)) {
|
||||
@@ -753,10 +754,25 @@ Standard_Integer NbWaysOut(const BOPAlgo_ListOfEdgeInfo& aLEInfo)
|
||||
aTV1=aTV - dt;
|
||||
}
|
||||
//
|
||||
aGAC2D.D0 (aTV1, aPV1);
|
||||
aGAC2D.D0 (aTV, aPV);
|
||||
//
|
||||
aV2D = bIsIN ? gp_Vec2d(aPV1, aPV) : gp_Vec2d(aPV, aPV1);
|
||||
if (aType==GeomAbs_Circle) {
|
||||
Standard_Real aTM;
|
||||
TopAbs_Orientation aOrE;
|
||||
gp_Pnt2d aPM;
|
||||
//
|
||||
aTM=0.5*(aTV1+aTV);
|
||||
//
|
||||
aGAC2D.D1(aTM, aPM, aV2D);
|
||||
aOrE=anEdge.Orientation();
|
||||
if (aOrE==TopAbs_REVERSED) {
|
||||
aV2D.Reverse();
|
||||
}
|
||||
}
|
||||
else {
|
||||
aGAC2D.D0 (aTV1, aPV1);
|
||||
aGAC2D.D0 (aTV, aPV);
|
||||
//
|
||||
aV2D = bIsIN ? gp_Vec2d(aPV1, aPV) : gp_Vec2d(aPV, aPV1);
|
||||
}
|
||||
//
|
||||
gp_Dir2d aDir2D(aV2D);
|
||||
anAngle=Angle(aDir2D);
|
||||
|
Reference in New Issue
Block a user