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