1 |
//------------------------------------------------------------ |
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.h |
16 |
// |
17 |
//------------------------------------------------------------ |
18 |
//------------------------------------------------------------ |
19 |
// COPYRIGHT 2000 |
20 |
// Version du 02/03/2006 � 11H22 |
21 |
//------------------------------------------------------------ |
22 |
//------------------------------------------------------------ |
23 |
#ifdef BREP_OCC |
24 |
#ifndef OCC_Fonction1H |
25 |
#define OCC_Fonction1H |
26 |
#ifdef WINDOWS_VERSION |
27 |
#ifdef BUILT_DLL_GEOMETRIE |
28 |
#define DLLPORTGEOMETRIE __declspec(dllexport) |
29 |
#else |
30 |
#define DLLPORTGEOMETRIE __declspec(dllimport) |
31 |
#endif |
32 |
#else |
33 |
#define DLLPORTGEOMETRIE |
34 |
#endif |
35 |
|
36 |
//#include <atl\atlmod.h> |
37 |
#include <BRep_Builder.hxx> |
38 |
#include <BRepTools.hxx> |
39 |
#include <TopoDS_Shape.hxx> |
40 |
#include <TopoDS_Solid.hxx> |
41 |
#include <TopoDS_Face.hxx> |
42 |
#include <TopoDS_Edge.hxx> |
43 |
#include <TopoDS_Vertex.hxx> |
44 |
#include <TopTools_IndexedMapOfShape.hxx> |
45 |
#include <TopTools_LocationSet.hxx> |
46 |
#include "TopoDS_Iterator.hxx" |
47 |
#include "STEPControl_Reader.hxx" |
48 |
|
49 |
|
50 |
class DLLPORTGEOMETRIE OCC_FONCTION |
51 |
{ |
52 |
public: |
53 |
OCC_FONCTION(void); |
54 |
virtual ~OCC_FONCTION(void); |
55 |
|
56 |
virtual void OuvrirFichier(char* file); |
57 |
virtual void OuvrirFichierStep(char* file); |
58 |
virtual void Sauvegarder(char* file); |
59 |
virtual int GetID(const TopoDS_Shape &shape); |
60 |
virtual const TopoDS_Shape& GetShape(const int id_shape); |
61 |
virtual TopoDS_Shape& GetShapePrincipale(void); |
62 |
virtual void marquer_sommet_pole(class MG_FACE* face,double precision=1.0e-06); |
63 |
virtual std::string get_version(void); |
64 |
protected: |
65 |
|
66 |
TopoDS_Shape ashape; |
67 |
BRep_Builder abuilder; |
68 |
STEPControl_Reader reader; |
69 |
TopTools_IndexedMapOfShape myShapes; |
70 |
TopTools_LocationSet myLocations; |
71 |
|
72 |
}; |
73 |
#endif |
74 |
#endif |