mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0027531: Modeling Algorithms - Make the algorithm Approx_SameParameter more clear and robust
Approx/Approx_SameParameter.cxx,hxx: Class Approx_SameParameter refactoring. Logic is changed in many places to unify usage, simplify maintenance. Method Curve2d() is changed to return Geom2d_Curve instead of Geom2d_BSplineCurve. Corresponding message is added to the upgrade guide. .lxx file is merged into .hxx. Tangent computation is extracted into special method. Comparing number of sample points after CheckSameParameter(...) is added to define cases with projection fails. Undesirable behavior when curves are not same parameterized is fixed. Geom2dAdaptor/Geom2dAdaptor.cxx: treatment of offset curve is added Adaptor3d/Adaptor3d_TopolTool.cxx: minor improvement of performance for BSpline surfaces with huge number of knots Tests were modified according to new behavior of sameparameter algorithm
This commit is contained in:
@@ -933,6 +933,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
||||
const Standard_Integer theNUmin,
|
||||
const Standard_Integer theNVmin)
|
||||
{
|
||||
const Standard_Integer aMaxPnts = 1001;
|
||||
const Handle(Geom_BSplineSurface)& aBS = myS->BSpline();
|
||||
Standard_Real uinf,usup,vinf,vsup;
|
||||
uinf = myS->FirstUParameter(); usup = myS->LastUParameter();
|
||||
@@ -999,11 +1000,20 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
||||
nbsu = theNUmin;
|
||||
bUuniform = Standard_True;
|
||||
}
|
||||
|
||||
else if (nbsu > aMaxPnts)
|
||||
{
|
||||
nbsu = aMaxPnts;
|
||||
bUuniform = Standard_True;
|
||||
}
|
||||
if(nbsv < theNVmin) {
|
||||
nbsv = theNVmin;
|
||||
bVuniform = Standard_True;
|
||||
}
|
||||
else if (nbsv > aMaxPnts)
|
||||
{
|
||||
nbsv = aMaxPnts;
|
||||
bVuniform = Standard_True;
|
||||
}
|
||||
|
||||
TColStd_Array1OfReal anUPars(1, nbsu);
|
||||
TColStd_Array1OfBoolean anUFlg(1, nbsu);
|
||||
|
Reference in New Issue
Block a user