ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/CAD4FE/src/CAD4FE_MCNode.h
Revision: 569
Committed: Thu Oct 16 14:36:31 2014 UTC (10 years, 6 months ago) by foucault
Content type: text/plain
File size: 3319 byte(s)
Log Message:
Mise à jour pour CAD4FE (Gilles) : operation 1 (tentative)

File Contents

# User Rev Content
1 foucault 27 //---------------------------------------------------------------------------
2    
3     #ifndef CAD4FE_MCNodeH
4     #define CAD4FE_MCNodeH
5     //---------------------------------------------------------------------------
6    
7     #include <map>
8     #include <set>
9    
10     #include "CAD4FE_Mesher_platform.h"
11     #include "gestionversion.h"
12     #include "mg_noeud.h"
13     #include "ot_mathematique.h"
14    
15     const unsigned int IDMCNODE=5000;
16    
17     class MG_FACE;
18     class MG_ARETE;
19     class MG_SOMMET;
20     class MG_ELEMENT_TOPOLOGIQUE;
21    
22     namespace CAD4FE {
23    
24     class MCSegment;
25     class FaceBoundaryPoint;
26     class MCFace;
27    
28     class CAD4FE_MESHER_ITEM MCNode : public MG_NOEUD {
29     public:
30    
31     typedef std::map< MG_FACE *, OT_VECTEUR_3D > FMap;
32     typedef FMap::iterator FMapIterator;
33 francois 96 //typedef FMap::const_iterator FMapCIterator;
34 foucault 27 typedef std::map< MG_ARETE *, double > EMap;
35     typedef EMap::iterator EMapIterator;
36     typedef EMap::const_iterator EMapCIterator;
37     typedef std::set< MG_SOMMET * > VMap;
38     typedef VMap::iterator VMapIterator;
39     typedef VMap::const_iterator VMapCIterator;
40    
41     MCNode(unsigned long num,MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_ELEMENT_TOPOLOGIQUE* refTopo,double xx,double yy,double zz);
42     MCNode(MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_ELEMENT_TOPOLOGIQUE* refTopo,double xx,double yy,double zz);
43     MCNode(MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_FACE* __refFace, double __uv[2], double __xyz[3]);
44     MCNode(MG_ELEMENT_TOPOLOGIQUE* mcTopo,MG_ARETE* __refEdge, double __t, double __xyz[3]);
45     MCNode();
46     MCNode(const MCNode&);
47     virtual ~MCNode();
48     virtual void enregistrer(std::ostream& o);
49     void CopyGeometry(const MCNode&);
50    
51 foucault 569 enum CreatorType {
52     unknown = 0,
53     mailleur_1d = 1,
54     mailleur_2d = 2,
55     mailleur_3d = 4,
56     intersection_plane_mg_arete = 5,
57     intersection_plane_mg_polysurface = 6,
58     intersection_plane_mg_face = 7,
59     mailleur_2d_bouge_point = 8
60     } Creator;
61    
62 foucault 27 void NormalMCFace(MCFace* __mcFace, double * __normal);
63     bool IsInFace (MG_FACE *);
64     bool IsInEdge (MG_ARETE *);
65     bool IsInVertex (MG_SOMMET*);
66     bool RefTopoIsInFace (MG_FACE *);
67     bool RefTopoIsInEdge (MG_ARETE *);
68     bool RefTopoIsInVertex (MG_SOMMET*);
69     MG_SOMMET * GetMergedVertex(MG_FACE * __face);
70    
71     OT_VECTEUR_3D & GetFaceParams (MG_FACE *);
72     OT_VECTEUR_3D & UV (MG_FACE *);
73     double GetEdgeParams (MG_ARETE *);
74     double T (MG_ARETE *);
75    
76     virtual int get_type_entite ();
77    
78     void ConstructMapping();
79     void ConstructMergedVertexMapping(MG_SOMMET * __mergedVertex);
80    
81     void SharedFaces(MCNode * , std::set <MG_FACE*> & __setF);
82     void SharedEdges(MCNode * __other, std::set <MG_ARETE*> & __setE);
83     void SharedVertices(MCNode * __other, std::set <MG_SOMMET*> & __setV);
84    
85     MG_ELEMENT_TOPOLOGIQUE * get_lien_topologie_reference();
86     void change_lien_topologie_reference(MG_ELEMENT_TOPOLOGIQUE *__refTopo);
87    
88     void Print();
89    
90     FMap & GetRefFaceMapping();
91     EMap & GetRefEdgeMapping();
92     VMap & GetRefVertexMapping();
93     void SetRefFaceMapping(MG_FACE * __face, double * __uv);
94     void SetRefEdgeMapping(MG_ARETE * __edge, double __t);
95     void SetRefVertexMapping(MG_SOMMET * __vertex);
96    
97     void SetSaveFormat(char __format);
98    
99 foucault 176
100     protected:
101 foucault 27 FMap _F;
102     EMap _E;
103 foucault 176 VMap _V;
104 foucault 27 MG_ELEMENT_TOPOLOGIQUE * _refTopo;
105     char _saveFormat;
106     };
107    
108     }
109    
110     #endif