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