MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
sq_branche.cpp
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 //####// sq_branche.cpp
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:56 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 #include "sq_branche.h"
23 
24 
25 SQ_BRANCHE::SQ_BRANCHE(std::vector<SQ_NOEUD*> bran)
26 {
27  Branche=bran;
28  if(Branche.size()>1)
30 }
31 
32 
33 
35 {
36 }
37 
38 
39 
41 {
42  Branche=mdd.Branche;
44  Longueur=mdd.Longueur;
45  RayonMax=mdd.RayonMax;
48  LstGuides=mdd.LstGuides;
50 }
51 
52 
53 
55 {
56 }
57 
58 
59 
60 std::vector<SQ_NOEUD*> SQ_BRANCHE::get_branche()
61 {
62  return Branche;
63 }
64 
65 
66 
67 std::vector<SQ_NOEUD*> SQ_BRANCHE::get_branche_guide()
68 {
69  return BrancheGuide;
70 }
71 
72 
73 
75 {
76  return Longueur;
77 }
78 
79 
80 
82 {
83  return RayonMax;
84 }
85 
86 
87 
88 std::vector<MG_NOEUD*> SQ_BRANCHE::get_section(int i)
89 {
90  return LstSections[i].second;
91 }
92 
93 
94 
95 std::vector<MG_NOEUD*> SQ_BRANCHE::get_section2(int i)
96 {
97  return LstSections2[i].second;
98 }
99 
100 
101 
103 {
104  return LstSections[i].first;
105 }
106 
107 
108 
110 {
111  return LstSections2[i].first;
112 }
113 
114 
115 
117 {
118  return LstSections.size();
119 }
120 
121 
122 
124 {
125  return LstSections2.size();
126 }
127 
128 
129 
130 std::vector<MG_NOEUD*> SQ_BRANCHE::get_guide(int i)
131 {
132  return LstGuides[i];
133 }
134 
135 
136 
138 {
139  return LstGuides.size();
140 }
141 
142 
143 
145 {
146  return BrancheValide;
147 }
148 
149 
150 
152 {
153  return Jonction1;
154 }
155 
156 
157 
159 {
160  return Jonction2;
161 }
162 
163 
164 
166 {
167  return BrancheSolide;
168 }
169 
170 
171 
172 void SQ_BRANCHE::change_branche(std::vector<SQ_NOEUD*> Bran)
173 {
174  Branche=Bran;
175  if(Branche.size()>1)
176  calcul_longueur();
177 }
178 
179 
180 
181 void SQ_BRANCHE::change_branche_guide(std::vector<SQ_NOEUD*> BranGuide)
182 {
183  BrancheGuide=BranGuide;
184 }
185 
186 
187 
189 {
190  Longueur=0.;
191  for(int i=0;i<Branche.size()-1;i++)
192  {
193  OT_VECTEUR_3D V(Branche[i]->get_coord(),Branche[i+1]->get_coord());
194  Longueur+=V.get_longueur();
195  }
196 }
197 
198 
199 
201 {
202  RayonMax=Rmax;
203 }
204 
205 
206 
207 void SQ_BRANCHE::ajouter_section(SQ_NOEUD* NoCentral,std::vector<MG_NOEUD*> Section)
208 {
209  LstSections.push_back(std::make_pair(NoCentral,Section));
210 }
211 
212 
213 
214 void SQ_BRANCHE::ajouter_section2(SQ_NOEUD* NoCentral,std::vector<MG_NOEUD*> Section)
215 {
216  LstSections2.push_back(std::make_pair(NoCentral,Section));
217 }
218 
219 
220 
221 void SQ_BRANCHE::ajouter_guide(std::vector<MG_NOEUD*> Guide)
222 {
223  LstGuides.push_back(Guide);
224 }
225 
226 
227 
228 void SQ_BRANCHE::change_validite(bool Validite)
229 {
230  BrancheValide=Validite;
231 }
232 
233 
234 
236 {
237  Jonction1=Jonc1;
238 }
239 
240 
241 
243 {
244  Jonction2=Jonc2;
245 }
246 
247 
248 
249 void SQ_BRANCHE::change_branche_solide(TopoDS_Shape BranSolid)
250 {
251  BrancheSolide=BranSolid;
252 }
SQ_BRANCHE::change_branche
void change_branche(std::vector< SQ_NOEUD * > Bran)
Definition: sq_branche.cpp:172
SQ_BRANCHE::get_no_central_section
SQ_NOEUD * get_no_central_section(int i)
Definition: sq_branche.cpp:102
SQ_BRANCHE::ajouter_section
void ajouter_section(SQ_NOEUD *NoCentral, std::vector< MG_NOEUD * > Section)
Definition: sq_branche.cpp:207
SQ_BRANCHE::get_validite
bool get_validite()
Definition: sq_branche.cpp:144
SQ_BRANCHE::LstSections2
std::vector< std::pair< SQ_NOEUD *, std::vector< MG_NOEUD * > > > LstSections2
Definition: sq_branche.h:73
SQ_BRANCHE::get_no_central_section2
SQ_NOEUD * get_no_central_section2(int i)
Definition: sq_branche.cpp:109
SQ_BRANCHE::Jonction2
SQ_JONCTION * Jonction2
Definition: sq_branche.h:77
SQ_BRANCHE::change_validite
void change_validite(bool Validite)
Definition: sq_branche.cpp:228
SQ_BRANCHE::BrancheValide
bool BrancheValide
Definition: sq_branche.h:75
SQ_BRANCHE::change_branche_guide
void change_branche_guide(std::vector< SQ_NOEUD * > BranGuide)
Definition: sq_branche.cpp:181
SQ_BRANCHE::BrancheSolide
TopoDS_Shape BrancheSolide
Definition: sq_branche.h:78
SQ_NOEUD
Definition: sq_noeud.h:28
SQ_BRANCHE::get_jonction2
SQ_JONCTION * get_jonction2()
Definition: sq_branche.cpp:158
SQ_BRANCHE::Jonction1
SQ_JONCTION * Jonction1
Definition: sq_branche.h:76
SQ_BRANCHE::LstGuides
std::vector< std::vector< MG_NOEUD * > > LstGuides
Definition: sq_branche.h:74
SQ_BRANCHE::change_jonction2
void change_jonction2(SQ_JONCTION *Jonc2)
Definition: sq_branche.cpp:242
SQ_BRANCHE::get_section2
std::vector< MG_NOEUD * > get_section2(int i)
Definition: sq_branche.cpp:95
SQ_BRANCHE::ajouter_section2
void ajouter_section2(SQ_NOEUD *NoCentral, std::vector< MG_NOEUD * > Section)
Definition: sq_branche.cpp:214
SQ_BRANCHE
Definition: sq_branche.h:30
SQ_BRANCHE::get_section
std::vector< MG_NOEUD * > get_section(int i)
Definition: sq_branche.cpp:88
SQ_BRANCHE::Longueur
double Longueur
Definition: sq_branche.h:70
SQ_BRANCHE::ajouter_guide
void ajouter_guide(std::vector< MG_NOEUD * > Guide)
Definition: sq_branche.cpp:221
SQ_BRANCHE::change_branche_solide
void change_branche_solide(TopoDS_Shape BranSolid)
Definition: sq_branche.cpp:249
SQ_BRANCHE::LstSections
std::vector< std::pair< SQ_NOEUD *, std::vector< MG_NOEUD * > > > LstSections
Definition: sq_branche.h:72
SQ_BRANCHE::BrancheGuide
std::vector< SQ_NOEUD * > BrancheGuide
Definition: sq_branche.h:69
SQ_BRANCHE::calcul_longueur
void calcul_longueur()
Definition: sq_branche.cpp:188
SQ_BRANCHE::get_nb_sections
int get_nb_sections()
Definition: sq_branche.cpp:116
SQ_BRANCHE::Branche
std::vector< SQ_NOEUD * > Branche
Definition: sq_branche.h:68
SQ_BRANCHE::get_branche
std::vector< SQ_NOEUD * > get_branche()
Definition: sq_branche.cpp:60
V
void V(MCAA *mcaa)
Definition: CAD4FE_MCAA.cpp:1794
SQ_BRANCHE::get_nb_guides
int get_nb_guides()
Definition: sq_branche.cpp:137
SQ_BRANCHE::get_jonction1
SQ_JONCTION * get_jonction1()
Definition: sq_branche.cpp:151
SQ_BRANCHE::get_branche_guide
std::vector< SQ_NOEUD * > get_branche_guide()
Definition: sq_branche.cpp:67
sq_branche.h
SQ_BRANCHE::get_branche_solide
TopoDS_Shape get_branche_solide()
Definition: sq_branche.cpp:165
OT_VECTEUR_3D
Definition: ot_mathematique.h:94
SQ_BRANCHE::get_rayon_max
double get_rayon_max()
Definition: sq_branche.cpp:81
SQ_BRANCHE::get_nb_sections2
int get_nb_sections2()
Definition: sq_branche.cpp:123
SQ_BRANCHE::get_longueur
double get_longueur()
Definition: sq_branche.cpp:74
SQ_BRANCHE::change_rayon_max
void change_rayon_max(double Rmax)
Definition: sq_branche.cpp:200
SQ_JONCTION
Definition: sq_jonction.h:30
SQ_BRANCHE::get_guide
std::vector< MG_NOEUD * > get_guide(int i)
Definition: sq_branche.cpp:130
SQ_BRANCHE::RayonMax
double RayonMax
Definition: sq_branche.h:71
SQ_BRANCHE::~SQ_BRANCHE
virtual ~SQ_BRANCHE()
Definition: sq_branche.cpp:54
SQ_BRANCHE::SQ_BRANCHE
SQ_BRANCHE()
Definition: sq_branche.cpp:34
SQ_BRANCHE::change_jonction1
void change_jonction1(SQ_JONCTION *Jonc1)
Definition: sq_branche.cpp:235