1 |
couturad |
907 |
#include "mg_cg.h" |
2 |
|
|
#include "mg_gestionnaire.h" |
3 |
|
|
#include "mg_geometrie.h" |
4 |
|
|
#include "mg_sous_geometrie.h" |
5 |
|
|
#include "mg_cg_modele.h" |
6 |
|
|
#include "mg_cg_assemblage.h" |
7 |
|
|
#include "mg_arete.h" |
8 |
|
|
#include "mg_volume.h" |
9 |
|
|
#include "mg_cg_forme.h" |
10 |
|
|
|
11 |
|
|
#include "mg_cg_forme_arete.h" |
12 |
|
|
#include "mg_cg_forme_arete_droite.h" |
13 |
|
|
|
14 |
|
|
#include "mg_cg_forme_volume.h" |
15 |
|
|
#include "mg_cg_forme_volume_boite.h" |
16 |
|
|
#include "mg_cg_forme_volume_sphere.h" |
17 |
|
|
#include "mg_cg_forme_volume_ellipsoide.h" |
18 |
|
|
#include "mg_cg_forme_volume_cylindre.h" |
19 |
|
|
#include "mg_cg_forme_volume_cone.h" |
20 |
|
|
#include "mg_cg_forme_volume_tore.h" |
21 |
|
|
#include "mg_cg_forme_multiple.h" |
22 |
|
|
#include "mg_cg_forme_multi_volume.h" |
23 |
|
|
#include "mg_cg_op_bool_union.h" |
24 |
|
|
#include "mg_cg_op_bool_difference.h" |
25 |
|
|
#include "mg_cg_op_bool_intersection.h" |
26 |
|
|
#include "mg_cg_op_bool_fragment.h" |
27 |
|
|
#include "mg_cg_op_inclusion_matrice.h" |
28 |
|
|
#include "mg_cg_op_transf_rotation.h" |
29 |
|
|
#include "mg_cg_op_transf_translation.h" |
30 |
|
|
#include "mg_cg_op_transf_echelle.h" |
31 |
|
|
#ifdef ALL_OCC |
32 |
|
|
#include "occ_fonction.h" |
33 |
|
|
#include "occ_fonction_v2017.h" |
34 |
|
|
#include "occ_cg_forme_arete_droite.h" |
35 |
|
|
#include "occ_cg_forme_volume_boite.h" |
36 |
|
|
#include "occ_cg_forme_volume_sphere.h" |
37 |
|
|
#include "occ_cg_forme_volume_ellipsoide.h" |
38 |
|
|
#include "occ_cg_forme_volume_cylindre.h" |
39 |
|
|
#include "occ_cg_forme_volume_cone.h" |
40 |
|
|
#include "occ_cg_forme_volume_tore.h" |
41 |
|
|
#include "occ_cg_op_bool_union.h" |
42 |
|
|
#include "occ_cg_op_bool_difference.h" |
43 |
|
|
#include "occ_cg_op_bool_intersection.h" |
44 |
|
|
#include "occ_cg_op_bool_fragment.h" |
45 |
|
|
#include "occ_cg_op_inclusion_matrice.h" |
46 |
|
|
#include "occ_cg_op_transf_rotation.h" |
47 |
|
|
#include "occ_cg_op_transf_translation.h" |
48 |
|
|
#include "occ_cg_op_transf_echelle.h" |
49 |
|
|
#endif |
50 |
|
|
|
51 |
|
|
MG_CG_MODELE* MG_CG::creer_MG_CG_MODELE(MG_GESTIONNAIRE* mg_gestionnaire, string nom_mgcg_modele,double unite,double eps) |
52 |
|
|
{ |
53 |
|
|
#ifdef ALL_OCC |
54 |
|
|
MG_GEOMETRIE* mg_geometrie = new MG_GEOMETRIE((char*)"OCCV2017",(char*)nom_mgcg_modele.c_str(),unite,eps); |
55 |
|
|
mg_gestionnaire->ajouter_mg_geometrie(mg_geometrie); |
56 |
|
|
return new MG_CG_MODELE(mg_gestionnaire,nom_mgcg_modele,mg_geometrie); |
57 |
|
|
#endif |
58 |
|
|
} |
59 |
|
|
|
60 |
|
|
MG_CG_MODELE* MG_CG::creer_MG_CG_MODELE(MG_GESTIONNAIRE* mg_gestionnaire, string nom_mgcg_modele, MG_GEOMETRIE* mg_geometrie) |
61 |
|
|
{ |
62 |
|
|
return new MG_CG_MODELE(mg_gestionnaire,nom_mgcg_modele,mg_geometrie); |
63 |
|
|
} |
64 |
|
|
|
65 |
|
|
MG_CG_MODELE* MG_CG::creer_MG_CG_MODELE(MG_GESTIONNAIRE* mg_gestionnaire, string nom_mgcg_modele, MG_GEOMETRIE* mg_geometrie, long unsigned int num) |
66 |
|
|
{ |
67 |
|
|
return new MG_CG_MODELE(mg_gestionnaire,nom_mgcg_modele,mg_geometrie,num); |
68 |
|
|
} |
69 |
|
|
|
70 |
|
|
MG_CG_ASSEMBLAGE* MG_CG::creer_MG_CG_ASSEMBLAGE(MG_CG_MODELE* mgcg_modele, string nom_mgcg_assemblage) |
71 |
|
|
{ |
72 |
|
|
return new MG_CG_ASSEMBLAGE(mgcg_modele,nom_mgcg_assemblage); |
73 |
|
|
} |
74 |
|
|
|
75 |
|
|
MG_CG_ASSEMBLAGE* MG_CG::creer_MG_CG_ASSEMBLAGE(MG_CG_MODELE* mgcg_modele, long unsigned int num, string nom_mgcg_assemblage, MG_SOUS_GEOMETRIE* mg_sous_geometrie) |
76 |
|
|
{ |
77 |
|
|
return new MG_CG_ASSEMBLAGE(mgcg_modele,num,nom_mgcg_assemblage,mg_sous_geometrie); |
78 |
|
|
} |
79 |
|
|
|
80 |
|
|
MG_CG_FORME_ARETE* MG_CG::creer_MG_CG_FORME_ARETE(int provenance, MG_ARETE* mg_arete) |
81 |
|
|
{ |
82 |
|
|
return new MG_CG_FORME_ARETE(provenance,mg_arete); |
83 |
|
|
} |
84 |
|
|
|
85 |
|
|
MG_CG_FORME_ARETE* MG_CG::creer_MG_CG_FORME_ARETE(int provenance, int etat, long unsigned int num, MG_ARETE* mg_arete) |
86 |
|
|
{ |
87 |
|
|
return new MG_CG_FORME_ARETE(provenance,etat,num,mg_arete); |
88 |
|
|
} |
89 |
|
|
|
90 |
|
|
MG_CG_FORME_ARETE_DROITE* MG_CG::creer_MG_CG_FORME_ARETE_DROITE(double x1, double y1, double z1, double x2, double y2, double z2) |
91 |
|
|
{ |
92 |
|
|
#ifdef ALL_OCC |
93 |
|
|
return new OCC_CG_FORME_ARETE_DROITE(x1,y1,z1,x2,y2,z2); |
94 |
|
|
#endif |
95 |
|
|
} |
96 |
|
|
|
97 |
|
|
MG_CG_FORME_ARETE_DROITE* MG_CG::creer_MG_CG_FORME_ARETE_DROITE(int etat, long unsigned int num, MG_ARETE* mg_arete, double x1, double y1, double z1, double x2, double y2, double z2) |
98 |
|
|
{ |
99 |
|
|
#ifdef ALL_OCC |
100 |
|
|
return new OCC_CG_FORME_ARETE_DROITE(etat,num,mg_arete,x1,y1,z1,x2,y2,z2); |
101 |
|
|
#endif |
102 |
|
|
} |
103 |
|
|
|
104 |
|
|
MG_CG_FORME_VOLUME* MG_CG::creer_MG_CG_FORME_VOLUME(int provenance, MG_VOLUME* mg_volume) |
105 |
|
|
{ |
106 |
|
|
return new MG_CG_FORME_VOLUME(provenance,mg_volume); |
107 |
|
|
} |
108 |
|
|
|
109 |
|
|
MG_CG_FORME_VOLUME* MG_CG::creer_MG_CG_FORME_VOLUME(int provenance, int etat, long unsigned int num, MG_VOLUME* mg_volume) |
110 |
|
|
{ |
111 |
|
|
return new MG_CG_FORME_VOLUME(provenance,etat,num,mg_volume); |
112 |
|
|
} |
113 |
|
|
|
114 |
|
|
MG_CG_FORME_VOLUME_BOITE* MG_CG::creer_MG_CG_FORME_VOLUME_BOITE(double x1, double y1, double z1, double x2, double y2, double z2) |
115 |
|
|
{ |
116 |
|
|
#ifdef ALL_OCC |
117 |
|
|
return new OCC_CG_FORME_VOLUME_BOITE(x1,y1,z1,x2,y2,z2); |
118 |
|
|
#endif |
119 |
|
|
} |
120 |
|
|
|
121 |
|
|
MG_CG_FORME_VOLUME_BOITE* MG_CG::creer_MG_CG_FORME_VOLUME_BOITE(int etat, long unsigned int num, MG_VOLUME* mg_volume, double x1, double y1, double z1, double x2, double y2, double z2) |
122 |
|
|
{ |
123 |
|
|
#ifdef ALL_OCC |
124 |
|
|
return new OCC_CG_FORME_VOLUME_BOITE(etat,num,mg_volume,x1,y1,z1,x2,y2,z2); |
125 |
|
|
#endif |
126 |
|
|
} |
127 |
|
|
|
128 |
|
|
MG_CG_FORME_VOLUME_SPHERE* MG_CG::creer_MG_CG_FORME_VOLUME_SPHERE(double centre_x, double centre_y, double centre_z, double rayon) |
129 |
|
|
{ |
130 |
|
|
#ifdef ALL_OCC |
131 |
|
|
return new OCC_CG_FORME_VOLUME_SPHERE(centre_x,centre_y,centre_z,rayon); |
132 |
|
|
#endif |
133 |
|
|
} |
134 |
|
|
|
135 |
|
|
MG_CG_FORME_VOLUME_SPHERE* MG_CG::creer_MG_CG_FORME_VOLUME_SPHERE(int etat, long unsigned int num, MG_VOLUME* mg_volume, double centre_x, double centre_y, double centre_z, double rayon) |
136 |
|
|
{ |
137 |
|
|
#ifdef ALL_OCC |
138 |
|
|
return new OCC_CG_FORME_VOLUME_SPHERE(etat,num,mg_volume,centre_x,centre_y,centre_z,rayon); |
139 |
|
|
#endif |
140 |
|
|
} |
141 |
|
|
|
142 |
|
|
MG_CG_FORME_VOLUME_ELLIPSOIDE* MG_CG::creer_MG_CG_FORME_VOLUME_ELLIPSOIDE(double centre_x, double centre_y, double centre_z, double direction_x, double direction_y, double direction_z, double rayon_majeur, double rayon_mineur) |
143 |
|
|
{ |
144 |
|
|
#ifdef ALL_OCC |
145 |
|
|
return new OCC_CG_FORME_VOLUME_ELLIPSOIDE(centre_x,centre_y,centre_z,direction_x,direction_y,direction_z,rayon_majeur,rayon_mineur); |
146 |
|
|
#endif |
147 |
|
|
} |
148 |
|
|
|
149 |
|
|
MG_CG_FORME_VOLUME_ELLIPSOIDE* MG_CG::creer_MG_CG_FORME_VOLUME_ELLIPSOIDE(int etat, long unsigned int num, MG_VOLUME* mg_volume, double centre_x, double centre_y, double centre_z, double direction_x, double direction_y, double direction_z, double rayon_majeur, double rayon_mineur) |
150 |
|
|
{ |
151 |
|
|
#ifdef ALL_OCC |
152 |
|
|
return new OCC_CG_FORME_VOLUME_ELLIPSOIDE(etat,num,mg_volume,centre_x,centre_y,centre_z,direction_x,direction_y,direction_z,rayon_majeur,rayon_mineur); |
153 |
|
|
#endif |
154 |
|
|
} |
155 |
|
|
|
156 |
|
|
MG_CG_FORME_VOLUME_CYLINDRE* MG_CG::creer_MG_CG_FORME_VOLUME_CYLINDRE(double extremite_x, double extremite_y, double extremite_z, double direction_x, double direction_y, double direction_z, double rayon, double longueur) |
157 |
|
|
{ |
158 |
|
|
#ifdef ALL_OCC |
159 |
|
|
return new OCC_CG_FORME_VOLUME_CYLINDRE(extremite_x,extremite_y,extremite_z,direction_x,direction_y,direction_z,rayon,longueur); |
160 |
|
|
#endif |
161 |
|
|
} |
162 |
|
|
|
163 |
|
|
MG_CG_FORME_VOLUME_CYLINDRE* MG_CG::creer_MG_CG_FORME_VOLUME_CYLINDRE(int etat, long unsigned int num, MG_VOLUME* mg_volume, double extremite_x, double extremite_y, double extremite_z, double direction_x, double direction_y, double direction_z, double rayon, double longueur) |
164 |
|
|
{ |
165 |
|
|
#ifdef ALL_OCC |
166 |
|
|
return new OCC_CG_FORME_VOLUME_CYLINDRE(etat,num,mg_volume,extremite_x,extremite_y,extremite_z,direction_x,direction_y,direction_z,rayon,longueur); |
167 |
|
|
#endif |
168 |
|
|
} |
169 |
|
|
|
170 |
|
|
MG_CG_FORME_VOLUME_CONE* MG_CG::creer_MG_CG_FORME_VOLUME_CONE(double extremite_x, double extremite_y, double extremite_z, double direction_x, double direction_y, double direction_z, double rayon, double longueur) |
171 |
|
|
{ |
172 |
|
|
#ifdef ALL_OCC |
173 |
|
|
return new OCC_CG_FORME_VOLUME_CONE(extremite_x,extremite_y,extremite_z,direction_x,direction_y,direction_z,rayon,longueur); |
174 |
|
|
#endif |
175 |
|
|
} |
176 |
|
|
|
177 |
|
|
MG_CG_FORME_VOLUME_CONE* MG_CG::creer_MG_CG_FORME_VOLUME_CONE(int etat, long unsigned int num, MG_VOLUME* mg_volume, double extremite_x, double extremite_y, double extremite_z, double direction_x, double direction_y, double direction_z, double rayon, double longueur) |
178 |
|
|
{ |
179 |
|
|
#ifdef ALL_OCC |
180 |
|
|
return new OCC_CG_FORME_VOLUME_CONE(etat,num,mg_volume,extremite_x,extremite_y,extremite_z,direction_x,direction_y,direction_z,rayon,longueur); |
181 |
|
|
#endif |
182 |
|
|
} |
183 |
|
|
|
184 |
|
|
MG_CG_FORME_VOLUME_TORE* MG_CG::creer_MG_CG_FORME_VOLUME_TORE(double centre_x, double centre_y, double centre_z, double direction_x, double direction_y, double direction_z, double rayon_cercle, double rayon_tore) |
185 |
|
|
{ |
186 |
|
|
#ifdef ALL_OCC |
187 |
|
|
return new OCC_CG_FORME_VOLUME_TORE(centre_x,centre_y,centre_z,direction_x,direction_y,direction_z,rayon_cercle,rayon_tore); |
188 |
|
|
#endif |
189 |
|
|
} |
190 |
|
|
|
191 |
|
|
MG_CG_FORME_VOLUME_TORE* MG_CG::creer_MG_CG_FORME_VOLUME_TORE(int etat, long unsigned int num, MG_VOLUME* mg_volume, double centre_x, double centre_y, double centre_z, double direction_x, double direction_y, double direction_z, double rayon_cercle, double rayon_tore) |
192 |
|
|
{ |
193 |
|
|
#ifdef ALL_OCC |
194 |
|
|
return new OCC_CG_FORME_VOLUME_TORE(etat,num,mg_volume,centre_x,centre_y,centre_z,direction_x,direction_y,direction_z,rayon_cercle,rayon_tore); |
195 |
|
|
#endif |
196 |
|
|
} |
197 |
|
|
|
198 |
|
|
MG_CG_FORME_MULTIPLE* MG_CG::creer_MG_CG_FORME_MULTIPLE(int provenance, std::vector< MG_ELEMENT_TOPOLOGIQUE* >& vector_mg_element_topologique, std::vector< MG_ELEMENT_COTOPOLOGIQUE* >& vector_mg_element_cotopologique) |
199 |
|
|
{ |
200 |
|
|
return new MG_CG_FORME_MULTIPLE(provenance,vector_mg_element_topologique,vector_mg_element_cotopologique); |
201 |
|
|
} |
202 |
|
|
|
203 |
|
|
MG_CG_FORME_MULTIPLE* MG_CG::creer_MG_CG_FORME_MULTIPLE(int provenance, int etat, long unsigned int num, std::vector< MG_ELEMENT_TOPOLOGIQUE* >& vector_mg_element_topologique, std::vector< MG_ELEMENT_COTOPOLOGIQUE* >& vector_mg_element_cotopologique) |
204 |
|
|
{ |
205 |
|
|
return new MG_CG_FORME_MULTIPLE(provenance,etat,num,vector_mg_element_topologique,vector_mg_element_cotopologique); |
206 |
|
|
} |
207 |
|
|
|
208 |
|
|
MG_CG_FORME_MULTI_VOLUME* MG_CG::creer_MG_CG_FORME_MULTI_VOLUME(int provenance, std::vector< MG_VOLUME* >& vector_mg_volume) |
209 |
|
|
{ |
210 |
|
|
return new MG_CG_FORME_MULTI_VOLUME(provenance,vector_mg_volume); |
211 |
|
|
} |
212 |
|
|
|
213 |
|
|
MG_CG_FORME_MULTI_VOLUME* MG_CG::creer_MG_CG_FORME_MULTI_VOLUME(int provenance, int etat, long unsigned int num, std::vector< MG_VOLUME* >& vector_mg_volume) |
214 |
|
|
{ |
215 |
|
|
return new MG_CG_FORME_MULTI_VOLUME(provenance,etat,num,vector_mg_volume); |
216 |
|
|
} |
217 |
|
|
|
218 |
|
|
MG_CG_OP_BOOL_UNION* MG_CG::creer_MG_CG_OP_BOOL_UNION(int semantique, MG_CG_FORME* mgcg_forme_entree_1, MG_CG_FORME* mgcg_forme_entree_2) |
219 |
|
|
{ |
220 |
|
|
#ifdef ALL_OCC |
221 |
|
|
return new OCC_CG_OP_BOOL_UNION(semantique,mgcg_forme_entree_1,mgcg_forme_entree_2); |
222 |
|
|
#endif |
223 |
|
|
} |
224 |
|
|
|
225 |
|
|
MG_CG_OP_BOOL_UNION* MG_CG::creer_MG_CG_OP_BOOL_UNION(int semantique, int etat, long unsigned int num, MG_CG_FORME* mgcg_forme_entree_1, MG_CG_FORME* mgcg_forme_entree_2, long int id_mgcg_forme_sortie) |
226 |
|
|
{ |
227 |
|
|
#ifdef ALL_OCC |
228 |
|
|
return new OCC_CG_OP_BOOL_UNION(semantique,etat,num,mgcg_forme_entree_1,mgcg_forme_entree_2,id_mgcg_forme_sortie); |
229 |
|
|
#endif |
230 |
|
|
} |
231 |
|
|
|
232 |
|
|
MG_CG_OP_BOOL_DIFFERENCE* MG_CG::creer_MG_CG_OP_BOOL_DIFFERENCE(int semantique, MG_CG_FORME* mgcg_forme_entree_1, MG_CG_FORME* mgcg_forme_entree_2) |
233 |
|
|
{ |
234 |
|
|
#ifdef ALL_OCC |
235 |
|
|
return new OCC_CG_OP_BOOL_DIFFERENCE(semantique,mgcg_forme_entree_1,mgcg_forme_entree_2); |
236 |
|
|
#endif |
237 |
|
|
} |
238 |
|
|
|
239 |
|
|
MG_CG_OP_BOOL_DIFFERENCE* MG_CG::creer_MG_CG_OP_BOOL_DIFFERENCE(int semantique, int etat, long unsigned int num, MG_CG_FORME* mgcg_forme_entree_1, MG_CG_FORME* mgcg_forme_entree_2, long int id_mgcg_forme_sortie) |
240 |
|
|
{ |
241 |
|
|
#ifdef ALL_OCC |
242 |
|
|
return new OCC_CG_OP_BOOL_DIFFERENCE(semantique,etat,num,mgcg_forme_entree_1,mgcg_forme_entree_2,id_mgcg_forme_sortie); |
243 |
|
|
#endif |
244 |
|
|
} |
245 |
|
|
|
246 |
|
|
MG_CG_OP_BOOL_INTERSECTION* MG_CG::creer_MG_CG_OP_BOOL_INTERSECTION(int semantique, MG_CG_FORME* mgcg_forme_entree_1, MG_CG_FORME* mgcg_forme_entree_2) |
247 |
|
|
{ |
248 |
|
|
#ifdef ALL_OCC |
249 |
|
|
return new OCC_CG_OP_BOOL_INTERSECTION(semantique,mgcg_forme_entree_1,mgcg_forme_entree_2); |
250 |
|
|
#endif |
251 |
|
|
} |
252 |
|
|
|
253 |
|
|
MG_CG_OP_BOOL_INTERSECTION* MG_CG::creer_MG_CG_OP_BOOL_INTERSECTION(int semantique, int etat, long unsigned int num, MG_CG_FORME* mgcg_forme_entree_1, MG_CG_FORME* mgcg_forme_entree_2, long int id_mgcg_forme_sortie) |
254 |
|
|
{ |
255 |
|
|
#ifdef ALL_OCC |
256 |
|
|
return new OCC_CG_OP_BOOL_INTERSECTION(semantique,etat,num,mgcg_forme_entree_1,mgcg_forme_entree_2,id_mgcg_forme_sortie); |
257 |
|
|
#endif |
258 |
|
|
} |
259 |
|
|
|
260 |
|
|
MG_CG_OP_BOOL_FRAGMENT* MG_CG::creer_MG_CG_OP_BOOL_FRAGMENT(int semantique, MG_CG_FORME* mgcg_forme_entree_1, MG_CG_FORME* mgcg_forme_entree_2) |
261 |
|
|
{ |
262 |
|
|
#ifdef ALL_OCC |
263 |
|
|
return new OCC_CG_OP_BOOL_FRAGMENT(semantique,mgcg_forme_entree_1,mgcg_forme_entree_2); |
264 |
|
|
#endif |
265 |
|
|
} |
266 |
|
|
|
267 |
|
|
MG_CG_OP_BOOL_FRAGMENT* MG_CG::creer_MG_CG_OP_BOOL_FRAGMENT(int semantique, int etat, long unsigned int num, MG_CG_FORME* mgcg_forme_entree_1, MG_CG_FORME* mgcg_forme_entree_2, long int id_mgcg_forme_sortie) |
268 |
|
|
{ |
269 |
|
|
#ifdef ALL_OCC |
270 |
|
|
return new OCC_CG_OP_BOOL_FRAGMENT(semantique,etat,num,mgcg_forme_entree_1,mgcg_forme_entree_2,id_mgcg_forme_sortie); |
271 |
|
|
#endif |
272 |
|
|
} |
273 |
|
|
|
274 |
|
|
MG_CG_OP_INCLUSION_MATRICE* MG_CG::creer_MG_CG_OP_INCLUSION_MATRICE(int semantique, MG_CG_FORME* mgcg_forme_inclusion_entree, MG_CG_FORME* mgcg_forme_matrice_entree) |
275 |
|
|
{ |
276 |
|
|
#ifdef ALL_OCC |
277 |
|
|
return new OCC_CG_OP_INCLUSION_MATRICE(semantique,mgcg_forme_inclusion_entree,mgcg_forme_matrice_entree); |
278 |
|
|
#endif |
279 |
|
|
} |
280 |
|
|
|
281 |
|
|
MG_CG_OP_INCLUSION_MATRICE* MG_CG::creer_MG_CG_OP_INCLUSION_MATRICE(int semantique, int etat, long unsigned int num, MG_CG_FORME* mgcg_forme_inclusion_entree, MG_CG_FORME* mgcg_forme_matrice_entree, long int id_mgcg_forme_inclusion_sortie, long int id_mgcg_forme_matrice_sortie) |
282 |
|
|
{ |
283 |
|
|
#ifdef ALL_OCC |
284 |
|
|
return new OCC_CG_OP_INCLUSION_MATRICE(semantique,etat,num,mgcg_forme_inclusion_entree,mgcg_forme_matrice_entree,id_mgcg_forme_inclusion_sortie,id_mgcg_forme_matrice_sortie); |
285 |
|
|
#endif |
286 |
|
|
} |
287 |
|
|
|
288 |
|
|
MG_CG_OP_TRANSF_ROTATION* MG_CG::creer_MG_CG_OP_TRANSF_ROTATION(int semantique, MG_CG_FORME* mgcg_forme_entree) |
289 |
|
|
{ |
290 |
|
|
#ifdef ALL_OCC |
291 |
|
|
return new OCC_CG_OP_TRANSF_ROTATION(semantique,mgcg_forme_entree); |
292 |
|
|
#endif |
293 |
|
|
} |
294 |
|
|
|
295 |
|
|
MG_CG_OP_TRANSF_ROTATION* MG_CG::creer_MG_CG_OP_TRANSF_ROTATION(int semantique, int etat, long unsigned int num, MG_CG_FORME* mgcg_forme_entree, long int id_mgcg_forme_sortie) |
296 |
|
|
{ |
297 |
|
|
#ifdef ALL_OCC |
298 |
|
|
return new OCC_CG_OP_TRANSF_ROTATION(semantique,etat,num,mgcg_forme_entree,id_mgcg_forme_sortie); |
299 |
|
|
#endif |
300 |
|
|
} |
301 |
|
|
|
302 |
|
|
MG_CG_OP_TRANSF_TRANSLATION* MG_CG::creer_MG_CG_OP_TRANSF_TRANSLATION(int semantique, MG_CG_FORME* mgcg_forme_entree) |
303 |
|
|
{ |
304 |
|
|
#ifdef ALL_OCC |
305 |
|
|
return new OCC_CG_OP_TRANSF_TRANSLATION(semantique,mgcg_forme_entree); |
306 |
|
|
#endif |
307 |
|
|
} |
308 |
|
|
|
309 |
|
|
MG_CG_OP_TRANSF_TRANSLATION* MG_CG::creer_MG_CG_OP_TRANSF_TRANSLATION(int semantique, int etat, long unsigned int num, MG_CG_FORME* mgcg_forme_entree, long int id_mgcg_forme_sortie) |
310 |
|
|
{ |
311 |
|
|
#ifdef ALL_OCC |
312 |
|
|
return new OCC_CG_OP_TRANSF_TRANSLATION(semantique,etat,num,mgcg_forme_entree,id_mgcg_forme_sortie); |
313 |
|
|
#endif |
314 |
|
|
} |
315 |
|
|
|
316 |
|
|
MG_CG_OP_TRANSF_ECHELLE* MG_CG::creer_MG_CG_OP_TRANSF_ECHELLE(int semantique, MG_CG_FORME* mgcg_forme_entree) |
317 |
|
|
{ |
318 |
|
|
#ifdef ALL_OCC |
319 |
|
|
return new OCC_CG_OP_TRANSF_ECHELLE(semantique,mgcg_forme_entree); |
320 |
|
|
#endif |
321 |
|
|
} |
322 |
|
|
|
323 |
|
|
MG_CG_OP_TRANSF_ECHELLE* MG_CG::creer_MG_CG_OP_TRANSF_ECHELLE(int semantique, int etat, long unsigned int num, MG_CG_FORME* mgcg_forme_entree, long int id_mgcg_forme_sortie) |
324 |
|
|
{ |
325 |
|
|
#ifdef ALL_OCC |
326 |
|
|
return new OCC_CG_OP_TRANSF_ECHELLE(semantique,etat,num,mgcg_forme_entree,id_mgcg_forme_sortie); |
327 |
|
|
#endif |
328 |
|
|
} |
329 |
|
|
|
330 |
|
|
int MG_CG::exporter_fichier_brep(char* nom, MG_CG_MODELE* mgcg_modele) |
331 |
|
|
{ |
332 |
|
|
MG_GEOMETRIE* mg_geometrie = mgcg_modele->get_mg_geometrie(); |
333 |
|
|
#ifdef ALL_OCC |
334 |
|
|
OCC_FONCTION* occ_fonction = &mg_geometrie->get_occ_fonction(); |
335 |
|
|
if(occ_fonction->get_version()=="OCCV2017") |
336 |
|
|
{ |
337 |
|
|
OCC_FONCTION_V2017* occ_fonction_v2017 = (OCC_FONCTION_V2017*)occ_fonction; |
338 |
|
|
return occ_fonction_v2017->exporter_fichier_brep(nom,mg_geometrie); |
339 |
|
|
} |
340 |
|
|
#endif |
341 |
|
|
return 0; |
342 |
|
|
} |
343 |
|
|
|
344 |
|
|
int MG_CG::exporter_fichier_brep(char* nom, MG_CG_ASSEMBLAGE* mgcg_assemblage) |
345 |
|
|
{ |
346 |
|
|
MG_GEOMETRIE* mg_geometrie_modele = mgcg_assemblage->get_mgcg_modele()->get_mg_geometrie(); |
347 |
|
|
MG_GEOMETRIE* mg_geometrie_assemblage = (MG_GEOMETRIE*)mgcg_assemblage->get_mg_sous_geometrie(); |
348 |
|
|
#ifdef ALL_OCC |
349 |
|
|
OCC_FONCTION* occ_fonction = &mg_geometrie_modele->get_occ_fonction(); |
350 |
|
|
if(occ_fonction->get_version()=="OCCV2017") |
351 |
|
|
{ |
352 |
|
|
OCC_FONCTION_V2017* occ_fonction_v2017 = (OCC_FONCTION_V2017*)occ_fonction; |
353 |
|
|
return occ_fonction_v2017->exporter_fichier_brep(nom,mgcg_assemblage->get_mg_sous_geometrie()); |
354 |
|
|
} |
355 |
|
|
#endif |
356 |
|
|
return 0; |
357 |
|
|
} |
358 |
|
|
|
359 |
|
|
|
360 |
|
|
|
361 |
|
|
|
362 |
|
|
|
363 |
|
|
|
364 |
|
|
|
365 |
|
|
|
366 |
|
|
|
367 |
|
|
|