mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0027079: Bad approximation of intersection curves with variable curvature
1. Method Approx_ComputeLine::Perform is modified: now it contains also recursive calls after new line computation made by new method ApproxInt_MultiLine::MakeMLOneMorePoint. 2. New method MakeMLOneMorePoint is added to ApproxInt_MultiLine: it builds new sub-line as a part of main line with new point added into the middle of the longest interval between existing points. 3. Method ShapeConstruct_ProjectCurveOnSurface::ApproxPCurve is modified to avoid regressions: now it takes care of the set of initial points to be enough close to each other so that an interval between two adjacent points is less than half-period of the surface. 4. Modification in ShapeConstruct_ProjectCurveOnSurface: correction of pcurves of edges which extremities are in the singularities of surface.
This commit is contained in:
@@ -803,12 +803,20 @@ void PutPCurve(const TopoDS_Edge& Edg,
|
||||
|
||||
S = BRep_Tool::Surface(Fac);
|
||||
|
||||
Standard_Real TolFirst = -1, TolLast = -1;
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices(Edg, V1, V2);
|
||||
if (!V1.IsNull())
|
||||
TolFirst = BRep_Tool::Tolerance(V1);
|
||||
if (!V2.IsNull())
|
||||
TolLast = BRep_Tool::Tolerance(V2);
|
||||
|
||||
Standard_Real tol2d = Precision::Confusion();
|
||||
Handle(Geom2d_Curve) C2d;
|
||||
ShapeConstruct_ProjectCurveOnSurface aToolProj;
|
||||
aToolProj.Init(S, tol2d);
|
||||
|
||||
aToolProj.Perform(C,f,l, C2d);
|
||||
aToolProj.Perform(C,f,l,C2d,TolFirst,TolLast);
|
||||
if (C2d.IsNull())
|
||||
{
|
||||
return;
|
||||
@@ -819,7 +827,6 @@ void PutPCurve(const TopoDS_Edge& Edg,
|
||||
gp_Pnt PF,PL;
|
||||
S->D0(pf.X(),pf.Y(),PF);
|
||||
S->D0(pl.X(),pl.Y(),PL);
|
||||
TopoDS_Vertex V1,V2;
|
||||
if (Edg.Orientation() == TopAbs_REVERSED) {
|
||||
V1 = TopExp::LastVertex(Edg);
|
||||
V1.Reverse();
|
||||
|
Reference in New Issue
Block a user