mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0031260: Geom2dGcc_Circ2d2TanRad fails in this case (720)
Adaptor2d/Adaptor2d_OffsetCurve.cxx: Function nbPoints(...) is modified Test case added
This commit is contained in:
parent
08353e37cf
commit
389f5b59dd
@ -656,19 +656,16 @@ static Standard_Integer nbPoints(const Handle(Adaptor2d_HCurve2d)& theCurve)
|
|||||||
|
|
||||||
Standard_Integer nbs = 20;
|
Standard_Integer nbs = 20;
|
||||||
|
|
||||||
if (theCurve->GetType() == GeomAbs_Line)
|
if (theCurve->GetType() == GeomAbs_BezierCurve)
|
||||||
nbs = 2;
|
|
||||||
else if (theCurve->GetType() == GeomAbs_BezierCurve)
|
|
||||||
{
|
{
|
||||||
nbs = 3 + theCurve->NbPoles();
|
nbs = Max(nbs, 3 + theCurve->NbPoles());
|
||||||
}
|
}
|
||||||
else if (theCurve->GetType() == GeomAbs_BSplineCurve) {
|
else if (theCurve->GetType() == GeomAbs_BSplineCurve) {
|
||||||
nbs = theCurve->NbKnots();
|
nbs = Max(nbs, theCurve->NbKnots() * theCurve->Degree());
|
||||||
nbs *= theCurve->Degree();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbs > 200)
|
if (nbs > 300)
|
||||||
nbs = 200;
|
nbs = 300;
|
||||||
return nbs;
|
return nbs;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
27
tests/bugs/modalg_7/bug31260
Normal file
27
tests/bugs/modalg_7/bug31260
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0031260: Geom2dGcc_Circ2d2TanRad fails in this case (720)"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file bug31260.brep] t
|
||||||
|
|
||||||
|
mkcurve c t
|
||||||
|
plane p 0.0 0.0 12.649999618530273 0.0 0.0 1.0
|
||||||
|
to2d c2d c p
|
||||||
|
point pnt 11.9850 12.0585
|
||||||
|
|
||||||
|
cirtang r -c c2d -p pnt -r 0.5
|
||||||
|
|
||||||
|
smallview -2D-
|
||||||
|
|
||||||
|
2dfit
|
||||||
|
|
||||||
|
xwd ${imagedir}/${test_image}.png
|
||||||
|
|
||||||
|
set NbCurv [llength [directory r_*]]
|
||||||
|
|
||||||
|
if { $NbCurv == 2 } {
|
||||||
|
puts "OK: Number of circles is good"
|
||||||
|
} else {
|
||||||
|
puts "Error: Not all solutions"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user