ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/occ_fonction.cpp
Revision: 919
Committed: Tue Mar 6 17:51:54 2018 UTC (7 years, 2 months ago) by couturad
File size: 2606 byte(s)
Log Message:
Correction des bugs lors de l'execution en mode RELWITHDEBINFO.
Ajouts de fichiers pour la librairie MICROSTRUCTURE

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     //using namespace std;
35 couturad 740 OCC_FONCTION::OCC_FONCTION()
36 francois 283 {
37     }
38 couturad 740
39     OCC_FONCTION::~OCC_FONCTION()
40 francois 283 {
41     }
42 couturad 740
43     void OCC_FONCTION::OuvrirFichier(char* file ) //ouvrir un fichier .brep
44 francois 283 {
45     Standard_Boolean result=BRepTools::Read(ashape,file,abuilder);
46     }
47 couturad 740 void OCC_FONCTION::OuvrirFichierStep(char* file)//ouvrir un fichier.step
48 francois 283 {
49    
50     reader.ReadFile(file);
51     reader.NbRootsForTransfer();
52     reader.TransferRoots();
53     ashape = reader.OneShape();
54 couturad 919
55 francois 283 }
56    
57 couturad 740 void OCC_FONCTION::Sauvegarder(char* file)
58 francois 283 {
59     Standard_Boolean result1=BRepTools::Write(ashape, file);
60     }
61    
62 couturad 740 int OCC_FONCTION::GetID(const TopoDS_Shape &shape)
63 francois 283 {
64     if (shape.IsNull()) return 0;
65 couturad 740 Standard_Integer index = myShapes.FindIndex(shape);
66 francois 283 if (index == 0)
67     {
68 couturad 740 for (TopoDS_Iterator its(shape,Standard_False,Standard_False);its.More(); its.Next())
69 francois 283 GetID(its.Value());
70 couturad 740 index = myShapes.Add(shape);
71 francois 283 }
72     return index;
73 couturad 740 }
74 francois 283
75 couturad 740 TopoDS_Shape& OCC_FONCTION::GetShapePrincipale(void)
76     {
77     return ashape;
78     }
79 francois 283
80 couturad 740 const TopoDS_Shape& OCC_FONCTION::GetShape(const int id_shape)
81 francois 283 {
82     GetID(ashape);
83     return myShapes(id_shape);
84     }
85    
86 couturad 814 void OCC_FONCTION::marquer_sommet_pole(MG_FACE* face, double precision)
87     {
88     //printf("void OCC_FONCTION::marquer_sommet_pole(MG_FACE* face, double precision) : Non supportee dans cette version de OCC_FONCTION\n");
89     }
90    
91 couturad 906 std::string OCC_FONCTION::get_version(void)
92     {
93     return "OCCV0";
94     }
95 couturad 814
96 couturad 906
97 francois 283 #endif