const Standard_Real TolC2)
: myIsFindSingleSolution(Standard_False),
myDone (Standard_False),
- myIsPar(Standard_False)
+ myIsParallel(Standard_False)
{
myC[0] = 0; myC[1] = 0;
myInf[0] = myInf[1] = -Precision::Infinite();
myDone = Standard_False;
mypoints.Clear();
mySqDist.Clear();
- myIsPar = Standard_False;
+ myIsParallel = Standard_False;
GeomAbs_CurveType type1 = myC[0]->GetType();
GeomAbs_CurveType type2 = myC[1]->GetType();
U21 = myInf[1];
U22 = mySup[1];
- if (!Precision::IsInfinite(U11)) P1f = Extrema_CurveTool::Value(*myC[0], U11);
- if (!Precision::IsInfinite(U12)) P1l = Extrema_CurveTool::Value(*myC[0], U12);
- if (!Precision::IsInfinite(U21)) P2f = Extrema_CurveTool::Value(*myC[1], U21);
- if (!Precision::IsInfinite(U22)) P2l = Extrema_CurveTool::Value(*myC[1], U22);
+ if (!Precision::IsInfinite(U11)) myP1f = Extrema_CurveTool::Value(*myC[0], U11);
+ if (!Precision::IsInfinite(U12)) myP1l = Extrema_CurveTool::Value(*myC[0], U12);
+ if (!Precision::IsInfinite(U21)) myP2f = Extrema_CurveTool::Value(*myC[1], U21);
+ if (!Precision::IsInfinite(U22)) myP2l = Extrema_CurveTool::Value(*myC[1], U22);
if (Precision::IsInfinite(U11) || Precision::IsInfinite(U21)) mydist11 = RealLast();
- else mydist11 = P1f.SquareDistance(P2f);
+ else mydist11 = myP1f.SquareDistance(myP2f);
if (Precision::IsInfinite(U11) || Precision::IsInfinite(U22)) mydist12 = RealLast();
- else mydist12 = P1f.SquareDistance(P2l);
+ else mydist12 = myP1f.SquareDistance(myP2l);
if (Precision::IsInfinite(U12) || Precision::IsInfinite(U21)) mydist21 = RealLast();
- else mydist21 = P1l.SquareDistance(P2f);
+ else mydist21 = myP1l.SquareDistance(myP2f);
if (Precision::IsInfinite(U12) || Precision::IsInfinite(U22)) mydist22 = RealLast();
- else mydist22 = P1l.SquareDistance(P2l);
+ else mydist22 = myP1l.SquareDistance(myP2l);
//Depending on the types of curves, the algorithm is chosen:
//- _ExtElC, when one of the curves is a line and the other is elementary,
throw StdFail_NotDone();
}
- return myIsPar;
+ return myIsParallel;
}
dist12 = mydist12;
dist21 = mydist21;
dist22 = mydist22;
- P11 = P1f;
- P12 = P1l;
- P21 = P2f;
- P22 = P2l;
+ P11 = myP1f;
+ P12 = myP1l;
+ P21 = myP2f;
+ P22 = myP2l;
}
//=======================================================================
const Standard_Real theUt22,
const Standard_Real theSqDist)
{
- if (!myIsPar)
+ if (!myIsParallel)
return;
const GeomAbs_CurveType aType1 = Extrema_CurveTool::GetType (*myC[0]);
{
mySqDist.Append(theSqDist);
myDone = Standard_True;
- myIsPar = Standard_True;
+ myIsParallel = Standard_True;
return;
}
}
else
{
- myIsPar = Standard_False;
+ myIsParallel = Standard_False;
}
return;
// to the 2nd one must intersect the (native) trimmed range of
// the 2nd line.
- myIsPar = Standard_False;
+ myIsParallel = Standard_False;
const gp_Lin aLin1 = myC[0]->Line();
const gp_Lin aLin2 = myC[1]->Line();
{
ClearSolutions();
mySqDist.Append(theSqDist);
- myIsPar = Standard_True;
+ myIsParallel = Standard_True;
}
else if (!aRange2.IsVoid())
{
mypoints.Append(aP2);
mySqDist.Append(theSqDist);
}
- }
+ else
+ {
+ //Case like this:
+
+ // ************** aLin1
+ // o
+ // o
+ // *********** aLin2
+ //
+ //Take minimal trimmed distance
+ Standard_Real aDmin, aDists[4] = {mydist11, mydist12, mydist21, mydist22};
+ Extrema_POnCurv aP1, aP2;
+ aDmin = aDists[0];
+ Standard_Integer i, imin = 0;
+ for (i = 1; i < 4; ++i)
+ {
+ if (aDmin > aDists[i])
+ {
+ aDmin = aDists[i];
+ imin = i;
+ }
+ }
+ if (imin == 0)
+ {
+ aP1.SetValues(myInf[0], myP1f);
+ aP2.SetValues(myInf[1], myP2f);
+ }
+ else if (imin == 1)
+ {
+ aP1.SetValues(myInf[0], myP1f);
+ aP2.SetValues(mySup[1], myP2l);
+ }
+ else if (imin == 2)
+ {
+ aP1.SetValues(mySup[0], myP1l);
+ aP2.SetValues(myInf[1], myP2f);
+ }
+ else
+ {
+ aP1.SetValues(mySup[0], myP1l);
+ aP2.SetValues(mySup[1], myP2l);
+ }
+ ClearSolutions();
+ mypoints.Append(aP1);
+ mypoints.Append(aP2);
+ mySqDist.Append(aDmin);
+ }
+ }
}
else
{
// Circle - Circle
- myIsPar = Standard_False;
+ myIsParallel = Standard_False;
//Two arcs with ranges [U1, U2] and [V1, V2] correspondingly are
//considered to be parallel in the following case:
//Cases are possible and processed below:
//1. Extrema does not exist. In this case all common ranges are VOID.
//2. Arcs are parallel and distance between them is equal to sqrt(theSqDist).
- // In this case myIsPar = TRUE definitely.
+ // In this case myIsParallel = TRUE definitely.
//3. Arcs are parallel and distance between them is equal to (sqrt(theSqDist) + R),
- // where R is the least radius of the both circles. In this case myIsPar flag
+ // where R is the least radius of the both circles. In this case myIsParallel flag
// will temporary be set to TRUE but check will be continued until less
// distance will be found. At that, region with the least distance can be
- // either a local point or continuous range. In 1st case myIsPar = FALSE and
+ // either a local point or continuous range. In 1st case myIsParallel = FALSE and
// several (or single) extremas will be returned. In the 2nd one
- // myIsPar = TRUE and only the least distance will be returned.
+ // myIsParallel = TRUE and only the least distance will be returned.
//4. Arcs are not parallel. Then several (or single) extremas will be returned.
if (aRng.Delta() > Precision::Angular())
aMinSqD = Min(aMinSqD, ExtPCir.SquareDistance(anExtID));
}
- if (aMinSqD <= aMinSquareDist)
+ if (aMinSqD <= aMinSquareDist + 10.* Epsilon(1. + aMinSqD))
{
ClearSolutions();
mySqDist.Append(aMinSqD);
- myIsPar = Standard_True;
+ myIsParallel = Standard_True;
const Standard_Real aDeltaSqDist = aMinSqD - theSqDist;
const Standard_Real aSqD = Max(aMinSqD, theSqDist);
Extrema_CurveTool::Circle (*myC[0]),
Precision::Confusion(), theUt11, theUt12);
- Standard_Boolean isFound = !myIsPar;
+ Standard_Boolean isFound = !myIsParallel;
if (!isFound)
{
- //If the flag myIsPar was set earlier then it does not mean that
+ //If the flag myIsParallel was set earlier then it does not mean that
//we have found the minimal distance. Here we check it. If there is
- //a pair of points, which are in less distance then myIsPar flag
+ //a pair of points, which are in less distance then myIsParallel flag
//was unset and the algorithm will return these nearest points.
for (Standard_Integer anExtID = 1; anExtID <= ExtPCir.NbExt(); anExtID++)
if (isFound)
{
ClearSolutions();
- myIsPar = Standard_False;
+ myIsParallel = Standard_False;
for (Standard_Integer anExtID = 1; anExtID <= ExtPCir.NbExt(); anExtID++)
{
mypoints.Append(ExtPCir.Point(anExtID));
}
}
}
+ else
+ {
+ //Case like this:
+ // ************** Cir1
+ // o
+ // o
+ // *********** Cir2
+ //
+ //Take minimal trimmed distance
+ myIsParallel = Standard_False;
+ Standard_Real aDmin, aDists[4] = { mydist11, mydist12, mydist21, mydist22 };
+ Extrema_POnCurv aP1, aP2;
+ aDmin = aDists[0];
+ Standard_Integer k, imin = 0;
+ for (k = 1; k < 4; ++k)
+ {
+ if (aDmin > aDists[k])
+ {
+ aDmin = aDists[k];
+ imin = k;
+ }
+ }
+ if (aDmin <= aMinSquareDist + 10.* Epsilon(1. + aDmin))
+ {
+ if (imin == 0)
+ {
+ aP1.SetValues(myInf[0], myP1f);
+ aP2.SetValues(myInf[1], myP2f);
+ }
+ else if (imin == 1)
+ {
+ aP1.SetValues(myInf[0], myP1f);
+ aP2.SetValues(mySup[1], myP2l);
+ }
+ else if (imin == 2)
+ {
+ aP1.SetValues(mySup[0], myP1l);
+ aP2.SetValues(myInf[1], myP2f);
+ }
+ else
+ {
+ aP1.SetValues(mySup[0], myP1l);
+ aP2.SetValues(mySup[1], myP2l);
+ }
+ ClearSolutions();
+ mypoints.Append(aP1);
+ mypoints.Append(aP2);
+ mySqDist.Append(aDmin);
+ aMinSquareDist = Min(aMinSquareDist, aDmin);
+ }
+ }
aProjRng1.Shift(M_PI);
}
}
myDone = AlgExt.IsDone();
if (myDone) {
- myIsPar = AlgExt.IsParallel();
- if (myIsPar) {
+ myIsParallel = AlgExt.IsParallel();
+ if (myIsParallel) {
PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance());
}
else {
myDone = AlgExt.IsDone();
if (myDone)
{
- myIsPar = AlgExt.IsParallel();
- if (myIsPar)
+ myIsParallel = AlgExt.IsParallel();
+ if (myIsParallel)
{
PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance());
}
DEFINE_STANDARD_ALLOC
- Standard_EXPORT Extrema_ExtCC(const Standard_Real TolC1 = 1.0e-10, const Standard_Real TolC2 = 1.0e-10);
+ Standard_EXPORT Extrema_ExtCC(const Standard_Real TolC1 = 1.0e-10,
+ const Standard_Real TolC2 = 1.0e-10);
//! It calculates all the distances.
- Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1, const Adaptor3d_Curve& C2, const Standard_Real TolC1 = 1.0e-10, const Standard_Real TolC2 = 1.0e-10);
+ Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1,
+ const Adaptor3d_Curve& C2,
+ const Standard_Real TolC1 = 1.0e-10,
+ const Standard_Real TolC2 = 1.0e-10);
//! It calculates all the distances.
- Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1, const Adaptor3d_Curve& C2, const Standard_Real U1, const Standard_Real U2, const Standard_Real V1, const Standard_Real V2, const Standard_Real TolC1 = 1.0e-10, const Standard_Real TolC2 = 1.0e-10);
+ Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1,
+ const Adaptor3d_Curve& C2,
+ const Standard_Real U1,
+ const Standard_Real U2,
+ const Standard_Real V1,
+ const Standard_Real V2,
+ const Standard_Real TolC1 = 1.0e-10,
+ const Standard_Real TolC2 = 1.0e-10);
//! Initializes but does not perform algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C1,
Standard_EXPORT void SetCurve (const Standard_Integer theRank, const Adaptor3d_Curve& C);
- Standard_EXPORT void SetCurve (const Standard_Integer theRank, const Adaptor3d_Curve& C, const Standard_Real Uinf, const Standard_Real Usup);
+ Standard_EXPORT void SetCurve (const Standard_Integer theRank,
+ const Adaptor3d_Curve& C,
+ const Standard_Real Uinf,
+ const Standard_Real Usup);
- Standard_EXPORT void SetRange (const Standard_Integer theRank, const Standard_Real Uinf, const Standard_Real Usup);
+ Standard_EXPORT void SetRange (const Standard_Integer theRank,
+ const Standard_Real Uinf,
+ const Standard_Real Usup);
Standard_EXPORT void SetTolerance (const Standard_Integer theRank, const Standard_Real Tol);
//! Returns the points of the Nth extremum distance.
//! P1 is on the first curve, P2 on the second one.
- Standard_EXPORT void Points (const Standard_Integer N, Extrema_POnCurv& P1, Extrema_POnCurv& P2) const;
+ Standard_EXPORT void Points (const Standard_Integer N,
+ Extrema_POnCurv& P1,
+ Extrema_POnCurv& P2) const;
//! if the curve is a trimmed curve,
//! dist11 is a square distance between the point on C1
//! of parameter FirstParameter and the point of
//! parameter FirstParameter on C2.
- Standard_EXPORT void TrimmedSquareDistances (Standard_Real& dist11, Standard_Real& distP12, Standard_Real& distP21, Standard_Real& distP22, gp_Pnt& P11, gp_Pnt& P12, gp_Pnt& P21, gp_Pnt& P22) const;
+ Standard_EXPORT void TrimmedSquareDistances (Standard_Real& dist11,
+ Standard_Real& distP12,
+ Standard_Real& distP21,
+ Standard_Real& distP22,
+ gp_Pnt& P11,
+ gp_Pnt& P12,
+ gp_Pnt& P21,
+ gp_Pnt& P22) const;
//! Set flag for single extrema computation. Works on parametric solver only.
Standard_EXPORT void SetSingleSolutionFlag (const Standard_Boolean theSingleSolutionFlag);
Standard_Boolean myIsFindSingleSolution; // Default value is false.
Extrema_ECC myECC;
Standard_Boolean myDone;
- Standard_Boolean myIsPar;
+ Standard_Boolean myIsParallel;
Extrema_SequenceOfPOnCurv mypoints;
TColStd_SequenceOfReal mySqDist;
const Adaptor3d_Curve* myC[2];
Standard_Real myInf[2];
Standard_Real mySup[2];
Standard_Real myTol[2];
- gp_Pnt P1f;
- gp_Pnt P1l;
- gp_Pnt P2f;
- gp_Pnt P2l;
+ gp_Pnt myP1f;
+ gp_Pnt myP1l;
+ gp_Pnt myP2f;
+ gp_Pnt myP2l;
Standard_Real mydist11;
Standard_Real mydist12;
Standard_Real mydist21;
--- /dev/null
+puts "========"
+puts "0026269: Modeling Data - Analytical extrema does not take into account trimmed input data"
+puts "========"
+puts ""
+
+#case 1
+line l1 0 0 0 1 0 0
+line l2 2 2 0 1 0 0
+trim l1 l1 0 1
+trim l2 l2 0 1
+
+set res_extrema [extrema l1 l2]
+
+if { [regexp "Infinite number of extremas" $res_extrema] == 0} {
+ if {[llength $res_extrema] != 1} {
+ puts "Error : expected 1 extrema, but found [llength $res_extrema]"
+ }
+} else {
+ puts "Error : Infinite number of extremas is found"
+}
+
+smallview +X+Y
+fit
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file
--- /dev/null
+puts "========"
+puts "0026269: Modeling Data - Analytical extrema does not take into account trimmed input data"
+puts "========"
+puts ""
+
+#case 2
+circle c1 0 0 0 10
+circle c2 0 0 0 5
+trim c1 c1 0 1
+trim c2 c2 3 4
+
+set res_extrema [extrema c1 c2]
+
+if { [regexp "Infinite number of extremas" $res_extrema] == 0} {
+ if {[llength $res_extrema] != 1} {
+ puts "Error : expected 1 extrema, but found [llength $res_extrema]"
+ }
+} else {
+ puts "Error : Infinite number of extremas is found"
+}
+
+smallview +X+Y
+fit
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
trim c1 c1 0 3
trim c2 c2 4 6
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1
-checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0
+extrema c1 c2
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2
-checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
+
+renamevar ext_1 e1
+extrema c2 c1
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
trim c1 c1 0 3
trim c2 c2 -3.2 -1.2
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1
-checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0
+extrema c1 c2
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2
-checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
+
+renamevar ext_1 e1
+extrema c2 c1
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
\ No newline at end of file
# However, they are bounded (trimmed) curves
# and are shifted relatively to each other.
-set ExpDist 150.0
-
circle c1 0 0 0 0 0 1 100
circle c2 0 0 0 0 0 1 50
trim c1 c1 0 3
trim c2 c2 -3.1 -1.1
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1
-checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0
+extrema c1 c2
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
+
+renamevar ext_1 e1
+extrema c2 c1
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2
-checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
# However, they are bounded (trimmed) curves
# and are shifted relatively to each other.
-set ExpDist 150.0
circle c1 0 0 0 0 0 1 100
circle c2 0 0 0 0 0 1 50
trim c1 c1 0 3
trim c2 c2 -9.5 -7.5
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1
-checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0
+extrema c1 c2
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2
-checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
+
+renamevar ext_1 e1
+extrema c2 c1
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
trim c1 c1 0 3
trim c2 c2 -8.3 -6.3
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1
-checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0
+extrema c1 c2
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2
-checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
+
+renamevar ext_1 e1
+extrema c2 c1
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
# However, they are bounded (trimmed) curves
# and are shifted relatively to each other.
-set ExpDist 150.0
circle c1 0 0 0 0 0 1 100
circle c2 0 0 0 0 0 1 50
trim c1 c1 0 3
trim c2 c2 3.1 5.1
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1
-checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0
+extrema c1 c2
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2
-checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
+
+renamevar ext_1 e1
+extrema c2 c1
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
trim c1 c1 0 1
trim c2 c2 0 1
-if { ![regexp {No solutions!} [extrema c1 c2] ] } {
+extrema c1 c2
+
+if { ![isdraw ext_1 ] } {
puts "Error in Extrema-algorithm"
} else {
puts "Extrema-algorithm works properly"
}
+renamevar ext_1 e1
+extrema c2 c1
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
trim c1 c1 0 pi
trim c2 c2 -9.4 -7.4
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1
-checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0
+extrema c1 c2
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2
-checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
+
+renamevar ext_1 e1
+extrema c2 c1
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
trim c1 c1 3 6.5
trim c2 c2 4 6
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1
-checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0
+extrema c1 c2
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
+
+renamevar ext_1 e1
+extrema c2 c1
+
+if { ![isdraw ext_1 ] } {
+ puts "Error in Extrema-algorithm"
+} else {
+ puts "Extrema-algorithm works properly"
+}
-regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2
-checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0
trim c1 c1 -1.0e100 5
trim c2 c2 10 20
-if { ![regexp {No solutions!} [extrema c1 c2] ] } {
+extrema c1 c2
+
+if { ![isdraw ext_1 ] } {
puts "Error in Extrema-algorithm"
} else {
puts "Extrema-algorithm works properly"
}
-if { ![regexp {No solutions!} [extrema c2 c1] ] } {
+renamevar ext_1 e1
+extrema c2 c1
+
+if { ![isdraw ext_1 ] } {
puts "Error in Extrema-algorithm"
} else {
puts "Extrema-algorithm works properly"
-}
+}
\ No newline at end of file