mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031242: Scaling with different coefficients along axes produces invalid shape
GeomConvert_1.cxx: Creation periodic BSpline surfaces from trimmed periodic surface if trim is boundaries of periodic domain is allowed BRepTools_NurbsConvertModification.cxx: Checking domain of 2dCurves if surfaces are periodic is added Test case tests/bugs/mesh/bug30008_2 is modified according to current behavior Test case tests/bugs/modalg_7/bug31242 is added
This commit is contained in:
@@ -482,6 +482,8 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
}
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//
|
||||
GeomAdaptor_Surface GAS(S,Uinf-u,Usup+u,Vinf-v,Vsup+v);
|
||||
|
||||
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
|
||||
@@ -490,6 +492,19 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
|
||||
if(ProjOnCurve.IsDone()) {
|
||||
Curve2d = ProjOnCurve.BSpline();
|
||||
if (S->IsUPeriodic() || S->IsVPeriodic())
|
||||
{
|
||||
//Surface is periodic, checking curve2d domain
|
||||
//Old domain
|
||||
gp_Pnt2d aPf = C2d->Value(f2d);
|
||||
//New domain
|
||||
gp_Pnt2d aNewPf = Curve2d->Value(f2d);
|
||||
gp_Vec2d aT(aNewPf, aPf);
|
||||
if (aT.SquareMagnitude() > Precision::SquarePConfusion())
|
||||
{
|
||||
Curve2d = Handle(Geom2d_Curve)::DownCast(Curve2d->Translated(aT));
|
||||
}
|
||||
}
|
||||
Standard_Real newTol = BRepTools::EvalAndUpdateTol(newE, C3d, Curve2d, S, f3d, l3d);
|
||||
if(newTol > Tol)
|
||||
{
|
||||
|
Reference in New Issue
Block a user