mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024958: Numerous ShapeFix_IntersectionTool code fixes
Optimize periodic normalization. not needed split edge, if one of parts is too small Small corrections of test cases for issue CR24958_2
This commit is contained in:
@@ -1331,12 +1331,14 @@ void Geom_BSplineSurface::PeriodicNormalization
|
||||
if(Period <= eps)
|
||||
Standard_OutOfRange::Raise("Geom_BSplineSurface::PeriodicNormalization: Uparameter is too great number");
|
||||
|
||||
while (Uparameter > aMaxVal) {
|
||||
Uparameter -= Period ;
|
||||
}
|
||||
|
||||
while (Uparameter < aMinVal) {
|
||||
Uparameter += Period ;
|
||||
Standard_Boolean isLess, isGreater;
|
||||
isLess = aMinVal - Uparameter > 0;
|
||||
isGreater = Uparameter - aMaxVal > 0;
|
||||
if (isLess || isGreater) {
|
||||
Standard_Real aDPar, aNbPer;
|
||||
aDPar = (isLess) ? (aMaxVal - Uparameter) : (aMinVal - Uparameter);
|
||||
modf(aDPar / Period, &aNbPer);
|
||||
Uparameter += aNbPer * Period;
|
||||
}
|
||||
}
|
||||
if (vperiodic) {
|
||||
@@ -1348,11 +1350,14 @@ void Geom_BSplineSurface::PeriodicNormalization
|
||||
if(Period <= eps)
|
||||
Standard_OutOfRange::Raise("Geom_BSplineSurface::PeriodicNormalization: Vparameter is too great number");
|
||||
|
||||
while (Vparameter > aMaxVal) {
|
||||
Vparameter -= Period ;
|
||||
}
|
||||
while (Vparameter < aMinVal) {
|
||||
Vparameter += Period ;
|
||||
Standard_Boolean isLess, isGreater;
|
||||
isLess = aMinVal - Vparameter > 0;
|
||||
isGreater = Vparameter - aMaxVal > 0;
|
||||
if (isLess || isGreater) {
|
||||
Standard_Real aDPar, aNbPer;
|
||||
aDPar = (isLess) ? (aMaxVal - Vparameter) : (aMinVal - Vparameter);
|
||||
modf(aDPar / Period, &aNbPer);
|
||||
Vparameter += aNbPer * Period;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user