ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mtu/src/occ_boucle.cpp
Revision: 1114
Committed: Wed May 3 18:29:42 2023 UTC (2 years ago) by francois
File size: 2315 byte(s)
Log Message:
Étape 2  : remplacement du nom geometrie par mtu pour corresponde à la publi de mtu

File Contents

# User Rev Content
1 couturad 907 #include "gestionversion.h"
2     #ifdef ALL_OCC
3     #include "occ_boucle.h"
4    
5     OCC_BOUCLE::OCC_BOUCLE(std::string idori,MG_FACE* mgface, TopoDS_Wire wire,OCC_FONCTION* occ_fonction): MG_BOUCLE(mgface)
6     {
7     m_wire=wire;
8     m_occ_fonction=occ_fonction;
9     idoriginal=idori;
10     }
11    
12     OCC_BOUCLE::OCC_BOUCLE(std::string idori,long unsigned int num, MG_FACE* mgface, TopoDS_Wire wire,OCC_FONCTION* occ_fonction): MG_BOUCLE(num, mgface)
13     {
14     m_wire=wire;
15     m_occ_fonction=occ_fonction;
16     idoriginal=idori;
17     }
18    
19     OCC_BOUCLE::OCC_BOUCLE(std::string idori,MG_POUTRE* mgpoutre, TopoDS_Wire wire,OCC_FONCTION* occ_fonction): MG_BOUCLE(mgpoutre)
20     {
21     m_wire=wire;
22     m_occ_fonction=occ_fonction;
23     idoriginal=idori;
24     }
25    
26     OCC_BOUCLE::OCC_BOUCLE(std::string idori,long unsigned int num, MG_POUTRE* mgpoutre, TopoDS_Wire wire,OCC_FONCTION* occ_fonction): MG_BOUCLE(num, mgpoutre)
27     {
28     m_wire=wire;
29     m_occ_fonction=occ_fonction;
30     idoriginal=idori;
31     }
32    
33     OCC_BOUCLE::OCC_BOUCLE(std::string idori,long unsigned int num,TopoDS_Wire wire,OCC_FONCTION* occ_fonction): MG_BOUCLE(num)
34     {
35     m_wire=wire;
36     m_occ_fonction=occ_fonction;
37     idoriginal=idori;
38     }
39    
40     OCC_BOUCLE::OCC_BOUCLE(std::string idori,TopoDS_Wire wire,OCC_FONCTION* occ_fonction)
41     {
42     m_wire=wire;
43     m_occ_fonction=occ_fonction;
44     idoriginal=idori;
45     }
46    
47     OCC_BOUCLE::OCC_BOUCLE(OCC_BOUCLE& mdd): MG_BOUCLE(mdd)
48     {
49     m_wire=mdd.m_wire;
50     m_occ_fonction=mdd.m_occ_fonction;
51     }
52    
53     OCC_BOUCLE::~OCC_BOUCLE()
54     {
55     if(m_occ_fonction->get_version()=="OCCV2017")
56     {
57     OCC_FONCTION_V2017* occ_fonction_v2017 = (OCC_FONCTION_V2017*)m_occ_fonction;
58     occ_fonction_v2017->supprimer_OCC_BOUCLE(this);
59     }
60     }
61    
62     void OCC_BOUCLE::enregistrer(ostream& o, double version)
63     {
64     if (face!=NULL) o << "%" << get_id() << "=BOUCLE($"<< face->get_id() << "," << get_idoriginal() << ",(";
65     else if (poutre!=NULL) o << "%" << get_id() << "=BOUCLE($"<< poutre->get_id() << "," << get_idoriginal() <<",(";
66     else o << "%" << get_id() << "=BOUCLE($"<< "-1" << "," << get_idoriginal() <<",(";
67     for (unsigned int i=0;i<lst_coarete.size();i++)
68     {
69     o << "$" << lst_coarete[i]->get_id();
70     if (i!=lst_coarete.size()-1) o << ",";
71     else o << ")";
72     }
73     o << ");" << std::endl;
74     }
75    
76    
77     TopoDS_Wire OCC_BOUCLE::get_TopoDS_Wire(void)
78     {
79     return m_wire;
80     }
81    
82     void OCC_BOUCLE::change_TopoDS_Wire(TopoDS_Wire wire)
83     {
84     m_wire=wire;
85     }
86    
87    
88    
89    
90     #endif