mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024973: Incorrect PCurve construction
class: BOPTools_AlgoTools2D method: void BOPTools_AlgoTools2D::MakePCurveOnFace (const TopoDS_Face& aF, const Handle(Geom_Curve)& aC3D, const Standard_Real aFirst, const Standard_Real aLast, Handle(Geom2d_Curve)& aC2D, Standard_Real& TolReached2d) has been modified to provide the conformity with the location of the surface Test case for issue CR24973
This commit is contained in:
@@ -589,14 +589,16 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
|
||||
{
|
||||
Standard_Real aTolR;
|
||||
Handle(Geom2d_Curve) aC2DA;
|
||||
|
||||
BRepAdaptor_Surface aBAS(aF, Standard_False);
|
||||
Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(aBAS);
|
||||
Handle(GeomAdaptor_HCurve) aBAHC = new
|
||||
GeomAdaptor_HCurve(aC3D, aFirst, aLast);
|
||||
//
|
||||
Handle(Geom_Surface) aS=BRep_Tool::Surface(aF);
|
||||
GeomAdaptor_Surface aGAS(aS);
|
||||
Handle(GeomAdaptor_HSurface) aBAHS=
|
||||
new GeomAdaptor_HSurface(aGAS);
|
||||
Handle(GeomAdaptor_HCurve) aBAHC =
|
||||
new GeomAdaptor_HCurve(aC3D, aFirst, aLast);
|
||||
|
||||
//when the type of surface is GeomAbs_SurfaceOfRevolution
|
||||
if (aBAS.GetType() == GeomAbs_SurfaceOfRevolution) {
|
||||
if (aGAS.GetType() == GeomAbs_SurfaceOfRevolution) {
|
||||
Standard_Real aTR = 1.e-7;
|
||||
ProjLib_ProjectedCurve aProj1(aBAHS, aBAHC, aTR);
|
||||
BOPTools_AlgoTools2D::MakePCurveOfType(aProj1, aC2D);
|
||||
|
Reference in New Issue
Block a user