ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/occ_fonction.cpp
Revision: 951
Committed: Fri Aug 10 15:17:17 2018 UTC (6 years, 9 months ago) by couturad
File size: 2583 byte(s)
Log Message:
-> Ajout de Project Chrono (voir CMakeLists.txt).
-> Ajout d'un générateur de microstructure basé sur la dynamique des corps rigides (MSTRUCT_GENERATEUR_DCR).
-> Ajout d'un opérateur de décallage de la topologie (MG_CG_OP_TRANSF_DECALLAGE).
-> Retrait de «using namespace std»  (conflit avec namespace chrono) et modification des fichiers affectés.
-> Modification de mailleur2d.cpp afin d'enregistrer un fichier MAGiC (void.magic) lorsque le nombre d'itération dépasse la valeur maximale.

File Contents

# User Rev Content
1 francois 283 //------------------------------------------------------------
2     //------------------------------------------------------------
3     // MAGiC
4     // Jean Christophe Cuilli�re et Vincent FRANCOIS
5     // D�partement de G�nie M�canique - UQTR
6     //------------------------------------------------------------
7     // Le projet MAGIC est un projet de recherche du d�partement
8     // de g�nie m�canique de l'Universit� du Qu�bec �
9     // Trois Rivi�res
10     // Les librairies ne peuvent �tre utilis�es sans l'accord
11     // des auteurs (contact : francois@uqtr.ca)
12     //------------------------------------------------------------
13     //------------------------------------------------------------
14     //
15     // OCC_fonction1.cpp
16     //
17     //------------------------------------------------------------
18     //------------------------------------------------------------
19     // COPYRIGHT 2000
20     // Version du 02/03/2006 � 11H22
21     //------------------------------------------------------------
22     //------------------------------------------------------------
23    
24    
25     #include "gestionversion.h"
26     #ifdef BREP_OCC
27     #pragma hdrstop
28    
29    
30 couturad 740 #include "occ_fonction.h"
31 couturad 814
32 francois 283 //---------------------------------------------------------------------------
33     #pragma package(smart_init)
34 couturad 740 OCC_FONCTION::OCC_FONCTION()
35 francois 283 {
36     }
37 couturad 740
38     OCC_FONCTION::~OCC_FONCTION()
39 francois 283 {
40     }
41 couturad 740
42     void OCC_FONCTION::OuvrirFichier(char* file ) //ouvrir un fichier .brep
43 francois 283 {
44     Standard_Boolean result=BRepTools::Read(ashape,file,abuilder);
45     }
46 couturad 740 void OCC_FONCTION::OuvrirFichierStep(char* file)//ouvrir un fichier.step
47 francois 283 {
48    
49     reader.ReadFile(file);
50     reader.NbRootsForTransfer();
51     reader.TransferRoots();
52     ashape = reader.OneShape();
53 couturad 919
54 francois 283 }
55    
56 couturad 740 void OCC_FONCTION::Sauvegarder(char* file)
57 francois 283 {
58     Standard_Boolean result1=BRepTools::Write(ashape, file);
59     }
60    
61 couturad 740 int OCC_FONCTION::GetID(const TopoDS_Shape &shape)
62 francois 283 {
63     if (shape.IsNull()) return 0;
64 couturad 740 Standard_Integer index = myShapes.FindIndex(shape);
65 francois 283 if (index == 0)
66     {
67 couturad 740 for (TopoDS_Iterator its(shape,Standard_False,Standard_False);its.More(); its.Next())
68 francois 283 GetID(its.Value());
69 couturad 740 index = myShapes.Add(shape);
70 francois 283 }
71     return index;
72 couturad 740 }
73 francois 283
74 couturad 740 TopoDS_Shape& OCC_FONCTION::GetShapePrincipale(void)
75     {
76     return ashape;
77     }
78 francois 283
79 couturad 740 const TopoDS_Shape& OCC_FONCTION::GetShape(const int id_shape)
80 francois 283 {
81     GetID(ashape);
82     return myShapes(id_shape);
83     }
84    
85 couturad 814 void OCC_FONCTION::marquer_sommet_pole(MG_FACE* face, double precision)
86     {
87     //printf("void OCC_FONCTION::marquer_sommet_pole(MG_FACE* face, double precision) : Non supportee dans cette version de OCC_FONCTION\n");
88     }
89    
90 couturad 906 std::string OCC_FONCTION::get_version(void)
91     {
92     return "OCCV0";
93     }
94 couturad 814
95 couturad 906
96 francois 283 #endif