MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
occ_fonction_reconstruction.cpp
Aller à la documentation de ce fichier.
1 //####//------------------------------------------------------------
2 //####//------------------------------------------------------------
3 //####// MAGiC
4 //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5 //####// Departement de Genie Mecanique - UQTR
6 //####//------------------------------------------------------------
7 //####// MAGIC est un projet de recherche de l equipe ERICCA
8 //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9 //####// http://www.uqtr.ca/ericca
10 //####// http://www.uqtr.ca/
11 //####//------------------------------------------------------------
12 //####//------------------------------------------------------------
13 //####//
14 //####// occ_fonction_reconstruction.cpp
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:56 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 #include "gestionversion.h"
23 #ifdef BREP_OCC
24 
25 #pragma hdrstop
26 
28 #include "tpl_map_entite.h"
29 #include "Geom_BSplineSurface.hxx"
30 #include "Geom2d_Curve.hxx"
31 
32 
33 #pragma package(smart_init)
34 
35 
36 
38 {
39 
40 }
41 
43 {
44 }
45 
46 
48 {
49  B.MakeShell(Sh);
50  return true;
51 
52 }
54 {
55  B.Add(Sh,F1);
56  return true;
57 }
59 {
60  TopoDS_Solid Sol;
61  B.MakeSolid(Sol);
62  B.Add(Sol,Sh);
63  STEPControl_Writer writer;
64  writer.Transfer(Sol, STEPControl_ManifoldSolidBrep);
65  writer.Write(fich);
66  return true;
67 }
68 
69 
70 
72 {
73  TopoDS_Wire W11 = W1;
74  if (num_loop==0)
75  {
76  //W11.Reverse();
77  const Handle_Geom_Surface Surf=Surf1;
78  F1 = BRepBuilderAPI_MakeFace(Surf,W11,Standard_True);
79 
80  #if (((OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 7)) || (OCC_VERSION_MAJOR > 6))
81  BRepBuilderAPI_MakeFace F3(Surf,1e-6);
82  F3.Init(Surf,Standard_False,1e-6);
83  #else
84  BRepBuilderAPI_MakeFace F3(Surf);
85  F3.Init(Surf,Standard_False);
86  #endif
87  F3.Add(W11);
88 
89  F1 = F3;
90 
91  Face_Revol = F3.IsDone();
92  }
93  if(num_loop > 0)
94  {
95  #if (((OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 7))|| (OCC_VERSION_MAJOR > 6))
96  BRepBuilderAPI_MakeFace F2(Surf1,1e-6);
97  F2.Init(Surf1,Standard_False,1e-6);
98  #else
99  BRepBuilderAPI_MakeFace F2(Surf1);
100  F2.Init(Surf1,Standard_False);
101  #endif
102  F2.Add(W11);
103 
104  if(F2.IsDone())
105  {
106  W11.Reverse();
107  }
108  F1 = BRepBuilderAPI_MakeFace(F1,W11);
109  }
110  return true;
111 }
112 
113 
114 
115 
116 int OCC_FONCTION_RECONSTRUCTION::Creer_Surface_Cylindrique(double Pnt_Insersion[], double Vect_Directeur[], double Rayon)
117 {
118  gp_Pnt Pnt(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]);
119  gp_Dir Vect(Vect_Directeur[0],Vect_Directeur[1],Vect_Directeur[2]);
120 
121  gp_Ax3 Axe(Pnt,Vect);
122 
123  Surf1 = new Geom_CylindricalSurface(gp_Cylinder(Axe, Rayon));
124  return true;
125 }
126 
127 
128 int OCC_FONCTION_RECONSTRUCTION::Creer_Surface_Conique(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon, double Angle)
129 {
130  gp_Pnt Pnt(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]);
131  gp_Dir Vect(Vect_Directeur[0],Vect_Directeur[1],Vect_Directeur[2]);
132 
133  gp_Ax3 Axe(Pnt,Vect);
134 
135  Surf1 = new Geom_ConicalSurface(Axe,Angle,Rayon);
136  return true;
137 }
138 
139 
140 
141 int OCC_FONCTION_RECONSTRUCTION::Creer_Surface_Torique(double Pnt_Insersion[], double Vect_Directeur[], double GRayon, double PRayon)
142 {
143  gp_Pnt Pnt(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]);
144  gp_Dir Vect(Vect_Directeur[0],Vect_Directeur[1],Vect_Directeur[2]);
145 
146  gp_Ax3 Axe(Pnt,Vect);
147 
148  Surf1 = new Geom_ToroidalSurface(Axe,GRayon,PRayon);
149  return true;
150 }
151 
152 
153 int OCC_FONCTION_RECONSTRUCTION::Creer_Surf_Spherique(double Pnt_Insersion[], double Vect_Directeur[], double Rayon)
154 {
155  gp_Pnt Pnt(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]);
156  gp_Dir Vect(Vect_Directeur[0],Vect_Directeur[1],Vect_Directeur[2]);
157 
158  gp_Ax3 Axe(Pnt,Vect);
159 
160  Surf1 = new Geom_SphericalSurface(Axe,Rayon);
161  return true;
162 }
163 
164 
165 
167 {
168  BPSurf = GeomPlate_BuildPlateSurface(3,10,3);
169  return true;
170 }
172 {
173  gp_Pnt P(x,y,z);
174  Handle(GeomPlate_PointConstraint) PCont= new GeomPlate_PointConstraint(P,0);
175  BPSurf.Add(PCont);
176 
177  return true;
178 }
180 {
181  BPSurf.Perform();
182  return true;
183 }
185 {
186  Standard_Integer MaxSeg = 50;
187  Standard_Integer MaxDegree=8;
188  Standard_Integer CritOrder=4;
189  Standard_Real dmax,Tol;
190  Handle(GeomPlate_Surface) PSurf1 = BPSurf.Surface();
191  dmax = Max(0.0001,10*BPSurf.G0Error());
192  Tol=0.0;
193  GeomPlate_MakeApprox Mapp1(PSurf1,Tol,MaxSeg,MaxDegree,dmax,0);
194  Surf1 = Mapp1.Surface();
195  return true;
196 }
197 
198 
199 
200 
201 TColgp_Array1OfPnt Array(1,1000);
202 
203 int OCC_FONCTION_RECONSTRUCTION::Ajouter_Point_Courbe(double x, double y, double z, int i)
204 {
205  Array.SetValue(i,gp_Pnt(x,y,z));
206  return true;
207 }
208 
209 
210 
211 TColGeom_Array1OfBSplineCurve ArrayCurve(1,4);
212 
214 {
215  TColgp_Array1OfPnt Array00(1,nbpts);
216 
217  for(int ii = 1; ii<=nbpts;ii++)
218  {
219  Array00.SetValue(ii,Array(ii));
220  }
221 
222  Handle(Geom_BSplineCurve) SPL0 = GeomAPI_PointsToBSpline(Array00,3,8,GeomAbs_C1,0.).Curve();
223  ArrayCurve.SetValue(num,SPL0);
224 
225  return true;
226 }
227 
228 
229 
231 {
232  if(nb_aretes_ext ==3)
233  {
234  Handle(GeomAdaptor_HCurve) SPL1Adaptor = new GeomAdaptor_HCurve(ArrayCurve(1));
235  Handle(GeomFill_SimpleBound) B1 = new GeomFill_SimpleBound(SPL1Adaptor,Precision::Approximation(),Precision::Angular());
236  Handle(GeomAdaptor_HCurve) SPL2Adaptor = new GeomAdaptor_HCurve(ArrayCurve(2));
237  Handle(GeomFill_SimpleBound) B2 = new GeomFill_SimpleBound(SPL2Adaptor,Precision::Approximation(),Precision::Angular());
238  Handle(GeomAdaptor_HCurve) SPL3Adaptor = new GeomAdaptor_HCurve(ArrayCurve(3));
239  Handle(GeomFill_SimpleBound) B3 = new GeomFill_SimpleBound(SPL3Adaptor,Precision::Approximation(),Precision::Angular());
240 
241  Standard_Boolean NoCheck= Standard_False;
242  Standard_Integer MaxDeg = 8;
243 
244  Standard_Integer MaxSeg = 50;
245 
246  GeomFill_ConstrainedFilling aConstrained(MaxDeg, MaxSeg);
247  aConstrained.Init(B1,B2,B3, NoCheck);
248  Surf1 = aConstrained.Surface();
249  }
250 
251  if(nb_aretes_ext ==4)
252  {
253 
254  Handle(GeomAdaptor_HCurve) SPL1Adaptor = new GeomAdaptor_HCurve(ArrayCurve(1));
255  Handle(GeomFill_SimpleBound) B1 = new GeomFill_SimpleBound(SPL1Adaptor,Precision::Approximation(),Precision::Angular());
256  Handle(GeomAdaptor_HCurve) SPL2Adaptor = new GeomAdaptor_HCurve(ArrayCurve(2));
257  Handle(GeomFill_SimpleBound) B2 = new GeomFill_SimpleBound(SPL2Adaptor,Precision::Approximation(),Precision::Angular());
258  Handle(GeomAdaptor_HCurve) SPL3Adaptor = new GeomAdaptor_HCurve(ArrayCurve(3));
259  Handle(GeomFill_SimpleBound) B3 = new GeomFill_SimpleBound(SPL3Adaptor,Precision::Approximation(),Precision::Angular());
260  Handle(GeomAdaptor_HCurve) SPL4Adaptor = new GeomAdaptor_HCurve(ArrayCurve(4));
261  Handle(GeomFill_SimpleBound) B4 = new GeomFill_SimpleBound(SPL4Adaptor,Precision::Approximation(),Precision::Angular());
262 
263  Standard_Boolean NoCheck= Standard_False;
264  Standard_Integer MaxDeg = 8;
265 
266  Standard_Integer MaxSeg = 50;
267 
268  GeomFill_ConstrainedFilling aConstrained(MaxDeg, MaxSeg);
269  aConstrained.Init(B1,B2,B3,B4, NoCheck);
270  Surf1 = aConstrained.Surface();
271  }
272  return true;
273 }
274 
275 
276 
277 
279 {
280  #if (((OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR >= 7)) || (OCC_VERSION_MAJOR > 6))
281  F1 = BRepBuilderAPI_MakeFace(Surf1,1e-6);
282  #else
283  F1 = BRepBuilderAPI_MakeFace(Surf1);
284  #endif
285  return true;
286 }
287 
288 
290 {
291  TopoDS_Wire W;
292  W1 = W;
293 
294  return true;
295 }
296 
297 
298 
300 {
301 
302  GeomAPI_ProjectPointOnSurf Proj1(gp_Pnt(P1[0],P1[1],P1[2]),Surf1);
303  Proj1.LowerDistanceParameters(U, V);
304  gp_Pnt2d P1_2D(U,V);
305 
306  GeomAPI_ProjectPointOnSurf Proj2(gp_Pnt(P2[0],P2[1],P2[2]),Surf1);
307  Proj2.LowerDistanceParameters(U, V);
308  gp_Pnt2d P2_2D(U,V);
309 
310  Curve = GCE2d_MakeSegment(P1_2D, P2_2D).Value();
311 
312  E = BRepBuilderAPI_MakeEdge(Curve,Surf1);
313 
314  W1.Add(E);
315 
316  return true;
317 
318 }
319 
320 
321 int OCC_FONCTION_RECONSTRUCTION::Creer_Arete_Circulaire(double Pnt_Insersion[3], double Normal[3],double P1[3], double P2[3], double Rayon)
322 {
323  GeomAPI_ProjectPointOnSurf Proj(gp_Pnt(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]),Surf1);
324  Proj.LowerDistanceParameters(U, V);
325  gp_Pnt2d Pnt_Ins2D(U,V);
326 
327  GeomAPI_ProjectPointOnSurf Proj1(gp_Pnt(P1[0],P1[1],P1[2]),Surf1);
328  Proj1.LowerDistanceParameters(U, V);
329  gp_Pnt2d P1_2D(U,V);
330 
331  GeomAPI_ProjectPointOnSurf Proj2(gp_Pnt(P2[0],P2[1],P2[2]),Surf1);
332  Proj2.LowerDistanceParameters(U, V);
333  gp_Pnt2d P2_2D(U,V);
334 
335 
336  gp_Dir2d Vect(P1_2D.X()-Pnt_Ins2D.X(),P1_2D.Y()-Pnt_Ins2D.Y());
337 
338  gp_Ax2d Axe(Pnt_Ins2D,Vect);
339 
340  gp_Circ2d Circ(Axe, Rayon, Standard_True);
341 
342 
343  Curve = GCE2d_MakeArcOfCircle (Circ, P1_2D, P2_2D, Standard_True).Value();
344  E = BRepBuilderAPI_MakeEdge(Curve,Surf1);
345  W1.Add(E);
346  return true;
347 }
348 
349 
350 
351 int OCC_FONCTION_RECONSTRUCTION::Creer_Arete_Elliptique(double Pnt_Insersion[3], double P1[3], double P2[3], double GRayon, double PRayon)
352 {
353  GeomAPI_ProjectPointOnSurf Proj(gp_Pnt(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]),Surf1);
354  Proj.LowerDistanceParameters(U, V);
355  gp_Pnt2d Pnt_Ins2D(U,V);
356 
357  GeomAPI_ProjectPointOnSurf Proj1(gp_Pnt(P1[0],P1[1],P1[2]),Surf1);
358  Proj1.LowerDistanceParameters(U, V);
359  gp_Pnt2d P1_2D(U,V);
360 
361  GeomAPI_ProjectPointOnSurf Proj2(gp_Pnt(P2[0],P2[1],P2[2]),Surf1);
362  Proj2.LowerDistanceParameters(U, V);
363  gp_Pnt2d P2_2D(U,V);
364 
365 
366  gp_Dir2d Vect(P1_2D.X()-Pnt_Ins2D.X(),P1_2D.Y()-Pnt_Ins2D.Y());
367 
368  gp_Ax2d Axe(Pnt_Ins2D,Vect);
369 
370  gp_Elips2d Ellipse(Axe, GRayon, PRayon, Standard_True);
371 
372  Curve = GCE2d_MakeArcOfEllipse (Ellipse, P1_2D, P2_2D, Standard_True).Value();
373  E = BRepBuilderAPI_MakeEdge(Curve,Surf1);
374 
375  return true;
376 }
377 
378 
379 
380 TColgp_Array1OfPnt2d Array01(1,1000);
381 
382 int OCC_FONCTION_RECONSTRUCTION::Ajouter_Point_Arete(double x, double y, double z, int i)
383 {
384  gp_Pnt P(x,y,z);
385  GeomAPI_ProjectPointOnSurf Proj(P,Surf1);
386  Proj.LowerDistanceParameters(U, V);
387  Array01.SetValue(i,gp_Pnt2d(U,V));
388 
389  return true;
390 }
391 
392 
393 
394 
396 {
397  TColgp_Array1OfPnt Arr(1,nb_pts);
398 
399  for(int ii = 1; ii<=nb_pts;ii++)
400  {
401  Arr.SetValue(ii,Array(ii));
402  }
403 
404  Handle(Geom_BSplineCurve) SPL = GeomAPI_PointsToBSpline (Arr,3,8,GeomAbs_C1,0.).Curve();
405  Handle(GeomAdaptor_HCurve) SPL1Adaptor = new GeomAdaptor_HCurve(SPL);
406  Handle(BRepFill_CurveConstraint) Cont= new BRepFill_CurveConstraint(SPL1Adaptor,0);
407  BPSurf.Add(Cont);
408 
409  return true;
410 }
411 
412 
413 
415 {
416  TColgp_Array1OfPnt2d Array02(1,nbpts);
417 
418  for(int ii = 1; ii<=nbpts;ii++)
419  {
420  gp_Pnt2d PP = Array01(ii);
421  Array02.SetValue(ii,PP);
422  }
423 
424  Handle(Geom2d_BSplineCurve) SSPL1 = Geom2dAPI_PointsToBSpline(Array02,3,8,GeomAbs_C1,0.).Curve();
425  TopoDS_Edge E = BRepBuilderAPI_MakeEdge(SSPL1,Surf1);
426  W1.Add(E);
427 
428 
429  return true;
430 }
431 
432 
433 int OCC_FONCTION_RECONSTRUCTION::Initialiser_Surface_Cylindrique(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon)
434 {
435  gp_Pnt Pnt(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]);
436  gp_Dir Vect(Vect_Directeur[0],Vect_Directeur[1],Vect_Directeur[2]);
437  gp_Ax3 Axe(Pnt,Vect);
438 
439  Handle (Geom_Surface) Surf = new Geom_CylindricalSurface(Axe, Rayon);
440  BPSurf = GeomPlate_BuildPlateSurface(Surf,3,10,3);
441  return true;
442 }
443 
445 {
446  BPSurf = GeomPlate_BuildPlateSurface(Surf1,3,10,3);
447  return true;
448 }
449 
450 TColgp_Array1OfPnt Array_Point_Ideal(1,1000);
451 
452 int OCC_FONCTION_RECONSTRUCTION::Ajouter_Point_Array_Ideal(double x, double y, double z, int i)
453 {
454  gp_Pnt Pnt(x,y,z);
455  Array_Point_Ideal.SetValue(i,Pnt);
456 
457  return true;
458 }
459 
461 {
462  TColgp_Array1OfPnt Array_Point_Ideal1(1,nb);
463 
464  for(int i = 1; i<=nb;i++)
465  {
466  Array_Point_Ideal1.SetValue(i,Array_Point_Ideal(i));
467  }
468 
469  GProp_PEquation Boite = GProp_PEquation(Array_Point_Ideal1,0);
470 
471  Boite.Box(P_def, V11_def, V22_def, V33_def);
472 
473  Array_Boite[1] = P_def.X();
474  Array_Boite[2] = P_def.Y();
475  Array_Boite[3] = P_def.Z();
476 
477  Array_Boite[4] = V11_def.X();
478  Array_Boite[5] = V11_def.Y();
479  Array_Boite[6] = V11_def.Z();
480 
481  Array_Boite[7] = V22_def.X();
482  Array_Boite[8] = V22_def.Y();
483  Array_Boite[9] = V22_def.Z();
484 
485  Array_Boite[10] = V33_def.X();
486  Array_Boite[11] = V33_def.Y();
487  Array_Boite[12] = V33_def.Z();
488 
489  return true;
490 }
491 
493 {
494  return Array_Boite[ii];
495 
496 }
497 
498 
500 {
501  TColgp_Array1OfPnt Array_Point_Ideal1(1,nb);
502 
503  for(int i = 1; i<=nb;i++)
504  {
505  Array_Point_Ideal1.SetValue(i,Array_Point_Ideal(i));
506  }
507 
508  GProp_PEquation Equa_plan(Array_Point_Ideal1,Epsilon);
509  gp_Pln Plan = Equa_plan.Plane();
510  Surf1 = new Geom_Plane(Plan);
511 
512  return true;
513 }
514 
515 
516 int OCC_FONCTION_RECONSTRUCTION::Ligne_Revolution(double Pnt_Insersion[], double Vect_Directeur[])
517 {
518  gp_Pnt P(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]);
519  gp_Dir V(Vect_Directeur[0],Vect_Directeur[1],Vect_Directeur[2]);
520 
521  Handle(Geom_Line) Line = new Geom_Line (P,V);
522  Curve_Projection = Line;
523 
524  return true;
525 }
526 
527 double OCC_FONCTION_RECONSTRUCTION::Distance_Point_Curve(double x, double y, double z)
528 {
529  gp_Pnt P(x,y,z);
530  GeomAPI_ProjectPointOnCurve PPC (P,Curve_Projection);
531  N = PPC.NearestPoint();
532 
533  double distance = PPC.LowerDistance();
534 
535  return distance;
536 
537 }
538 
539 int OCC_FONCTION_RECONSTRUCTION::Creer_Surface_Cylindrique_Revolution(double Pnt_Insersion[3], double Vect_Directeur[3],double Vecteur1[3],double Rayon)
540 {
541  gp_Pnt Pnt(Pnt_Insersion[0]+Rayon*Vecteur1[0],Pnt_Insersion[1]+Rayon*Vecteur1[1],Pnt_Insersion[2]+Rayon*Vecteur1[2]);
542  gp_Dir Vect(Vect_Directeur[0],Vect_Directeur[1],Vect_Directeur[2]);
543 
544  Handle (Geom_Curve) C1 = new Geom_Line(Pnt,Vect);
545  Surf1 = new Geom_SurfaceOfRevolution(C1,gp_Ax1(gp_Pnt(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]),Vect));
546 
547  return true;
548 }
549 
551 {
552  return Face_Revol;
553 }
554 
555 
556 
557 
558 
559 
560 
562 {
563  Pt_Proj_Line[1] = N.X();
564  Pt_Proj_Line[2] = N.Y();
565  Pt_Proj_Line[3] = N.Z();
566 
567  return true;
568 }
569 
571 {
572  return Pt_Proj_Line[ii];
573 }
574 
575 
576 int OCC_FONCTION_RECONSTRUCTION::GCercle_Tore(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon)
577 {
578  gp_Pnt P(Pnt_Insersion[0],Pnt_Insersion[1],Pnt_Insersion[2]);
579  gp_Dir V(Vect_Directeur[0],Vect_Directeur[1],Vect_Directeur[2]);
580 
581  Handle(Geom_Circle) GCercle = new Geom_Circle (gp_Ax2(P,V),Rayon);
582  Curve_Projection = GCercle;
583 
584  return true;
585 
586 }
587 
588 TColGeom_Array1OfSurface Array_Surface_Ideal(1,100);
589 
591 {
592  Array_Surface_Ideal.SetValue(num,Surf1);
593  return true;
594 }
595 
596 
597 int OCC_FONCTION_RECONSTRUCTION::Projeter_Point_Surface_Idealisee(double x, double y,double z, int num)
598 {
599  gp_Pnt P(x,y,z);
600  Handle (Geom_Surface) Surf = Array_Surface_Ideal(num);
601  GeomAPI_ProjectPointOnSurf Proj(P,Surf);
602 
603  Point_Projetee = Proj.NearestPoint();
604 
605  return true;
606 }
607 
609 {
613 
614  return true;
615 }
616 
617 
619 {
620  return Pt_Proj_Surf_Ideal[ii];
621 }
622 
623 
625 {
626  gp_Pnt P(x,y,z);
627  GeomAPI_ProjectPointOnSurf Proj(P,Surf1);
628  Point_Projetee = Proj.NearestPoint();
629 
630  return true;
631 }
632 
633 
634 int OCC_FONCTION_RECONSTRUCTION::Ajouter_Point_AreteUV(int testU, int testV, double x, double y, double z, int i)
635 {
636  gp_Pnt P(x,y,z);
637  GeomAPI_ProjectPointOnSurf Proj(P,Surf1);
638  Proj.LowerDistanceParameters(U, V);
639  if((testU==1) && (U<=M_PI/2))
640  {
641  U = U+ 2*M_PI;
642  }
643 
644  if((testV==1) && (V<=M_PI/2))
645  {
646  V = V+ 2*M_PI;
647  }
648  Array01.SetValue(i,gp_Pnt2d(U,V));
649 
650  return true;
651 }
652 
653 double OCC_FONCTION_RECONSTRUCTION::Analyser_interval_AreteU(double x, double y, double z)
654 {
655  gp_Pnt P(x,y,z);
656  GeomAPI_ProjectPointOnSurf Proj(P,Surf1);
657  Proj.LowerDistanceParameters(U, V);
658  return U;
659 }
660 
661 double OCC_FONCTION_RECONSTRUCTION::Analyser_interval_AreteV(double x, double y, double z)
662 {
663  gp_Pnt P(x,y,z);
664  GeomAPI_ProjectPointOnSurf Proj(P,Surf1);
665  Proj.LowerDistanceParameters(U, V);
666  return V;
667 }
668 
669 
670 
671 #endif
672 
673 
OCC_FONCTION_RECONSTRUCTION::~OCC_FONCTION_RECONSTRUCTION
virtual ~OCC_FONCTION_RECONSTRUCTION()
Definition: occ_fonction_reconstruction.cpp:42
OCC_FONCTION_RECONSTRUCTION::Creer_Surface_Conique
int Creer_Surface_Conique(double Pnt_Insersion[3], double Vect_Directeur[3], double Rayon, double Angle)
Definition: occ_fonction_reconstruction.cpp:128
OCC_FONCTION_RECONSTRUCTION::Creer_Coquille
int Creer_Coquille()
Definition: occ_fonction_reconstruction.cpp:47
OCC_FONCTION_RECONSTRUCTION::Initialiser_Surface_Surface
int Initialiser_Surface_Surface()
Definition: occ_fonction_reconstruction.cpp:444
OCC_FONCTION_RECONSTRUCTION::Creer_Arete_Elliptique
int Creer_Arete_Elliptique(double Pnt_Insersion[], double P1[], double P2[], double GRayon, double PRayon)
Definition: occ_fonction_reconstruction.cpp:351
OCC_FONCTION_RECONSTRUCTION::Sh
TopoDS_Shell Sh
Definition: occ_fonction_reconstruction.h:89
gestionversion.h
OCC_FONCTION_RECONSTRUCTION::Ajouter_Point_Arete
int Ajouter_Point_Arete(double x, double y, double z, int i)
Definition: occ_fonction_reconstruction.cpp:382
OCC_FONCTION_RECONSTRUCTION::Initialiser_Surface_Cylindrique
int Initialiser_Surface_Cylindrique(double Pnt_Insersion[3], double Vect_Directeur[3], double Rayon)
Definition: occ_fonction_reconstruction.cpp:433
OCC_FONCTION_RECONSTRUCTION::Determiner_Plan
int Determiner_Plan(int nb, double Epsilon)
Definition: occ_fonction_reconstruction.cpp:499
occ_fonction_reconstruction.h
OCC_FONCTION_RECONSTRUCTION::Ajouter_face_Coquille
int Ajouter_face_Coquille()
Definition: occ_fonction_reconstruction.cpp:53
OCC_FONCTION_RECONSTRUCTION::V
Standard_Real V
Definition: occ_fonction_reconstruction.h:102
OCC_FONCTION_RECONSTRUCTION::Creer_Arete_Lineaire
int Creer_Arete_Lineaire(double P1[3], double P2[3])
Definition: occ_fonction_reconstruction.cpp:299
OCC_FONCTION_RECONSTRUCTION::Ajouter_Point_Array_Ideal
int Ajouter_Point_Array_Ideal(double x, double y, double z, int i)
Definition: occ_fonction_reconstruction.cpp:452
OCC_FONCTION_RECONSTRUCTION::Pt_Proj_Surface_Ideal
int Pt_Proj_Surface_Ideal()
Definition: occ_fonction_reconstruction.cpp:608
OCC_FONCTION_RECONSTRUCTION::Handle
Handle(Geom_Surface) Surf1
OCC_FONCTION_RECONSTRUCTION::GCercle_Tore
int GCercle_Tore(double Pnt_Insersion[3], double Vect_Directeur[3], double Rayon)
Definition: occ_fonction_reconstruction.cpp:576
OCC_FONCTION_RECONSTRUCTION::Ajouter_Surface_liste_Ideal
int Ajouter_Surface_liste_Ideal(int num)
Definition: occ_fonction_reconstruction.cpp:590
OCC_FONCTION_RECONSTRUCTION::Ajouter_Contour_Face
int Ajouter_Contour_Face(int ii)
Definition: occ_fonction_reconstruction.cpp:71
OCC_FONCTION_RECONSTRUCTION::Array_Boite
double Array_Boite[12]
Definition: occ_fonction_reconstruction.h:115
OCC_FONCTION_RECONSTRUCTION::Ajouter_Point_AreteUV
int Ajouter_Point_AreteUV(int testU, int testV, double x, double y, double z, int i)
Definition: occ_fonction_reconstruction.cpp:634
OCC_FONCTION_RECONSTRUCTION::OCC_FONCTION_RECONSTRUCTION
OCC_FONCTION_RECONSTRUCTION()
Definition: occ_fonction_reconstruction.cpp:37
OCC_FONCTION_RECONSTRUCTION::Distance_Point_Curve
double Distance_Point_Curve(double x, double y, double z)
Definition: occ_fonction_reconstruction.cpp:527
OCC_FONCTION_RECONSTRUCTION::Creer_Surf_Spherique
int Creer_Surf_Spherique(double Pnt_Insersion[], double Vect_Directeur[], double Rayon)
Definition: occ_fonction_reconstruction.cpp:153
OCC_FONCTION_RECONSTRUCTION::Creer_Contour
int Creer_Contour()
Definition: occ_fonction_reconstruction.cpp:289
OCC_FONCTION_RECONSTRUCTION::Creer_Arete_Circulaire
int Creer_Arete_Circulaire(double Pnt_Insersion[3], double Normal[3], double P1[3], double P2[3], double Rayon)
Definition: occ_fonction_reconstruction.cpp:321
OCC_FONCTION_RECONSTRUCTION::Analyser_interval_AreteV
double Analyser_interval_AreteV(double x, double y, double z)
Definition: occ_fonction_reconstruction.cpp:661
OCC_FONCTION_RECONSTRUCTION::Determiner_Surface
int Determiner_Surface()
Definition: occ_fonction_reconstruction.cpp:184
OCC_FONCTION_RECONSTRUCTION::Initialiser_Surface
int Initialiser_Surface()
Definition: occ_fonction_reconstruction.cpp:166
OCC_FONCTION_RECONSTRUCTION::F1
TopoDS_Face F1
Definition: occ_fonction_reconstruction.h:95
OCC_FONCTION_RECONSTRUCTION::E
TopoDS_Edge E
Definition: occ_fonction_reconstruction.h:104
OCC_FONCTION_RECONSTRUCTION::W1
BRepBuilderAPI_MakeWire W1
Definition: occ_fonction_reconstruction.h:99
OCC_FONCTION_RECONSTRUCTION::Construire_Surface_Contour
int Construire_Surface_Contour(int nb_aretes_ext)
Definition: occ_fonction_reconstruction.cpp:230
OCC_FONCTION_RECONSTRUCTION::Pnt_Proj_Ligne
double Pnt_Proj_Ligne(int ii)
Definition: occ_fonction_reconstruction.cpp:570
OCC_FONCTION_RECONSTRUCTION::Rapprocher_Surface_Courbe_Spline
int Rapprocher_Surface_Courbe_Spline(int nb_pts)
Definition: occ_fonction_reconstruction.cpp:395
Max
double2 Max(double2 a, double2 b)
Definition: ot_fonctions.cpp:86
OCC_FONCTION_RECONSTRUCTION::Pt_Proj_Ligne
int Pt_Proj_Ligne()
Definition: occ_fonction_reconstruction.cpp:561
ArrayCurve
TColGeom_Array1OfBSplineCurve ArrayCurve(1, 4)
OCC_FONCTION_RECONSTRUCTION::BPSurf
GeomPlate_BuildPlateSurface BPSurf
Definition: occ_fonction_reconstruction.h:97
OCC_FONCTION_RECONSTRUCTION::V33_def
gp_Vec V33_def
Definition: occ_fonction_reconstruction.h:113
Array_Point_Ideal
TColgp_Array1OfPnt Array_Point_Ideal(1, 1000)
OCC_FONCTION_RECONSTRUCTION::Analyser_interval_AreteU
double Analyser_interval_AreteU(double x, double y, double z)
Definition: occ_fonction_reconstruction.cpp:653
OCC_FONCTION_RECONSTRUCTION::Determiner_Param_Boite
int Determiner_Param_Boite(int i)
Definition: occ_fonction_reconstruction.cpp:460
OCC_FONCTION_RECONSTRUCTION::Pt_Proj_Line
double Pt_Proj_Line[3]
Definition: occ_fonction_reconstruction.h:123
OCC_FONCTION_RECONSTRUCTION::Creer_Surface_Cylindrique_Revolution
int Creer_Surface_Cylindrique_Revolution(double Pnt_Insersion[3], double Vect_Directeur[3], double Vecteur1[3], double Rayon)
Definition: occ_fonction_reconstruction.cpp:539
OCC_FONCTION_RECONSTRUCTION::P_def
gp_Pnt P_def
Definition: occ_fonction_reconstruction.h:110
OCC_FONCTION_RECONSTRUCTION::Pt_Proj_Surf_Ideal
double Pt_Proj_Surf_Ideal[3]
Definition: occ_fonction_reconstruction.h:126
tpl_map_entite.h
OCC_FONCTION_RECONSTRUCTION::Get_Param_Boite
double Get_Param_Boite(int i)
Definition: occ_fonction_reconstruction.cpp:492
OCC_FONCTION_RECONSTRUCTION::Face_Revol
int Face_Revol
Definition: occ_fonction_reconstruction.h:100
OCC_FONCTION_RECONSTRUCTION::Pnt_Proj_Surface_Ideal
double Pnt_Proj_Surface_Ideal(int ii)
Definition: occ_fonction_reconstruction.cpp:618
OCC_FONCTION_RECONSTRUCTION::B
BRep_Builder B
Definition: occ_fonction_reconstruction.h:88
OCC_FONCTION_RECONSTRUCTION::Face_Revolution
int Face_Revolution()
Definition: occ_fonction_reconstruction.cpp:550
OCC_FONCTION_RECONSTRUCTION::U
Standard_Real U
Definition: occ_fonction_reconstruction.h:102
OCC_FONCTION_RECONSTRUCTION::Ajouter_courbe_liste
int Ajouter_courbe_liste(int nb_pts, int num)
Definition: occ_fonction_reconstruction.cpp:213
OCC_FONCTION_RECONSTRUCTION::Enregistrer
int Enregistrer(char *path)
Definition: occ_fonction_reconstruction.cpp:58
OCC_FONCTION_RECONSTRUCTION::Point_Projetee
gp_Pnt Point_Projetee
Definition: occ_fonction_reconstruction.h:125
OCC_FONCTION_RECONSTRUCTION::V11_def
gp_Vec V11_def
Definition: occ_fonction_reconstruction.h:111
OCC_FONCTION_RECONSTRUCTION::Creer_Surface_Cylindrique
int Creer_Surface_Cylindrique(double Pnt_Insersion[3], double Vect_Directeur[3], double Rayon)
Definition: occ_fonction_reconstruction.cpp:116
OCC_FONCTION_RECONSTRUCTION::Rapprocher_Surface_Point
int Rapprocher_Surface_Point(double x, double y, double z)
Definition: occ_fonction_reconstruction.cpp:171
OCC_FONCTION_RECONSTRUCTION::Ligne_Revolution
int Ligne_Revolution(double Pnt_Inser[], double Vect_Direc[])
Definition: occ_fonction_reconstruction.cpp:516
OCC_FONCTION_RECONSTRUCTION::Calculer_Surface
int Calculer_Surface()
Definition: occ_fonction_reconstruction.cpp:179
OCC_FONCTION_RECONSTRUCTION::N
gp_Pnt N
Definition: occ_fonction_reconstruction.h:121
OCC_FONCTION_RECONSTRUCTION::Ajouter_Point_Courbe
int Ajouter_Point_Courbe(double x, double y, double z, int i)
Definition: occ_fonction_reconstruction.cpp:203
Array01
TColgp_Array1OfPnt2d Array01(1, 1000)
P
#define P(i, j)
OCC_FONCTION_RECONSTRUCTION::Creer_Surface_Torique
int Creer_Surface_Torique(double Pnt_Insersion[], double Vect_Directeur[], double GRayon, double PRayon)
Definition: occ_fonction_reconstruction.cpp:141
OCC_FONCTION_RECONSTRUCTION::Projeter_Point_Surface_Idealisee
int Projeter_Point_Surface_Idealisee(double x, double y, double z, int num)
Definition: occ_fonction_reconstruction.cpp:597
Array
TColgp_Array1OfPnt Array(1, 1000)
OCC_FONCTION_RECONSTRUCTION::Ajouter_Arete_Contour
int Ajouter_Arete_Contour(int nb)
Definition: occ_fonction_reconstruction.cpp:414
OCC_FONCTION_RECONSTRUCTION::Projeter_Point_Plan_Idealisee
int Projeter_Point_Plan_Idealisee(double x, double y, double z)
Definition: occ_fonction_reconstruction.cpp:624
OCC_FONCTION_RECONSTRUCTION::V22_def
gp_Vec V22_def
Definition: occ_fonction_reconstruction.h:112
Array_Surface_Ideal
TColGeom_Array1OfSurface Array_Surface_Ideal(1, 100)
OCC_FONCTION_RECONSTRUCTION::Creer_Face_Surface
int Creer_Face_Surface()
Definition: occ_fonction_reconstruction.cpp:278