ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mtu/src/occ_coquille.cpp
Revision: 1158
Committed: Thu Jun 13 22:18:49 2024 UTC (11 months, 1 week ago) by francois
File size: 3492 byte(s)
Log Message:
compatibilité Ubuntu 22.04
Suppression des refeences à Windows
Ajout d'une banière

File Contents

# User Rev Content
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     //####// occ_coquille.cpp
15     //####//
16     //####//------------------------------------------------------------
17     //####//------------------------------------------------------------
18     //####// COPYRIGHT 2000-2024
19     //####// jeu 13 jun 2024 11:58:54 EDT
20     //####//------------------------------------------------------------
21     //####//------------------------------------------------------------
22 couturad 907 #include "gestionversion.h"
23     #ifdef ALL_OCC
24     #include "occ_coquille.h"
25    
26     OCC_COQUILLE::OCC_COQUILLE(std::string idori,long unsigned int num, MG_VOLUME* mgvol, TopoDS_Shell shell,OCC_FONCTION* occ_fonction): MG_COQUILLE(num, mgvol)
27     {
28     m_shell=shell;
29     m_occ_fonction=occ_fonction;
30     idoriginal=idori;
31     }
32    
33     OCC_COQUILLE::OCC_COQUILLE(std::string idori,long unsigned int num, MG_COQUE* mgcoq, TopoDS_Shell shell,OCC_FONCTION* occ_fonction): MG_COQUILLE(num, mgcoq)
34     {
35     m_shell=shell;
36     m_occ_fonction=occ_fonction;
37     idoriginal=idori;
38     }
39    
40     OCC_COQUILLE::OCC_COQUILLE(std::string idori,MG_VOLUME* mgvol, TopoDS_Shell shell,OCC_FONCTION* occ_fonction): MG_COQUILLE(mgvol)
41     {
42     m_shell=shell;
43     m_occ_fonction=occ_fonction;
44     idoriginal=idori;
45     }
46    
47     OCC_COQUILLE::OCC_COQUILLE(std::string idori,MG_COQUE* mgcoq, TopoDS_Shell shell,OCC_FONCTION* occ_fonction): MG_COQUILLE(mgcoq)
48     {
49     m_shell=shell;
50     m_occ_fonction=occ_fonction;
51     idoriginal=idori;
52     }
53    
54     OCC_COQUILLE::OCC_COQUILLE(std::string idori,long unsigned int num, TopoDS_Shell shell, OCC_FONCTION* occ_fonction): MG_COQUILLE(num)
55     {
56     m_shell=shell;
57     m_occ_fonction=occ_fonction;
58     idoriginal=idori;
59     }
60    
61     OCC_COQUILLE::OCC_COQUILLE(std::string idori,TopoDS_Shell shell, OCC_FONCTION* occ_fonction): MG_COQUILLE()
62     {
63     m_shell=shell;
64     m_occ_fonction=occ_fonction;
65     idoriginal=idori;
66     }
67    
68     OCC_COQUILLE::OCC_COQUILLE(OCC_COQUILLE& mdd): MG_COQUILLE(mdd)
69     {
70     m_shell=mdd.m_shell;
71     m_occ_fonction=mdd.m_occ_fonction;
72     }
73    
74     OCC_COQUILLE::~OCC_COQUILLE()
75     {
76     if(m_occ_fonction->get_version()=="OCCV2017")
77     {
78     OCC_FONCTION_V2017* occ_fonction_v2017 = (OCC_FONCTION_V2017*)m_occ_fonction;
79     occ_fonction_v2017->supprimer_OCC_COQUILLE(this);
80     }
81     }
82    
83     TopoDS_Shell OCC_COQUILLE::get_TopoDS_Shell(void)
84     {
85     return m_shell;
86     }
87    
88     void OCC_COQUILLE::change_TopoDS_Shell(TopoDS_Shell shell)
89     {
90     m_shell=shell;
91     }
92    
93     void OCC_COQUILLE::enregistrer(ostream& o, double version)
94     {
95     if (volume!=NULL) o << "%" << get_id() << "=COQUILLE($"<< volume->get_id()<< "," << get_idoriginal() << ",(";
96     else if (coque!=NULL) o << "%" << get_id() << "=COQUILLE($"<< coque->get_id() << "," << get_idoriginal() << ",(";
97     else o << "%" << get_id() << "=COQUILLE($"<< "-1" << "," << get_idoriginal() << ",(";
98     for (unsigned int i=0;i<lst_coface.size();i++)
99     {
100     o << "$" << lst_coface[i]->get_id();
101     if (i!=lst_coface.size()-1) o << ",";
102     else o << ")";
103     }
104     o << ");" << std::endl;
105     }
106    
107    
108    
109    
110 francois 1158 #endif