mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0028553: Incorrect result of the ShapeUpgrade_ShapeDivideContinuity algorithm
The cause of the bug was computation of incorrect UVBounds in the method ShapeAnalysis::GetFaceUVBounds. In this patch the computation of a box for a 2D curve in the method ShapeAnalysis_Curve::FillBndBox() has been improved taking into account intervals of C2 continuity. Also the fix makes little extension of bounds when making the new surface in ShapeUpgrade_FaceDivide::SplitSurface(), so that all p-curves were fully inside. Test case for issue CR28553
This commit is contained in:
@@ -132,7 +132,21 @@ Standard_Boolean ShapeUpgrade_FaceDivide::SplitSurface ()
|
||||
if(Precision::IsInfinite(Uf) || Precision::IsInfinite(Ul) ||
|
||||
Precision::IsInfinite(Vf) || Precision::IsInfinite(Vl))
|
||||
return Standard_False;
|
||||
|
||||
|
||||
// make little extension to ensure all pcurves fit inside new surface bounds
|
||||
Standard_Real aSUf, aSUl, aSVf, aSVl;
|
||||
surf->Bounds(aSUf, aSUl, aSVf, aSVl);
|
||||
if (!surf->IsUPeriodic()) {
|
||||
Standard_Real dU = (Ul - Uf) * 0.01;
|
||||
if (Uf > aSUf) Uf -= Min(dU, Uf - aSUf);
|
||||
if (Ul < aSUl) Ul += Min(dU, aSUl - Ul);
|
||||
}
|
||||
if (!surf->IsVPeriodic()) {
|
||||
Standard_Real dV = (Vl - Vf) * 0.01;
|
||||
if (Vf > aSVf) Vf -= Min(dV, Vf - aSVf);
|
||||
if (Vl < aSVl) Vl += Min(dV, aSVl - Vl);
|
||||
}
|
||||
|
||||
SplitSurf->Init ( surf, Uf, Ul, Vf, Vl );
|
||||
SplitSurf->Perform(mySegmentMode);
|
||||
|
||||
|
Reference in New Issue
Block a user