mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
* 0031140: Draw command "cirtang" raises exception on the parallel curves
To avoid exception for parallel curves because the number of solutions exceeds the size of the reserved array a check has been added that the number of solutions does not exceed the size of the reserved array.
This commit is contained in:
parent
515991ffef
commit
77676f1b6d
@ -191,7 +191,7 @@ pararg2(1,aNbSolMAX)
|
||||
Geom2dInt_TheIntConicCurveOfGInter Intp(Line,D1,C2,D2,Tol,Tol);
|
||||
if (Intp.IsDone()) {
|
||||
if (!Intp.IsEmpty()) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() && NbrSol < cirsol.Length() ; i++) {
|
||||
NbrSol++;
|
||||
gp_Pnt2d Center(Intp.Point(i).Value());
|
||||
cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
|
||||
@ -375,7 +375,7 @@ pararg2(1,aNbSolMAX)
|
||||
Intp.Perform(Circ,D1,C2,D2,Tol,Tol);
|
||||
if (Intp.IsDone()) {
|
||||
if (!Intp.IsEmpty()) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() && NbrSol < cirsol.Length() ; i++) {
|
||||
NbrSol++;
|
||||
gp_Pnt2d Center(Intp.Point(i).Value());
|
||||
cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
|
||||
@ -507,7 +507,7 @@ pararg2(1,aNbSolMAX)
|
||||
Intp.Perform(Circ,D1,Cu2,D2,Tol,Tol);
|
||||
if (Intp.IsDone()) {
|
||||
if (!Intp.IsEmpty()) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() && NbrSol < cirsol.Length(); i++) {
|
||||
NbrSol++;
|
||||
gp_Pnt2d Center(Intp.Point(i).Value());
|
||||
cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
|
||||
@ -853,7 +853,7 @@ pararg2(1,aNbSolMAX)
|
||||
if (!Intp.IsEmpty()) {
|
||||
const Standard_Real aSQApproxTol = Precision::Approximation() *
|
||||
Precision::Approximation();
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++)
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() && NbrSol < cirsol.Length() ; i++)
|
||||
{
|
||||
Standard_Real aU0 = Intp.Point(i).ParamOnFirst();
|
||||
Standard_Real aV0 = Intp.Point(i).ParamOnSecond();
|
||||
|
Loading…
x
Reference in New Issue
Block a user