MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
CAD4FE_MCSegment.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 //####// CAD4FE_MCSegment.h
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:56 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 
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;
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 class MCSegment : public MG_SEGMENT {
51 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  virtual void enregistrer(std::ostream& o,double version);
72  virtual ~MCSegment();
73 
74  virtual int get_type_entite ();
75 
78 
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);
100 
101  //
102  enum {
109  };
110 
111  void SetSaveFormat(char __format);
112 
113 protected:
114  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  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);
122  int _sense;
125  float _bbox[6];
126 };
127 }
128 
129 #endif
130 
131 
CAD4FE::MCSegment::_polylineEvaluator
MCNodePolyline * _polylineEvaluator
Definition: CAD4FE_MCSegment.h:121
CAD4FE::MCSegment::Construct_NoTopology
int Construct_NoTopology(MCNode *__n1, MCNode *__n2)
Definition: CAD4FE_MCSegment.cpp:401
CAD4FE::MCSegment::enregistrer
virtual void enregistrer(std::ostream &o, double version)
Definition: CAD4FE_MCSegment.cpp:1002
MG_SEGMENT
Definition: mg_segment.h:38
CAD4FE::MCSegment::UpdateGeometry
void UpdateGeometry()
Definition: CAD4FE_MCSegment.cpp:154
CAD4FE::MCSegment::inverser_geo
void inverser_geo(double &__t, MCNode *__result)
Definition: CAD4FE_MCSegment.cpp:137
CAD4FE::MCSegment::get_format_enregistrement
int get_format_enregistrement()
CAD4FE_Mesher_platform.h
CAD4FE::MCSegment::VMapCIterator
VMap::const_iterator VMapCIterator
Definition: CAD4FE_MCSegment.h:66
CAD4FE::MCSegment::CstrMCFaceByPlaneIntr
@ CstrMCFaceByPlaneIntr
Definition: CAD4FE_MCSegment.h:105
CAD4FE::MCSegment::Construct_MCFace
int Construct_MCFace(MCFace *__mcFace, MCNode *, MCNode *)
Definition: CAD4FE_MCSegment.cpp:409
CAD4FE::MCSegment::set_format_enregistrement
void set_format_enregistrement(int __format)
CAD4FE::MCSegment
Definition: CAD4FE_MCSegment.h:50
CAD4FE::MCSegment::GetPolylineNode
MCNode * GetPolylineNode(unsigned __index)
Definition: CAD4FE_MCSegment.cpp:98
CAD4FE::MCSegment::VPtsCIterator
VPts::const_iterator VPtsCIterator
Definition: CAD4FE_MCSegment.h:54
CAD4FE::MCSegment::MCSegment
MCSegment(unsigned long num, MG_ELEMENT_TOPOLOGIQUE *topo, MCNode *mgnoeud1, MCNode *mgnoeud2, double longue=0.0)
Definition: CAD4FE_MCSegment.cpp:52
CAD4FE::MCSegment::~MCSegment
virtual ~MCSegment()
Definition: CAD4FE_MCSegment.cpp:89
CAD4FE::MCSegment::CstrMCFaceByPlaneIntrNormalByShortestPath
@ CstrMCFaceByPlaneIntrNormalByShortestPath
Definition: CAD4FE_MCSegment.h:107
CAD4FE::MCSegment::VPts
std::vector< MCNode * > VPts
Definition: CAD4FE_MCSegment.h:52
CAD4FE::MCSegment::Find_MCFace
MCFace * Find_MCFace(MCEdge *__mcEdge, MG_SOMMET *__refVertex1, MG_SOMMET *__refVertex2)
Definition: CAD4FE_MCSegment.cpp:910
CAD4FE::MCSegment::GetRefFaceMapping
FMap & GetRefFaceMapping()
Definition: CAD4FE_MCSegment.cpp:81
MG_ELEMENT_TOPOLOGIQUE
Definition: mg_element_topologique.h:51
CAD4FE::MCSegment::Construct_MCEdge
int Construct_MCEdge(MCEdge *__mcEdge)
Definition: CAD4FE_MCSegment.cpp:645
CAD4FE::MCSegment::Construct_MCFaceByShortestPath
int Construct_MCFaceByShortestPath(MCFace *__mcFace, MCNode *__n1, MCNode *__n2)
Definition: CAD4FE_MCSegment.cpp:265
CAD4FE::MCSegment::ConstructGeometry
void ConstructGeometry()
Definition: CAD4FE_MCSegment.cpp:164
CAD4FE::MCSegment::_bbox
float _bbox[6]
Definition: CAD4FE_MCSegment.h:125
CAD4FE::MCSegment::CstrNoRefTopologyMapping
@ CstrNoRefTopologyMapping
Definition: CAD4FE_MCSegment.h:108
CAD4FE::MCSegment::CstrMCFaceByShortestPath
@ CstrMCFaceByShortestPath
Definition: CAD4FE_MCSegment.h:106
mg_segment.h
CAD4FE::MCSegment::EMapCIterator
EMap::const_iterator EMapCIterator
Definition: CAD4FE_MCSegment.h:62
CAD4FE::MCSegment::SetSaveFormat
void SetSaveFormat(char __format)
Definition: CAD4FE_MCSegment.cpp:979
CAD4FE::MCSegment::GetPolylineNodeCount
unsigned GetPolylineNodeCount()
Definition: CAD4FE_MCSegment.cpp:110
CAD4FE::MCSegment::RefineInRefEdge
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)
Definition: CAD4FE_MCSegment.cpp:569
CAD4FE::MCNodePolyline
Definition: CAD4FE_MCNodePolyline.h:34
CAD4FE::MCSegment::CstrMCFaceWrongTopologyDimension
@ CstrMCFaceWrongTopologyDimension
Definition: CAD4FE_MCSegment.h:104
CAD4FE::MCSegment::VMap
std::vector< MG_SOMMET * > VMap
Definition: CAD4FE_MCSegment.h:64
CAD4FE::MCSegment::EMapIterator
EMap::iterator EMapIterator
Definition: CAD4FE_MCSegment.h:61
CAD4FE::MCSegment::F
FMap F
Definition: CAD4FE_MCSegment.h:76
CAD4FE::MCSegment::_sense
int _sense
Definition: CAD4FE_MCSegment.h:122
CAD4FE::MCSegment::GetPolylineTopos
std::vector< MG_ELEMENT_TOPOLOGIQUE * > GetPolylineTopos()
Definition: CAD4FE_MCSegment.cpp:102
CAD4FE::MCSegment::CstrMCFaceFailure
@ CstrMCFaceFailure
Definition: CAD4FE_MCSegment.h:103
CAD4FE::MCSegment::FMap
std::multimap< MG_FACE *, VPts > FMap
Definition: CAD4FE_MCSegment.h:56
CAD4FE::MCSegment::get_orientation
int get_orientation()
Definition: CAD4FE_MCSegment.cpp:146
BOITE_2D
Definition: ot_boite_2d.h:28
BOITE_3D
Definition: ot_boite_3d.h:27
CAD4FE::MCEdge
Definition: CAD4FE_MCEdge.h:48
CAD4FE::MCSegment::FMapIterator
FMap::iterator FMapIterator
Definition: CAD4FE_MCSegment.h:57
CAD4FE::MCSegment::_saveFormat
char _saveFormat
Definition: CAD4FE_MCSegment.h:124
CAD4FE::MCSegment::E
EMap E
Definition: CAD4FE_MCSegment.h:77
CAD4FE::MCSegment::get_type_entite
virtual int get_type_entite()
Definition: CAD4FE_MCSegment.cpp:1017
CAD4FE::MCSegment::FMapCIterator
FMap::const_iterator FMapCIterator
Definition: CAD4FE_MCSegment.h:58
CAD4FE::MCSegment::_cstrMCFaceScheme
int _cstrMCFaceScheme
Definition: CAD4FE_MCSegment.h:123
CAD4FE
Definition: CAD4FE_ClosestPoint_Segment_MG_ARETE.h:34
CAD4FE::MCSegment::change_orientation
void change_orientation(int __sense)
Definition: CAD4FE_MCSegment.cpp:150
CAD4FE::MCNode
Definition: CAD4FE_MCNode.h:47
CAD4FE::MCSegment::Construct_MergedVertices
int Construct_MergedVertices(MCNode *__mcNode)
Definition: CAD4FE_MCSegment.cpp:934
MG_ARETE
Definition: mg_arete.h:36
MG_FACE
Definition: mg_face.h:34
CAD4FE::MCFace
Definition: CAD4FE_MCFace.h:50
CAD4FE::MCSegment::EMap
std::multimap< MG_ARETE *, VPts > EMap
Definition: CAD4FE_MCSegment.h:60
IDMCSEGMENT
const unsigned int IDMCSEGMENT
Definition: CAD4FE_MCSegment.h:37
MG_SOMMET
Definition: mg_sommet.h:35
CAD4FE::MCSegment::VPtsIterator
VPts::iterator VPtsIterator
Definition: CAD4FE_MCSegment.h:53
CAD4FE::MCSegment::get_longueur_geo
double get_longueur_geo()
Definition: CAD4FE_MCSegment.cpp:114
CAD4FE::MCSegment::GetRefEdgeMapping
EMap & GetRefEdgeMapping()
Definition: CAD4FE_MCSegment.cpp:85
CAD4FE::MCSegment::VMapIterator
VMap::iterator VMapIterator
Definition: CAD4FE_MCSegment.h:65
CAD4FE::MCSegment::GetPolylineTopo
MG_ELEMENT_TOPOLOGIQUE * GetPolylineTopo(unsigned __index)
Definition: CAD4FE_MCSegment.cpp:106
CAD4FE::MCSegment::GetPolylineNodes
std::vector< MCNode * > GetPolylineNodes()
Definition: CAD4FE_MCSegment.cpp:94
CAD4FE::MCSegment::ConstructBoundaryBox
void ConstructBoundaryBox()
Definition: CAD4FE_MCSegment.cpp:226
CAD4FE::MCSegment::get_boite_3D
virtual class BOITE_3D get_boite_3D(void)
Definition: CAD4FE_MCSegment.cpp:974
CAD4FE::MCSegment::evaluer_geo
void evaluer_geo(double __t, MCNode *__result, double *tangent=0, double *curvature=0)
Definition: CAD4FE_MCSegment.cpp:119