break;
case GeomAbs_Plane:
myExtElCS.Perform(C.Line(), myS->Plane());
- if (myExtElCS.IsParallel()) break;
+ if (myExtElCS.IsParallel() || myExtElCS.NbExt() > 0) break;
case GeomAbs_Torus:
case GeomAbs_Cone:
mySqDist->SetValue(1, S.SquareDistance(C));
myIsPar = Standard_True;
}
- else {
+ else
+ {
myNbExt = 0;
- }
-
+
+ IntAna_IntConicQuad anInter(C, S,
+ Precision::Angular(),
+ Precision::Confusion());
+ if(anInter.IsDone())
+ {
+ myNbExt = anInter.NbPoints();
+ }
+
+ if(myNbExt == 0)
+ return;
+
+ myPoint1 = new Extrema_HArray1OfPOnCurv(1, myNbExt);
+ mySqDist = new TColStd_HArray1OfReal(1, myNbExt);
+ myPoint2 = new Extrema_HArray1OfPOnSurf(1, myNbExt);
+
+ Standard_Real aUSurf = 0.0, aVSurf = 0.0;
+ Extrema_POnCurv aPOnC;
+ Extrema_POnSurf aPOnS;
+
+ const gp_Pnt& aPC = anInter.Point(1);
+ aPOnC.SetValues(anInter.ParamOnConic(1), aPC);
+ myPoint1->SetValue(1, aPOnC);
+
+ ElSLib::PlaneParameters(S.Position(), aPC, aUSurf, aVSurf);
+ const gp_Pnt aPS(ElSLib::PlaneValue(aUSurf, aVSurf, S.Position()));
+ aPOnS.SetParameters(aUSurf, aVSurf, aPS);
+ myPoint2->SetValue(1, aPOnS);
+ mySqDist->SetValue(1, 0.0);
+ }
}
---C++: inline
is static;
- Parameter (me : mutable; theU, theV: Real from Standard; theP : Pnt from gp)
- ---Purpose: Sets the params of current POnSurf instance.
- -- (e.g. to the point to be projected).
- ---C++: inline
- is static;
-
+ SetParameters(me: in out;
+ theU, theV: Real from Standard;
+ thePnt: Pnt from gp);
+ ---Purpose: Sets the params of current POnSurf instance.
+ -- (e.g. to the point to be projected).
+ ---C++: inline
fields
myU: Real;
{
gp_Pnt P1,P2;
Ex.Points(i,P1,P2);
- if (P1.Distance(P2) < 1.e-16) continue;
+ if (P1.Distance(P2) < 1.e-16)
+ {
+ di << "Extrema " << i << " is point : " << P1.X() << " " << P1.Y() << " " << P1.Z() << "\n";
+ continue;
+ }
Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2));
Handle(Geom_TrimmedCurve) CT =
new Geom_TrimmedCurve(L, 0., P1.Distance(P2));
{
gp_Pnt P1,P2;
Ex.Points(i,P1,P2);
- if (P1.Distance(P2) < 1.e-16) continue;
+ if (P1.Distance(P2) < 1.e-16)
+ {
+ di << "Extrema " << i << " is point : " << P1.X() << " " << P1.Y() << " " << P1.Z() << "\n";
+ continue;
+ }
Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2));
Handle(Geom_TrimmedCurve) CT =
new Geom_TrimmedCurve(L, 0., P1.Distance(P2));
gp_Pnt P1,P2;
Ex.Points(i,P1,P2);
if (P1.Distance(P2) < 1.e-16)
+ {
+ di << "Extrema " << i << " is point : " << P1.X() << " " << P1.Y() << " " << P1.Z() << "\n";
continue;
+ }
Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2));
Handle(Geom_TrimmedCurve) CT =
dlog reset
dlog on
xdistcs c s 3.140212946671221 3.142972360508366 10
-set Log [dlog get]
-
-set List [split ${Log} {TD= \t\n}]
-set Tolerance 1.0e-6
-set D_good 0.
-set Limit_Tol 1.0e-6
-checkList ${List} ${Tolerance} ${D_good} ${Limit_Tol}
set tol_rel 1.0e-6
checkreal "length of ext_1" ${ext_1_length} ${good_length} ${tol_abs} ${tol_rel}
-dlog reset
-dlog on
xdistcs c s 1.57079 1.5708 10
-set Log [dlog get]
-
-set List [split ${Log} {TD= \t\n}]
-set Tolerance 1.0e-6
-set D_good 0.
-set Limit_Tol 1.0e-6
-checkList ${List} ${Tolerance} ${D_good} ${Limit_Tol}