MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
occ_import.h
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_import.h
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:55 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 
23 #ifdef BREP_OCC
24 #ifndef OCC_ImportH
25 #define OCC_ImportH
26 
27 
28 
29 
30 #include <vector>
31 #include "tpl_relation_entite.h"
32 #include "TopoDS_Shape.hxx"
33 #include "TopoDS_Face.hxx"
34 #include "TopoDS_Wire.hxx"
35 #include "TopoDS_Vertex.hxx"
36 #include "TopoDS_Edge.hxx"
37 #include "Geom_Surface.hxx"
38 #include "BRep_Builder.hxx"
39 #include "TopoDS_TFace.hxx"
40 #include "BRep_TFace.hxx"
41 #include "TopoDS_TVertex.hxx"
42 #include "BRep_TVertex.hxx"
43 #include "TopoDS_TEdge.hxx"
44 #include "BRep_TEdge.hxx"
45 #include "mg_surface.h"
46 #include "mg_face.h"
47 
48 
49 #include <iostream>
50 #include <math.h>
51 #include <string.h>
52 #include <iostream>
53 #include <stdlib.h>
54 
55 #include <occ_fonction.h>
56 
57 #define FICHIERSTEP 500
58 #define FICHIEROCC 501
59 
61 {
62 public:
63  OCC_IMPORT();
64  virtual ~OCC_IMPORT();
65 
66  class MG_GEOMETRIE* importer(class MG_GESTIONNAIRE& gest,char *path,int typefichier,double precision=1e-6);
67 
69  char *path_brep,
70  char* nom_caf,
71  int typefichier,
72  double precision=1e-6,
73  bool fusionner_entite_similaire=false);
74 
76  char *path_step,
77  char* nom_caf,
78  int typefichier,
79  double precision=1e-6,
80  bool fusionner_entite_similaire=false);
81 
82  void fusionne(MG_GEOMETRIE* mggeo);
83  class MG_MAILLAGE* importer(class MG_GESTIONNAIRE& gest,MG_GEOMETRIE* mggeo,double epsilon=1.,int mode=1);
84  class MG_MAILLAGE* importer_triangulation_V2017(class MG_GESTIONNAIRE& gest,MG_GEOMETRIE* mggeo,double epsilon=1.,int mode=1);
85  TopoDS_Shape ashape;
86  BRep_Builder abuilder;
87 
88 private:
89 
90  void relation(BRep_TFace* ent1,class MG_FACE* ent2);
91  void relation(Geom_Surface* ent1,class MG_SURFACE* ent2);
92  void relation(BRep_TEdge* ent1,class MG_ARETE* ent2);
93  void relation(Geom_Curve* ent1,class MG_COURBE* ent2);
94  void relation(BRep_TVertex* ent1,class MG_SOMMET* ent2);
95 
96 
97 
98 
99  MG_FACE* trouver(BRep_TFace* face);
100  MG_SURFACE* trouver(Geom_Surface* surface);
101  MG_ARETE* trouver(BRep_TEdge* edge);
102  MG_COURBE* trouver(Geom_Curve* courbe);
103  MG_SOMMET* trouver(BRep_TVertex* sommet);
104 
105  bool afusionne;
106 
107  std::vector<TPL_RELATION_ENTITE<BRep_TFace ,MG_FACE> > lst_face;
108  std::vector<TPL_RELATION_ENTITE<Geom_Surface,MG_SURFACE> > lst_surface;
109  std::vector<TPL_RELATION_ENTITE<BRep_TEdge,MG_ARETE> > lst_arete;
110  std::vector<TPL_RELATION_ENTITE<Geom_Curve,MG_COURBE> > lst_courbe;
111  std::vector<TPL_RELATION_ENTITE<BRep_TVertex,MG_SOMMET> > lst_sommet;
112 
113 };
114 
115 #endif
116 #endif
OCC_IMPORT::~OCC_IMPORT
virtual ~OCC_IMPORT()
Definition: occ_import.cpp:88
MG_SURFACE
Definition: mg_surface.h:31
mg_surface.h
OCC_IMPORT::importer_fichier_brep_V2017
class MG_GEOMETRIE * importer_fichier_brep_V2017(class MG_GESTIONNAIRE &gest, char *path_brep, char *nom_caf, int typefichier, double precision=1e-6, bool fusionner_entite_similaire=false)
Definition: occ_import.cpp:92
robustPredicates::epsilon
static REAL epsilon
Definition: robustpredicates.cc:371
OCC_IMPORT::afusionne
bool afusionne
Definition: occ_import.h:105
MG_MAILLAGE::gest
MG_GESTIONNAIRE * gest
Definition: mg_maillage.h:211
OCC_IMPORT::abuilder
BRep_Builder abuilder
Definition: occ_import.h:86
MG_GESTIONNAIRE
Definition: mg_gestionnaire.h:57
MG_COURBE
Definition: mg_courbe.h:30
OCC_IMPORT::importer
class MG_GEOMETRIE * importer(class MG_GESTIONNAIRE &gest, char *path, int typefichier, double precision=1e-6)
Definition: occ_import.cpp:255
tpl_relation_entite.h
OCC_IMPORT::lst_courbe
std::vector< TPL_RELATION_ENTITE< Geom_Curve, MG_COURBE > > lst_courbe
Definition: occ_import.h:110
OCC_IMPORT::importer_triangulation_V2017
class MG_MAILLAGE * importer_triangulation_V2017(class MG_GESTIONNAIRE &gest, MG_GEOMETRIE *mggeo, double epsilon=1., int mode=1)
Definition: occ_import.cpp:1122
MG_GEOMETRIE::precision
double precision
Definition: mg_geometrie.h:327
OCC_IMPORT::OCC_IMPORT
OCC_IMPORT()
Definition: occ_import.cpp:85
OCC_IMPORT::fusionne
void fusionne(MG_GEOMETRIE *mggeo)
Definition: occ_import.cpp:1115
OCC_IMPORT::trouver
MG_FACE * trouver(BRep_TFace *face)
Definition: occ_import.cpp:214
OCC_IMPORT::importer_fichier_STEP_V2017
class MG_GEOMETRIE * importer_fichier_STEP_V2017(class MG_GESTIONNAIRE &gest, char *path_step, char *nom_caf, int typefichier, double precision=1e-6, bool fusionner_entite_similaire=false)
Definition: occ_import.cpp:118
OCC_IMPORT::lst_face
std::vector< TPL_RELATION_ENTITE< BRep_TFace,MG_FACE > > lst_face
Definition: occ_import.h:107
OCC_IMPORT::lst_surface
std::vector< TPL_RELATION_ENTITE< Geom_Surface, MG_SURFACE > > lst_surface
Definition: occ_import.h:108
MG_GEOMETRIE
Definition: mg_geometrie.h:84
MG_MAILLAGE
Definition: mg_maillage.h:62
OCC_IMPORT::relation
void relation(BRep_TFace *ent1, class MG_FACE *ent2)
Definition: occ_import.cpp:170
MG_ARETE
Definition: mg_arete.h:36
MG_FACE
Definition: mg_face.h:34
occ_fonction.h
OCC_IMPORT::ashape
TopoDS_Shape ashape
Definition: occ_import.h:85
MG_SOMMET
Definition: mg_sommet.h:35
MG_GEOMETRIE::gest
MG_GESTIONNAIRE * gest
Definition: mg_geometrie.h:349
OCC_IMPORT::lst_sommet
std::vector< TPL_RELATION_ENTITE< BRep_TVertex, MG_SOMMET > > lst_sommet
Definition: occ_import.h:111
mg_face.h
OCC_IMPORT
Definition: occ_import.h:60
OCC_IMPORT::lst_arete
std::vector< TPL_RELATION_ENTITE< BRep_TEdge, MG_ARETE > > lst_arete
Definition: occ_import.h:109