1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2012 OPEN CASCADE SAS
4 // The content of this file is subject to the Open CASCADE Technology Public
5 // License Version 6.5 (the "License"). You may not use the content of this file
6 // except in compliance with the License. Please obtain a copy of the License
7 // at http://www.opencascade.org and read it completely before using this file.
9 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 // The Original Code and all software distributed under the License is
13 // distributed on an "AS IS" basis, without warranty of any kind, and the
14 // Initial Developer hereby disclaims all such warranties, including without
15 // limitation, any warranties of merchantability, fitness for a particular
16 // purpose or non-infringement. Please see the License for the specific terms
17 // and conditions governing the rights and limitations under the License.
19 //-------------------------------------------------------------------
20 //-- I n t W a l k _ P W a l k i n g _ 2 . g x x
21 //-------------------------------------------------------------------
25 void IntWalk_PWalking::
26 RepartirOuDiviser(Standard_Boolean& DejaReparti,
27 IntImp_ConstIsoparametric& ChoixIso,
28 Standard_Boolean& Arrive)
30 // au voisinage d '1 point ,il y a echec du cheminement
31 // il faut diviser le pas pour essayer de continuer
32 //si le pas est trop petit ou si on est arrive sur une frontiere
33 // repartir dans l autre sens si cela n a pas ete deja fait sinon arret
36 // Standard_Integer i;
37 if (Arrive) { //repartir dans l autre sens
39 Arrive = Standard_False;
40 DejaReparti = Standard_True;
41 previousPoint = line->Value(1);
42 previoustg = Standard_False;
46 indextg = line->NbPoints();
50 //-- printf("\nIntWalk_PWalking_2.gxx Reverse %3d\n",indextg);
53 tglast = Standard_False;
54 ChoixIso = choixIsoSav;
61 Standard_Real u1,v1,u2,v2;
62 Standard_Real U1,V1,U2,V2;
63 Standard_Integer nn=line->NbPoints();
65 line->Value(nn).Parameters(u1,v1,u2,v2);
66 line->Value(nn-1).Parameters(U1,V1,U2,V2);
77 if ( pasuv[0]*0.5 < ResoU1
78 && pasuv[1]*0.5 < ResoV1
79 && pasuv[2]*0.5 < ResoU2
80 && pasuv[3]*0.5 < ResoV2
83 tglast = Standard_True; // EST-CE SUFFISANT ????
86 if (!DejaReparti) { //repartir dans l autre sens
87 DejaReparti = Standard_True;
88 previousPoint = line->Value(1);
89 previoustg = Standard_False;
93 indextg = line->NbPoints();
97 //-- printf("\nIntWalk_PWalking_2.gxx Reverse %3d\n",indextg);
101 tglast = Standard_False;
102 ChoixIso = choixIsoSav;
110 Standard_Real u1,v1,u2,v2;
111 Standard_Real U1,V1,U2,V2;
112 Standard_Integer nn=line->NbPoints();
114 line->Value(nn).Parameters(u1,v1,u2,v2);
115 line->Value(nn-1).Parameters(U1,V1,U2,V2);
123 else Arrive = Standard_True;