1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0032106: Modeling Algorithms - Tolerance of General Fuse result depends on a sequence of arguments

BOPTools_AlgoTools2D::MakePCurveOnFace(...): extension of surface for projection with large tolerance is added.

test/bugs/modalg_7/bug32106 : new test case added
This commit is contained in:
ifv
2021-04-01 11:10:00 +03:00
committed by bugmaster
parent 5c9493b348
commit c57bf5636c
2 changed files with 60 additions and 0 deletions

View File

@@ -576,6 +576,7 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
Standard_Integer aDegMin = -1, aDegMax = -1, aMaxSegments = -1;
Standard_Real aMaxDist = -1;
AppParCurves_Constraint aBndPnt = AppParCurves_TangencyPoint;
Standard_Boolean isExtendSurf = Standard_False;
if ((TolReached2d >= 10. * aTR) && (TolReached2d <= aMaxTol || isAnaSurf))
{
aTR = Min(aMaxTol, 0.1*TolReached2d);
@@ -585,12 +586,34 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
{
aBndPnt = AppParCurves_PassPoint;
}
isExtendSurf = Standard_True;
}
else if(TolReached2d > aMaxTol)
{
aTR = Min(TolReached2d, 1.e3 * aMaxTol);
aMaxDist = 1.e2 * aTR;
aMaxSegments = 100;
isExtendSurf = Standard_True;
}
if (isExtendSurf)
{
Handle(Adaptor3d_Surface) anA3dSurf;
Standard_Real dt = (aBAHS->LastUParameter() - aBAHS->FirstUParameter());
if (!aBAHS->IsUPeriodic() || Abs(dt - aBAHS->UPeriod()) > 0.01 * dt)
{
dt *= 0.01;
anA3dSurf = aBAHS->UTrim(aBAHS->FirstUParameter() - dt, aBAHS->LastUParameter() + dt, 0.);
}
dt = (aBAHS->LastVParameter() - aBAHS->FirstVParameter());
if (!aBAHS->IsVPeriodic() || Abs(dt - aBAHS->VPeriod()) > 0.01 * dt)
{
dt *= 0.01;
anA3dSurf = aBAHS->VTrim(aBAHS->FirstVParameter() - dt, aBAHS->LastVParameter() + dt, 0.);
}
if (!anA3dSurf.IsNull())
{
aProjCurv.Load(anA3dSurf);
}
}
aProjCurv.Load(aTR);
aProjCurv.SetDegree(aDegMin, aDegMax);