ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/reconstruction/src/occ_fonction.h
Revision: 481
Committed: Tue Jan 28 16:10:58 2014 UTC (11 years, 4 months ago) by francois
Content type: text/plain
File size: 5713 byte(s)
Log Message:
unification de la facon d'ecrire les fichiers tous en minuscules

File Contents

# User Rev Content
1 louhichi 211
2     #ifdef BREP_OCC
3 5 #ifndef OCC_fonctionH
4     #define OCC_fonctionH
5    
6    
7 louhichi 211
8 5 //------------------------------------------------------------------------------
9    
10     #ifdef WINDOWS_VERSION
11     #ifdef BUILT_DLL_RECONSTRUCTION
12     #define DLLPORTRECONSTRUCTION __declspec(dllexport)
13     #else
14     #define DLLPORTRECONSTRUCTION __declspec(dllimport)
15     #endif
16     #else
17     #define DLLPORTRECONSTRUCTION
18     #endif
19    
20 souaissa 116 #include <BRep_Builder.hxx>
21     #include <TopoDS_Shell.hxx>
22     #include <GeomPlate_BuildPlateSurface.hxx>
23     #include <TColgp_Array1OfPnt.hxx>
24     #include <Geom_BSplineCurve.hxx>
25     #include <GeomAPI_PointsToBSpline.hxx>
26     #include <GeomAdaptor_HCurve.hxx>
27     #include <Handle_GeomAdaptor_HCurve.hxx>
28     #include <BRepFill_CurveConstraint.hxx>
29     #include <Handle_BRepFill_CurveConstraint.hxx>
30     #include <GeomPlate_PointConstraint.hxx>
31     #include <GeomPlate_MakeApprox.hxx>
32     #include <TopoDS_Wire.hxx>
33     #include <BRepBuilderAPI_MakeWire.hxx>
34     #include <GeomAPI_ProjectPointOnSurf.hxx>
35     #include <TColgp_Array1OfPnt2d.hxx>
36     #include <Geom2d_BSplineCurve.hxx>
37     #include <Geom2dAPI_PointsToBSpline.hxx>
38     #include <BRepBuilderAPI_MakeEdge.hxx>
39     #include <TopoDS_Face.hxx>
40     #include <BRepBuilderAPI_MakeFace.hxx>
41     #include <TopoDS_Solid.hxx>
42     #include <STEPControl_Writer.hxx>
43     #include <gp_Ax3.hxx>
44     #include <Geom_CylindricalSurface.hxx>
45     #include <TColGeom_Array1OfBSplineCurve.hxx>
46     #include <GeomFill_SimpleBound.hxx>
47     #include <GeomFill_ConstrainedFilling.hxx>
48     #include <Geom_ConicalSurface.hxx>
49     #include <Geom_ToroidalSurface.hxx>
50     #include <Geom_SphericalSurface.hxx>
51 5
52 souaissa 116
53     #include <GProp_PEquation.hxx>
54     #include <Geom_Line.hxx>
55     #include <GeomAPI_ProjectPointOnCurve.hxx>
56     #include <Geom_SurfaceOfRevolution.hxx>
57     #include <Geom_Circle.hxx>
58     #include <gp_Pln.hxx>
59     #include <Geom_Plane.hxx>
60     #include <TColGeom_Array1OfSurface.hxx>
61     #include <GCE2d_MakeSegment.hxx>
62     #include <GC_MakeArcOfCircle.hxx>
63     #include <GeomProjLib.hxx>
64     #include <gp_Elips2d.hxx>
65     #include <GCE2d_MakeArcOfEllipse.hxx>
66     #include <gp_Circ2d.hxx>
67     #include <GCE2d_MakeArcOfCircle.hxx>
68     #include <gp_Cylinder.hxx>
69    
70 louhichi 211
71    
72    
73 5 class DLLPORTRECONSTRUCTION OCC_FONCTION
74     {
75     public:
76 souaissa 116
77 louhichi 211 BRep_Builder B;
78     TopoDS_Shell Sh;
79 souaissa 116
80 louhichi 211
81    
82     Handle (Geom_Surface) Surf1;
83    
84     TopoDS_Face F1;
85    
86 souaissa 116 GeomPlate_BuildPlateSurface BPSurf;
87 louhichi 211
88     BRepBuilderAPI_MakeWire W1;
89 souaissa 116 int Face_Revol;
90 louhichi 211
91     Standard_Real U,V;
92    
93     TopoDS_Edge E;
94     Handle(Geom_Curve) Cur;
95     Handle(Geom2d_Curve) Curve;
96    
97    
98    
99     gp_Pnt P_def;
100     gp_Vec V11_def;
101     gp_Vec V22_def;
102     gp_Vec V33_def;
103    
104     double Array_Boite[12];
105    
106     //int c;
107     double d;
108     bool b;
109    
110     Handle(Geom_Curve) Curve_Projection;
111 souaissa 116 gp_Pnt N;
112 louhichi 211
113     double Pt_Proj_Line[3];
114    
115 souaissa 116 gp_Pnt Point_Projetee;
116 louhichi 211 double Pt_Proj_Surf_Ideal[3];
117 souaissa 116
118 louhichi 211
119    
120     OCC_FONCTION();
121    
122    
123 5 virtual ~OCC_FONCTION();
124    
125 francois 38
126 louhichi 211
127    
128     int Creer_Coquille();
129     int Ajouter_face_Coquille();
130     int Enregistrer(char *path);
131     //int Creer_Surf_Plane(double Pnt_Insersion[3], double Vect_Normal[3]);
132     int Ajouter_Contour_Face(int ii);
133     //int Enregistrer_Face(char* path);
134     int Creer_Surface_Cylindrique(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon);
135     int Creer_Surface_Conique(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon, double Angle);
136     int Creer_Surface_Torique(double Pnt_Insersion[], double Vect_Directeur[], double GRayon, double PRayon);
137     int Creer_Surf_Spherique(double Pnt_Insersion[], double Vect_Directeur[], double Rayon);
138    
139     int Initialiser_Surface();
140     int Rapprocher_Surface_Point(double x, double y, double z);
141     int Calculer_Surface();
142     int Determiner_Surface();
143    
144     //int Initialiser_Contour_Contraint();
145    
146     int Ajouter_Point_Courbe(double x, double y, double z, int i);
147    
148    
149    
150    
151    
152     int Ajouter_courbe_liste(int nb_pts,int num);
153     int Construire_Surface_Contour(int nb_aretes_ext);
154    
155     //int Convertir_Surface();
156    
157    
158     int Creer_Face_Surface();
159     int Creer_Contour();
160     int Creer_Arete_Lineaire(double P1[3], double P2[3]);
161    
162     int Creer_Arete_Circulaire(double Pnt_Insersion[3], double Normal[3],double P1[3], double P2[3], double Rayon);
163     int Creer_Arete_Elliptique(double Pnt_Insersion[], double P1[], double P2[], double GRayon, double PRayon);
164    
165     int Ajouter_Point_Arete(double x, double y, double z, int i);
166    
167    
168     /*
169     int Construire_Arete_Spline(int nb_pts);
170     int Enregistrer_Arete(char* path);
171     */
172    
173    
174    
175     int Rapprocher_Surface_Courbe_Spline(int nb_pts);
176     int Ajouter_Arete_Contour(int nb);
177    
178     int Initialiser_Surface_Cylindrique(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon);
179     int Initialiser_Surface_Surface();
180    
181    
182     int Ajouter_Point_Array_Ideal(double x, double y, double z, int i);
183     int Determiner_Param_Boite(int i);
184    
185     double Get_Param_Boite(int i);
186     int Determiner_Plan(int nb, double Epsilon);
187    
188     int Ligne_Revolution(double Pnt_Inser[], double Vect_Direc[]);
189     double Distance_Point_Curve(double x, double y, double z);
190    
191     int Pt_Proj_Ligne();
192     double Pnt_Proj_Ligne(int ii);
193    
194     int GCercle_Tore(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon);
195    
196    
197     int Creer_Surface_Cylindrique_Revolution(double Pnt_Insersion[3], double Vect_Directeur[3],double Vecteur1[3],double Rayon);
198     int Face_Revolution();
199    
200    
201     int Ajouter_Surface_liste_Ideal(int num);
202    
203     int Projeter_Point_Surface_Idealisee(double x, double y,double z, int num);
204     int Pt_Proj_Surface_Ideal();
205     double Pnt_Proj_Surface_Ideal(int ii);
206    
207     int Projeter_Point_Plan_Idealisee(double x, double y,double z);
208    
209    
210    
211     int Ajouter_Point_AreteUV(int testU, int testV, double x, double y, double z, int i);
212     double Analyser_interval_AreteU(double x, double y, double z);
213     double Analyser_interval_AreteV(double x, double y, double z);
214    
215     int InitialiserArray(double x, double y, double z, int i);
216    
217    
218    
219 5 private:
220    
221    
222 louhichi 211
223 5 } ;
224 louhichi 211
225    
226    
227 5 #endif
228 louhichi 211 #endif
229 5
230