mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +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:
parent
5c9493b348
commit
c57bf5636c
@ -576,6 +576,7 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
|
|||||||
Standard_Integer aDegMin = -1, aDegMax = -1, aMaxSegments = -1;
|
Standard_Integer aDegMin = -1, aDegMax = -1, aMaxSegments = -1;
|
||||||
Standard_Real aMaxDist = -1;
|
Standard_Real aMaxDist = -1;
|
||||||
AppParCurves_Constraint aBndPnt = AppParCurves_TangencyPoint;
|
AppParCurves_Constraint aBndPnt = AppParCurves_TangencyPoint;
|
||||||
|
Standard_Boolean isExtendSurf = Standard_False;
|
||||||
if ((TolReached2d >= 10. * aTR) && (TolReached2d <= aMaxTol || isAnaSurf))
|
if ((TolReached2d >= 10. * aTR) && (TolReached2d <= aMaxTol || isAnaSurf))
|
||||||
{
|
{
|
||||||
aTR = Min(aMaxTol, 0.1*TolReached2d);
|
aTR = Min(aMaxTol, 0.1*TolReached2d);
|
||||||
@ -585,12 +586,34 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
|
|||||||
{
|
{
|
||||||
aBndPnt = AppParCurves_PassPoint;
|
aBndPnt = AppParCurves_PassPoint;
|
||||||
}
|
}
|
||||||
|
isExtendSurf = Standard_True;
|
||||||
}
|
}
|
||||||
else if(TolReached2d > aMaxTol)
|
else if(TolReached2d > aMaxTol)
|
||||||
{
|
{
|
||||||
aTR = Min(TolReached2d, 1.e3 * aMaxTol);
|
aTR = Min(TolReached2d, 1.e3 * aMaxTol);
|
||||||
aMaxDist = 1.e2 * aTR;
|
aMaxDist = 1.e2 * aTR;
|
||||||
aMaxSegments = 100;
|
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.Load(aTR);
|
||||||
aProjCurv.SetDegree(aDegMin, aDegMax);
|
aProjCurv.SetDegree(aDegMin, aDegMax);
|
||||||
|
37
tests/bugs/modalg_7/bug32106
Normal file
37
tests/bugs/modalg_7/bug32106
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
puts "============================================================================================="
|
||||||
|
puts "0032106: Modeling Algorithms - Tolerance of General Fuse result depends on a sequence of arguments"
|
||||||
|
puts "============================================================================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
brestore [locate_data_file bug32106-body.brep] b1
|
||||||
|
brestore [locate_data_file bug32106-contour.brep] w1
|
||||||
|
tcopy -n b1 b2
|
||||||
|
tcopy -n w1 w2
|
||||||
|
|
||||||
|
bclearobjects
|
||||||
|
bcleartools
|
||||||
|
|
||||||
|
baddobjects b1 w1
|
||||||
|
bfuzzyvalue 1.0
|
||||||
|
bfillds
|
||||||
|
bbuild r1
|
||||||
|
|
||||||
|
checkshape r1
|
||||||
|
checknbshapes r1 -vertex 65 -edge 96 -wire 33 -face 32 -shell 1 -t
|
||||||
|
checkmaxtol r1 -ref 4.2e-01
|
||||||
|
checkprops r1 -l 73255.5
|
||||||
|
|
||||||
|
bclearobjects
|
||||||
|
bcleartools
|
||||||
|
|
||||||
|
baddobjects w2 b2
|
||||||
|
bfuzzyvalue 1.0
|
||||||
|
bfillds
|
||||||
|
bbuild r2
|
||||||
|
checkshape r2
|
||||||
|
checknbshapes r2 -ref [nbshapes r1]
|
||||||
|
checkmaxtol r2 -ref 4.2e-01
|
||||||
|
checkprops r2 -l 73255.6
|
||||||
|
|
||||||
|
checkview -display r1 -2d -path ${imagedir}/${test_image}_r1.png
|
||||||
|
checkview -display r2 -2d -path ${imagedir}/${test_image}_r2.png
|
Loading…
x
Reference in New Issue
Block a user