1 // File: IntPatch_GLine.cxx
2 // Created: Mon Apr 6 11:17:45 1992
3 // Author: Jacques GOUSSARD
4 // Copyright: OPEN CASCADE 1992
6 #include <IntPatch_GLine.ixx>
10 // modified by Edward AGAPOV (eap) Wed Mar 6 2002 (bug occ212)
11 // -- case: points with equal params == PI/2
13 //-- Precision::PConfusion()*1000.0 -> 1e-6
14 //#define PrecisionPConfusion ( Precision::PConfusion()*1000.0 )
18 //=======================================================================
19 //function : IntPatch_GLine
20 //purpose : Creates a Line as intersection line
21 // when the transitions are In or Out.
22 //=======================================================================
24 IntPatch_GLine::IntPatch_GLine (const gp_Lin& L,
25 const Standard_Boolean Tang,
26 const IntSurf_TypeTrans Trans1,
27 const IntSurf_TypeTrans Trans2) :
28 IntPatch_Line(Tang,Trans1,Trans2),
30 fipt(Standard_False),lapt(Standard_False),
34 pos = gp_Pln(L.Location(),L.Direction()).Position().Ax2();
37 //=======================================================================
38 //function : IntPatch_GLine
39 //purpose : Creates a Line as intersection line
40 // when the transitions are Touch.
41 //=======================================================================
43 IntPatch_GLine::IntPatch_GLine (const gp_Lin& L,
44 const Standard_Boolean Tang,
45 const IntSurf_Situation Situ1,
46 const IntSurf_Situation Situ2) :
47 IntPatch_Line(Tang,Situ1,Situ2),
49 fipt(Standard_False),lapt(Standard_False),
53 pos = gp_Pln(L.Location(),L.Direction()).Position().Ax2();
56 //=======================================================================
57 //function : IntPatch_GLine
58 //purpose : Creates a Line as intersection line
59 // when the transitions are Undecided.
60 //=======================================================================
62 IntPatch_GLine::IntPatch_GLine (const gp_Lin& L,
63 const Standard_Boolean Tang) :
66 fipt(Standard_False),lapt(Standard_False),
70 pos = gp_Pln(L.Location(),L.Direction()).Position().Ax2();
73 //=======================================================================
74 //function : IntPatch_GLine
75 //purpose : Creates a circle as intersection line
76 // when the transitions are In or Out.
77 //=======================================================================
79 IntPatch_GLine::IntPatch_GLine (const gp_Circ& C,
80 const Standard_Boolean Tang,
81 const IntSurf_TypeTrans Trans1,
82 const IntSurf_TypeTrans Trans2) :
83 IntPatch_Line(Tang,Trans1,Trans2),
85 par1(C.Radius()), par2(0.0),
86 fipt(Standard_False),lapt(Standard_False),
89 typ = IntPatch_Circle;
92 //=======================================================================
93 //function : IntPatch_GLine
94 //purpose : Creates a circle as intersection line
95 // when the transitions are Touch.
96 //=======================================================================
98 IntPatch_GLine::IntPatch_GLine (const gp_Circ& C,
99 const Standard_Boolean Tang,
100 const IntSurf_Situation Situ1,
101 const IntSurf_Situation Situ2) :
102 IntPatch_Line(Tang,Situ1,Situ2),
104 par1(C.Radius()), par2(0.0),
105 fipt(Standard_False),lapt(Standard_False),
108 typ = IntPatch_Circle;
111 //=======================================================================
112 //function : IntPatch_GLine
113 //purpose : Creates a circle as intersection line
114 // when the transitions are Undecided.
115 //=======================================================================
117 IntPatch_GLine::IntPatch_GLine (const gp_Circ& C,
118 const Standard_Boolean Tang) :
121 par1(C.Radius()), par2(0.0),
122 fipt(Standard_False),lapt(Standard_False),
125 typ = IntPatch_Circle;
128 //=======================================================================
129 //function : IntPatch_GLine
130 //purpose : Creates an ellipse as intersection line
131 // when the transitions are In or Out.
132 //=======================================================================
134 IntPatch_GLine::IntPatch_GLine (const gp_Elips& E,
135 const Standard_Boolean Tang,
136 const IntSurf_TypeTrans Trans1,
137 const IntSurf_TypeTrans Trans2) :
138 IntPatch_Line(Tang,Trans1,Trans2),
140 par1(E.MajorRadius()),
141 par2(E.MinorRadius()),
142 fipt(Standard_False),lapt(Standard_False),
145 typ = IntPatch_Ellipse;
148 //=======================================================================
149 //function : IntPatch_GLine
150 //purpose : Creates an ellispe as intersection line
151 // when the transitions are Touch.
152 //=======================================================================
154 IntPatch_GLine::IntPatch_GLine (const gp_Elips& E,
155 const Standard_Boolean Tang,
156 const IntSurf_Situation Situ1,
157 const IntSurf_Situation Situ2) :
158 IntPatch_Line(Tang,Situ1,Situ2),
160 par1(E.MajorRadius()),
161 par2(E.MinorRadius()),
162 fipt(Standard_False),lapt(Standard_False),
165 typ = IntPatch_Ellipse;
168 //=======================================================================
169 //function : IntPatch_GLine
170 //purpose : Creates an ellipse as intersection line
171 // when the transitions are Undecided.
172 //=======================================================================
174 IntPatch_GLine::IntPatch_GLine (const gp_Elips& E,
175 const Standard_Boolean Tang) :
178 par1(E.MajorRadius()),
179 par2(E.MinorRadius()),
180 fipt(Standard_False),lapt(Standard_False),
183 typ = IntPatch_Ellipse;
186 //=======================================================================
187 //function : IntPatch_GLine
188 //purpose : Creates a parabola as intersection line
189 // when the transitions are In or Out.
190 //=======================================================================
192 IntPatch_GLine::IntPatch_GLine (const gp_Parab& P,
193 const Standard_Boolean Tang,
194 const IntSurf_TypeTrans Trans1,
195 const IntSurf_TypeTrans Trans2) :
196 IntPatch_Line(Tang,Trans1,Trans2),
198 par1(P.Focal()), par2(0.0),
199 fipt(Standard_False),lapt(Standard_False),
202 typ = IntPatch_Parabola;
205 //=======================================================================
206 //function : IntPatch_GLine
207 //purpose : Creates a parabola as intersection line
208 // when the transitions are Touch.
209 //=======================================================================
211 IntPatch_GLine::IntPatch_GLine (const gp_Parab& P,
212 const Standard_Boolean Tang,
213 const IntSurf_Situation Situ1,
214 const IntSurf_Situation Situ2) :
215 IntPatch_Line(Tang,Situ1,Situ2),
217 par1(P.Focal()), par2(0.0),
218 fipt(Standard_False),lapt(Standard_False),
221 typ = IntPatch_Parabola;
224 //=======================================================================
225 //function : IntPatch_GLine
226 //purpose : Creates a parabola as intersection line
227 // when the transitions are Undecided.
228 //=======================================================================
230 IntPatch_GLine::IntPatch_GLine (const gp_Parab& P,
231 const Standard_Boolean Tang) :
234 par1(P.Focal()), par2(0.0),
235 fipt(Standard_False),lapt(Standard_False),
238 typ = IntPatch_Parabola;
241 //=======================================================================
242 //function : IntPatch_GLine
243 //purpose : Creates an hyperbola as intersection line
244 // when the transitions are In or Out.
245 //=======================================================================
247 IntPatch_GLine::IntPatch_GLine (const gp_Hypr& H,
248 const Standard_Boolean Tang,
249 const IntSurf_TypeTrans Trans1,
250 const IntSurf_TypeTrans Trans2) :
251 IntPatch_Line(Tang,Trans1,Trans2),
253 par1(H.MajorRadius()),
254 par2(H.MinorRadius()),
255 fipt(Standard_False),lapt(Standard_False),
258 typ = IntPatch_Hyperbola;
261 //=======================================================================
262 //function : IntPatch_GLine
263 //purpose : Creates an hyperbola as intersection line
264 // when the transitions are Touch.
265 //=======================================================================
267 IntPatch_GLine::IntPatch_GLine (const gp_Hypr& H,
268 const Standard_Boolean Tang,
269 const IntSurf_Situation Situ1,
270 const IntSurf_Situation Situ2) :
271 IntPatch_Line(Tang,Situ1,Situ2),
273 par1(H.MajorRadius()),
274 par2(H.MinorRadius()),
275 fipt(Standard_False),lapt(Standard_False),
278 typ = IntPatch_Hyperbola;
281 //=======================================================================
282 //function : IntPatch_GLine
283 //purpose : Creates an hyperbola as intersection line
284 // when the transitions are Undecided.
285 //=======================================================================
287 IntPatch_GLine::IntPatch_GLine (const gp_Hypr& H,
288 const Standard_Boolean Tang) :
291 par1(H.MajorRadius()),
292 par2(H.MinorRadius()),
293 fipt(Standard_False),lapt(Standard_False),
296 typ = IntPatch_Hyperbola;
299 //=======================================================================
301 //purpose : To replace the element of range Index in the list
303 //=======================================================================
305 void IntPatch_GLine::Replace (const Standard_Integer /*Index*/,
306 const IntPatch_Point& Pnt)
309 //-- svtx(Index) = Pnt;
312 //=======================================================================
313 //function : AddVertex
314 //purpose : To add a vertex in the list.
315 //=======================================================================
317 void IntPatch_GLine::AddVertex (const IntPatch_Point& Pnt)
319 //-- On detecte le cas de 2 points 3d identiques
320 //-- pour les ramener au meme parametre sur la
324 const Standard_Real pf = (fipt? svtx.Value(indf).ParameterOnLine() : 0.0);
325 const Standard_Real pl = (lapt? svtx.Value(indl).ParameterOnLine() : 0.0);
326 Standard_Real par = Pnt.ParameterOnLine();
327 if(ArcType()==IntPatch_Circle || ArcType()==IntPatch_Ellipse)
330 while(par<pf) par+=M_PI+M_PI;
331 while(par>pl) par-=M_PI+M_PI;
333 const Standard_Real PrecisionPConfusion ( Precision::PConfusion()*1000.0 );
334 if((pf-par)>PrecisionPConfusion) {
338 IntPatch_Point ParModif = Pnt;
339 ParModif.SetParameter(par);
340 svtx.Append(ParModif);
355 //=======================================================================
356 //function : ComputeVertexParameters
357 //purpose : Set the parameters of all the vertex on the line.
358 // if a vertex is already in the line,
359 // its parameter is modified
360 // else a new point in the line is inserted.
361 //=======================================================================
363 void IntPatch_GLine::ComputeVertexParameters(const Standard_Real /*Tol*/)
365 Standard_Boolean SortIsOK,APointDeleted;
366 Standard_Boolean SortAgain = Standard_True;
367 Standard_Integer i,j;
368 const Standard_Real ParamMinOnLine = (fipt? Vertex(indf).ParameterOnLine() : -100000.0);
369 const Standard_Real ParamMaxOnLine = (lapt? Vertex(indl).ParameterOnLine() : 100000.0);
371 //----------------------------------------------------------
372 //-- F i l t r e s u r r e s t r i c t i o n s --
373 //----------------------------------------------------------
374 //-- deux vertex sur la meme restriction et seulement
375 //-- sur celle ci ne doivent pas avoir le meme parametre
376 //==========================================================
377 //-- 2 vertices on the same restriction and only
378 //-- on that one must not have the same parametres
380 Standard_Integer nbvtx = NbVertex();
382 const Standard_Real PrecisionPConfusion ( Precision::PConfusion()*1000.0 );
385 APointDeleted = Standard_False;
386 for(i=1; (i<=nbvtx) && (!APointDeleted); i++)
388 const IntPatch_Point& VTXi = svtx.Value(i);
389 if(VTXi.IsOnDomS1() || VTXi.IsOnDomS2())
391 for(j=1; (j<=nbvtx) && (!APointDeleted); j++)
395 const IntPatch_Point& VTXj = svtx.Value(j);
396 if((!VTXj.IsOnDomS1()) && (!VTXj.IsOnDomS2()))
398 if(Abs(VTXi.ParameterOnLine()-VTXj.ParameterOnLine())<=PrecisionPConfusion)
402 if(lapt) { if(indl>j) indl--; }
403 if(fipt) { if(indf>j) indf--; }
404 APointDeleted = Standard_True;
412 while(APointDeleted && nbvtx > 2);
415 APointDeleted = Standard_False;
416 for(i=1; (i<=nbvtx) && (!APointDeleted); i++)
418 const IntPatch_Point& VTXi = svtx.Value(i);
419 if(VTXi.IsOnDomS1() && (!VTXi.IsOnDomS2()))
421 for(j=1; (j<=nbvtx) && (!APointDeleted); j++)
425 const IntPatch_Point& VTXj = svtx.Value(j);
426 if(VTXj.IsOnDomS1() && (!VTXj.IsOnDomS2()))
428 if(Abs(VTXi.ParameterOnArc1()-VTXj.ParameterOnArc1())<=PrecisionPConfusion)
430 if(VTXi.ArcOnS1() == VTXj.ArcOnS1())
432 if(VTXi.IsVertexOnS1())
436 if(lapt) { if(indl>j) indl--; }
437 if(fipt) { if(indf>j) indf--; }
443 if(lapt) { if(indl>i) indl--; }
444 if(fipt) { if(indf>i) indf--; }
446 APointDeleted = Standard_True;
455 while(APointDeleted);
458 APointDeleted = Standard_False;
459 for(i=1; (i<=nbvtx) && (!APointDeleted); i++)
461 const IntPatch_Point& VTXi = svtx.Value(i);
462 if(VTXi.IsOnDomS2() && (!VTXi.IsOnDomS1()))
464 for(j=1; (j<=nbvtx) && (!APointDeleted); j++)
468 const IntPatch_Point& VTXj = svtx.Value(j);
469 if(VTXj.IsOnDomS2() && (!VTXj.IsOnDomS1()))
471 if(Abs(VTXi.ParameterOnArc2()-VTXj.ParameterOnArc2())<=PrecisionPConfusion)
473 if(VTXi.ArcOnS2() == VTXj.ArcOnS2())
475 if(VTXi.IsVertexOnS1())
479 if(lapt) { if(indl>j) indl--; }
480 if(fipt) { if(indf>j) indf--; }
486 if(lapt) { if(indl>i) indl--; }
487 if(fipt) { if(indf>i) indf--; }
489 APointDeleted = Standard_True;
498 while(APointDeleted);
501 //----------------------------------------------------------
502 //-- Tri des vertex et suppression des Vtx superflus
504 //// modified by jgv, 2.11.01 for BUC61033 ////
505 Standard_Real u1min = RealLast(), u1max = RealFirst();
506 Standard_Real u2min = RealLast(), u2max = RealFirst();
507 Standard_Boolean ToBreak = Standard_False;
508 ///////////////////////////////////////////////
515 SortIsOK = Standard_True;
516 for(i=2; i<=nbvtx; i++)
518 if(svtx.Value(i-1).ParameterOnLine() > svtx.Value(i).ParameterOnLine())
520 SortIsOK = Standard_False;
521 svtx.Exchange(i-1,i);
522 if(fipt) { if(indf==i) indf=i-1; else if(indf==i-1) indf=i; }
523 if(lapt) { if(indl==i) indl=i-1; else if(indl==i-1) indl=i; }
530 //// modified by jgv, 2.11.01 for BUC61033 ////
533 ///////////////////////////////////////////////
535 SortAgain = Standard_False;
536 SortIsOK = Standard_True;
537 for(i=2; i<=nbvtx && SortIsOK; i++) {
538 IntPatch_Point& VTX = svtx.ChangeValue(i);
539 for(j=1; j<=nbvtx && SortIsOK; j++) {
541 IntPatch_Point& VTXM1 = svtx.ChangeValue(j);
542 Standard_Boolean kill = Standard_False;
543 Standard_Boolean killm1 = Standard_False;
544 if(Abs(VTXM1.ParameterOnLine()-VTX.ParameterOnLine())<PrecisionPConfusion) {
545 if(VTXM1.IsOnDomS1() && VTX.IsOnDomS1()) { //-- OnS1 OnS1
546 if(VTXM1.ArcOnS1() == VTX.ArcOnS1()) { //-- OnS1 == OnS1
547 if(VTXM1.IsOnDomS2()) { //-- OnS1 == OnS1 OnS2
548 if(VTX.IsOnDomS2()==Standard_False) { //-- OnS1 == OnS1 OnS2 PasOnS2
552 if(VTXM1.ArcOnS2() == VTX.ArcOnS2()) { //-- OnS1 == OnS1 OnS2 == OnS2
553 if(VTXM1.IsVertexOnS2()) {
557 killm1=Standard_True;
562 else { //-- OnS1 == OnS1 PasOnS2
563 if(VTX.IsOnDomS2()) { //-- OnS1 == OnS1 PasOnS2 OnS2
564 killm1=Standard_True;
569 else { //-- Pas OnS1 et OnS1
570 if(VTXM1.IsOnDomS2()==Standard_False && VTX.IsOnDomS2()==Standard_False) {
571 if(VTXM1.IsOnDomS1() && VTX.IsOnDomS1()==Standard_False) {
574 else if(VTX.IsOnDomS1() && VTXM1.IsOnDomS1()==Standard_False) {
575 killm1=Standard_True;
580 if(!(kill || killm1)) {
581 if(VTXM1.IsOnDomS2() && VTX.IsOnDomS2()) { //-- OnS2 OnS2
582 if(VTXM1.ArcOnS2() == VTX.ArcOnS2()) { //-- OnS2 == OnS2
583 if(VTXM1.IsOnDomS1()) { //-- OnS2 == OnS2 OnS1
584 if(VTX.IsOnDomS1()==Standard_False) { //-- OnS2 == OnS2 OnS1 PasOnS1
588 if(VTXM1.ArcOnS1() == VTX.ArcOnS1()) { //-- OnS2 == OnS2 OnS1 == OnS1
589 if(VTXM1.IsVertexOnS1()) {
590 kill=Standard_True; //-- OnS2 == OnS2 OnS1 == OnS1 Vtx PasVtx
593 killm1=Standard_True; //-- OnS2 == OnS2 OnS1 == OnS1 PasVtx Vtx
598 else { //-- OnS2 == OnS2 PasOnS1
599 if(VTX.IsOnDomS1()) { //-- OnS2 == OnS2 PasOnS1 OnS1
600 killm1=Standard_True;
605 else { //-- Pas OnS2 et OnS2
606 if(VTXM1.IsOnDomS1()==Standard_False && VTX.IsOnDomS1()==Standard_False) {
607 if(VTXM1.IsOnDomS2() && VTX.IsOnDomS2()==Standard_False) {
610 else if(VTX.IsOnDomS2() && VTXM1.IsOnDomS2()==Standard_False) {
611 killm1=Standard_True;
618 SortIsOK = Standard_False;
619 if(lapt) { if(indl>i) indl--; else if(indl==i) indl=j; }
620 if(fipt) { if(indf>i) indf--; else if(indf==i) indf=j; }
625 SortIsOK = Standard_False;
626 if(lapt) { if(indl>j) indl--; else if(indl==j) indl=i-1;}
627 if(fipt) { if(indf>j) indf--; else if(indf==j) indf=i-1;}
632 else if(ArcType()==IntPatch_Circle || ArcType()==IntPatch_Ellipse) { // eap
633 //-- deux points de meme parametre qui ne peuvent etre confondus
634 //-- On change les parametres d un des points si les points UV sont
635 //-- differents. Ceci distingue le cas des aretes de couture.
636 // ==========================================================
637 //-- 2 points with the same parameters
638 //-- Change parametres of one point if points UV are
639 //-- different. This is the case of seam edge
640 Standard_Real ponline = VTX.ParameterOnLine();
642 Standard_Real newParam = ponline;
643 const Standard_Real PiPi = M_PI+M_PI;
644 Standard_Boolean is2PI = ( Abs(ponline-PiPi) <= PrecisionPConfusion );
646 if (nbvtx > 2 && // do this check if seam edge only gives vertices
647 !is2PI) // but always change 2PI -> 0
652 else if (Abs(ponline) <= PrecisionPConfusion)
656 // if( (Abs(ponline)<=PrecisionPConfusion)
657 // ||(Abs(ponline-M_PI-M_PI) <=PrecisionPConfusion))
659 Standard_Real u1a,v1a,u2a,v2a,u1b,v1b,u2b,v2b;
660 VTXM1.Parameters(u1a,v1a,u2a,v2a);
661 VTX.Parameters(u1b,v1b,u2b,v2b);
662 Standard_Integer flag = 0;
664 if( (Abs(u1a-u1b)<=PrecisionPConfusion) ) flag|=1;
665 if( (Abs(v1a-v1b)<=PrecisionPConfusion) ) flag|=2;
666 if( (Abs(u2a-u2b)<=PrecisionPConfusion) ) flag|=4;
667 if( (Abs(v2a-v2b)<=PrecisionPConfusion) ) flag|=8;
668 Standard_Boolean TestOn1 = Standard_False;
669 Standard_Boolean TestOn2 = Standard_False;
671 case 3: //-- meme point U1 V1
672 case 7: //-- meme point U1 V1 meme U2
673 case 12: //-- meme U2 V2
674 case 13: //-- meme point U1 meme U2 V2
675 case 10: //-- meme point V1 meme V2 Test si U1a=U1b Mod 2PI et Test si U2a=U2b Mod 2PI
677 case 11: //-- meme point U1 V1 meme V2 Test si U2a=U2b Mod 2PI
678 { TestOn2 = Standard_True; break; }
679 case 14: //-- meme point V1 meme U2 V2 Test si U1a=U1b Mod 2PI
680 { TestOn1 = Standard_True; break; }
684 //if(ArcType()==IntPatch_Circle || ArcType()==IntPatch_Ellipse) {}
686 //// modified by jgv, 2.11.01 for BUC61033 ////
687 Standard_Real U1A = (u1a < u1b)? u1a : u1b;
688 Standard_Real U1B = (u1a < u1b)? u1b : u1a;
689 if (u1min == RealLast())
696 if (Abs(U1A-u1min) > PrecisionPConfusion)
697 ToBreak = Standard_True;
698 if (Abs(U1B-u1max) > PrecisionPConfusion)
699 ToBreak = Standard_True;
701 ///////////////////////////////////////////////
703 // if (Abs(ponline) <= PrecisionPConfusion) {
704 // const Standard_Real PiPi = M_PI+M_PI;
705 if(newParam >= ParamMinOnLine && newParam <= ParamMaxOnLine
706 /*PiPi >= ParamMinOnLine && PiPi<=ParamMaxOnLine*/) {
707 SortAgain = Standard_True;
708 SortIsOK = Standard_False;
709 if (newParam > ponline)
710 if(u1a < u1b) { VTX.SetParameter(newParam); }
711 else { VTXM1.SetParameter(newParam); }
713 if(u1a > u1b) { VTX.SetParameter(newParam); }
714 else { VTXM1.SetParameter(newParam); }
718 // if(0.0 >= ParamMinOnLine && 0.0<=ParamMaxOnLine) {
719 // SortAgain = Standard_True;
720 // SortIsOK = Standard_False;
721 // if(u1a > u1b) { VTX.SetParameter(0.0); }
722 // else { VTXM1.SetParameter(0.0); }
728 //// modified by jgv, 2.11.01 for BUC61033 ////
729 Standard_Real U2A = (u2a < u2b)? u2a : u2b;
730 Standard_Real U2B = (u2a < u2b)? u2b : u2a;
731 if (u2min == RealLast())
738 if (Abs(U2A-u2min) > PrecisionPConfusion)
739 ToBreak = Standard_True;
740 if (Abs(U2B-u2max) > PrecisionPConfusion)
741 ToBreak = Standard_True;
743 ///////////////////////////////////////////////
745 // if (Abs(ponline) <= PrecisionPConfusion) {
746 // const Standard_Real PiPi = M_PI+M_PI;
747 if(newParam >= ParamMinOnLine && newParam <= ParamMaxOnLine
748 /*PiPi >= ParamMinOnLine && PiPi<=ParamMaxOnLine*/) {
749 SortAgain = Standard_True;
750 SortIsOK = Standard_False;
751 if (newParam > ponline)
752 if(u2a < u2b) { VTX.SetParameter(newParam); }
753 else { VTXM1.SetParameter(newParam); }
755 if(u2a > u2b) { VTX.SetParameter(newParam); }
756 else { VTXM1.SetParameter(newParam); }
760 // if(0.0 >= ParamMinOnLine && 0.0<=ParamMaxOnLine) {
761 // SortAgain = Standard_True;
762 // SortIsOK = Standard_False;
763 // if(u2a > u2b) { VTX.SetParameter(0.0); }
764 // else { VTXM1.SetParameter(0.0); }
779 //-- Recalcul de fipt et lapt
785 SortIsOK = Standard_True;
786 for(i=2; i<=nbvtx; i++)
788 if(svtx.Value(i-1).ParameterOnLine() > svtx.Value(i).ParameterOnLine())
790 SortIsOK = Standard_False;
791 svtx.Exchange(i-1,i);