1 |
foucault |
27 |
//---------------------------------------------------------------------------
|
2 |
|
|
|
3 |
|
|
#ifndef CAD4FE_MCSegmentH
|
4 |
|
|
#define CAD4FE_MCSegmentH
|
5 |
|
|
//---------------------------------------------------------------------------
|
6 |
|
|
|
7 |
|
|
#include "CAD4FE_Mesher_platform.h"
|
8 |
|
|
|
9 |
|
|
#include <mg_segment.h>
|
10 |
|
|
#include <map>
|
11 |
|
|
|
12 |
|
|
class MG_FACE;
|
13 |
|
|
class MG_ARETE;
|
14 |
|
|
class MG_SOMMET;
|
15 |
|
|
class BOITE_2D;
|
16 |
|
|
class MG_ELEMENT_TOPOLOGIQUE;
|
17 |
|
|
|
18 |
|
|
const unsigned int IDMCSEGMENT=5001;
|
19 |
|
|
|
20 |
|
|
namespace CAD4FE {
|
21 |
|
|
|
22 |
|
|
class MCNode;
|
23 |
|
|
class PolySurface;
|
24 |
|
|
class PolyCurve;
|
25 |
|
|
class MCEdge;
|
26 |
|
|
class MCFace;
|
27 |
|
|
class MCVertex;
|
28 |
|
|
class Intersection_Plane_PolySurface;
|
29 |
|
|
class MCNodePolyline;
|
30 |
|
|
|
31 |
|
|
class CAD4FE_MESHER_ITEM MCSegment : public MG_SEGMENT {
|
32 |
|
|
public:
|
33 |
|
|
typedef std::vector<MCNode*> VPts;
|
34 |
|
|
typedef VPts::iterator VPtsIterator;
|
35 |
|
|
typedef VPts::const_iterator VPtsCIterator;
|
36 |
|
|
|
37 |
|
|
typedef std::multimap <MG_FACE *, VPts> FMap;
|
38 |
|
|
typedef FMap::iterator FMapIterator;
|
39 |
|
|
typedef FMap::const_iterator FMapCIterator;
|
40 |
|
|
|
41 |
|
|
typedef std::multimap <MG_ARETE *, VPts> EMap;
|
42 |
|
|
typedef EMap::iterator EMapIterator;
|
43 |
|
|
typedef EMap::const_iterator EMapCIterator;
|
44 |
|
|
|
45 |
|
|
typedef std::vector <MG_SOMMET *> VMap;
|
46 |
|
|
typedef VMap::iterator VMapIterator;
|
47 |
|
|
typedef VMap::const_iterator VMapCIterator;
|
48 |
|
|
|
49 |
|
|
MCSegment (unsigned long num, MG_ELEMENT_TOPOLOGIQUE *topo, MCNode *mgnoeud1, MCNode *mgnoeud2, double longue=0.0);
|
50 |
|
|
MCSegment (MG_ELEMENT_TOPOLOGIQUE *topo, MCNode *mgnoeud1, MCNode *mgnoeud2, double longue=0.0, long __cstrMCFaceScheme=CstrMCFaceByPlaneIntr);
|
51 |
|
|
MCSegment( MCSegment & __s);
|
52 |
|
|
virtual void enregistrer(std::ostream& o);
|
53 |
|
|
virtual ~MCSegment();
|
54 |
|
|
|
55 |
|
|
virtual int get_type_entite ();
|
56 |
|
|
|
57 |
|
|
FMap F;
|
58 |
|
|
EMap E;
|
59 |
|
|
|
60 |
|
|
FMap & GetRefFaceMapping();
|
61 |
|
|
EMap & GetRefEdgeMapping();
|
62 |
|
|
|
63 |
|
|
double get_longueur_geo();
|
64 |
|
|
virtual class BOITE_3D get_boite_3D(void);
|
65 |
|
|
void evaluer_geo(double __t, MCNode * __result, double * tangent=0, double * curvature=0);
|
66 |
|
|
void inverser_geo(double & __t, MCNode * __result);
|
67 |
|
|
int get_orientation();
|
68 |
|
|
void change_orientation(int __sense);
|
69 |
|
|
void ConstructGeometry();
|
70 |
|
|
void UpdateGeometry();
|
71 |
|
|
MCNode* GetPolylineNode(unsigned __index);
|
72 |
|
|
std::vector <MCNode*> GetPolylineNodes();
|
73 |
|
|
MG_ELEMENT_TOPOLOGIQUE* GetPolylineTopo(unsigned __index);
|
74 |
|
|
std::vector <MG_ELEMENT_TOPOLOGIQUE*> GetPolylineTopos();
|
75 |
|
|
unsigned GetPolylineNodeCount();
|
76 |
|
|
void ConstructBoundaryBox();
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
void set_format_enregistrement(int __format);
|
80 |
|
|
int get_format_enregistrement();
|
81 |
|
|
|
82 |
|
|
//
|
83 |
|
|
enum {
|
84 |
|
|
CstrMCFaceFailure = 1024,
|
85 |
|
|
CstrMCFaceWrongTopologyDimension = 2048,
|
86 |
|
|
CstrMCFaceByPlaneIntr = 1,
|
87 |
|
|
CstrMCFaceByShortestPath = 2,
|
88 |
|
|
CstrMCFaceByPlaneIntrNormalByShortestPath = 4,
|
89 |
|
|
CstrNoRefTopologyMapping = 8
|
90 |
|
|
};
|
91 |
|
|
|
92 |
|
|
void SetSaveFormat(char __format);
|
93 |
|
|
|
94 |
|
|
protected:
|
95 |
|
|
int RefineInRefEdge(MCEdge * __mcEdge, MG_ARETE * __refEdge, MCNode * __n1, MCNode * __n2, double __epsilon, double __lastDistanceToEdge, std::map < double , MCNode * > & __mapMCEdgeNodesBySParameter, std::map < double , MG_ARETE * > & __mapMCEdgeRefEdgesBySParameter );
|
96 |
|
|
// MCEdge * FindMCEdge(MCFace * __mcFace, MCNode * __mcNode1, MCNode * __mcNode2);
|
97 |
|
|
int Construct_MCFaceByShortestPath(MCFace * __mcFace, MCNode* __n1, MCNode* __n2);
|
98 |
|
|
int Construct_MCFace(MCFace * __mcFace, MCNode*,MCNode*);
|
99 |
|
|
int Construct_MCEdge(MCEdge * __mcEdge);
|
100 |
|
|
int Construct_NoTopology(MCNode * __n1, MCNode * __n2);
|
101 |
|
|
MCFace * Find_MCFace(MCEdge * __mcEdge, MG_SOMMET * __refVertex1, MG_SOMMET * __refVertex2);
|
102 |
|
|
int Construct_MergedVertices(MCNode * __mcNode);
|
103 |
|
|
MCNodePolyline * _polylineEvaluator;
|
104 |
|
|
int _sense;
|
105 |
|
|
int _cstrMCFaceScheme;
|
106 |
|
|
char _saveFormat;
|
107 |
|
|
float _bbox[6];
|
108 |
|
|
};
|
109 |
|
|
}
|
110 |
|
|
|
111 |
|
|
#endif
|
112 |
|
|
|
113 |
|
|
|