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 |
// mg_element_geometrique.h |
16 |
// |
17 |
//------------------------------------------------------------ |
18 |
//------------------------------------------------------------ |
19 |
// COPYRIGHT 2000 |
20 |
// Version du 02/03/2006 � 11H22 |
21 |
//------------------------------------------------------------ |
22 |
//------------------------------------------------------------ |
23 |
#ifdef CSG_OCC |
24 |
|
25 |
|
26 |
#ifndef __MGPRIMITIVE_ |
27 |
#define __MGPRIMITIVE_ |
28 |
|
29 |
#ifdef WINDOWS_VERSION |
30 |
#ifdef BUILT_DLL_GEOMETRIE |
31 |
#define DLLPORTGEOMETRIE __declspec(dllexport) |
32 |
#else |
33 |
#define DLLPORTGEOMETRIE __declspec(dllimport) |
34 |
#endif |
35 |
#else |
36 |
#define DLLPORTGEOMETRIE |
37 |
#endif |
38 |
|
39 |
#include "mg_construction_geometrique.h" |
40 |
|
41 |
//include Open_Cascade |
42 |
#include <TopoDS_Shape.hxx> |
43 |
#include <BRepPrimAPI_MakeBox.hxx> |
44 |
#include <gp_Pnt.hxx> |
45 |
|
46 |
class DLLPORTGEOMETRIE MG_PRIMITIVE : public MG_CONSTRUCTION_GEOMETRIQUE |
47 |
{ |
48 |
public: |
49 |
MG_PRIMITIVE(); |
50 |
MG_PRIMITIVE(unsigned long num); |
51 |
MG_PRIMITIVE(MG_PRIMITIVE& mdd); |
52 |
virtual ~MG_PRIMITIVE(); |
53 |
|
54 |
virtual void enregistrer(std::ostream& o,double version)=0; |
55 |
virtual void construit(void)=0; |
56 |
virtual int get_type_mg_construction_geometrique(void); |
57 |
|
58 |
|
59 |
TopoDS_Shape get_forme(); |
60 |
void change_forme(TopoDS_Shape m_forme); |
61 |
double get_volume(double eps=1.0e-06); |
62 |
|
63 |
private: |
64 |
|
65 |
protected: |
66 |
TopoDS_Shape forme; |
67 |
|
68 |
|
69 |
|
70 |
}; |
71 |
|
72 |
|
73 |
|
74 |
#endif |
75 |
|
76 |
#endif |
77 |
|
78 |
|