mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0022598: Approximation of p-curve by 2D line
Check whether p-curve being projected can be approximated by straight line is made before full-scale projection, to improve performance. If straight, pcurve is created as Line only if this will lead to the same range parameterization as 3d curve, otherwise BSpline of degree 1 is created. Re-approximation of line pcurves by bsplines removed from ShapeFix_Edge. Test case updating to new behavior. Added "static" keyword to the fixPeriodictyTroubles() function. Update of test-cases according new behavior
This commit is contained in:
@@ -491,18 +491,6 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,
|
||||
|
||||
// step = 2;
|
||||
|
||||
// adding by skl 28.03.2003 for usung Line instead of BSpline
|
||||
Standard_Real fp=0.,lp=0.;
|
||||
Standard_Boolean isLine=Standard_False;
|
||||
if(c2d->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
|
||||
Handle(Geom2d_TrimmedCurve) tc = Handle(Geom2d_TrimmedCurve)::DownCast(c2d);
|
||||
if(tc->BasisCurve()->IsKind(STANDARD_TYPE(Geom2d_Line))) {
|
||||
fp = tc->FirstParameter();
|
||||
lp = tc->LastParameter();
|
||||
isLine = Standard_True;
|
||||
}
|
||||
}
|
||||
|
||||
if (isSeam) {
|
||||
// On ne sait pas laquelle est Forward. Au PIF. La geometrie Forward
|
||||
// sera mise a jour dans ComputeWire
|
||||
@@ -538,12 +526,6 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,
|
||||
B.UpdateEdge (edge,c2d,surf,location, 0.); //#82 rln 16.03.99: preci
|
||||
}
|
||||
|
||||
if ( isLine ) {
|
||||
B.Range(edge,surf,location,fp,lp);
|
||||
B.SameParameter(edge,Standard_False);
|
||||
B.SameRange(edge,Standard_False);
|
||||
}
|
||||
|
||||
// Conclusion
|
||||
// step = 3;
|
||||
if ( myProjector->Status ( ShapeExtend_DONE3 ) ) {
|
||||
|
Reference in New Issue
Block a user