ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/mg_primitive.cpp
Revision: 906
Committed: Mon Nov 13 22:30:18 2017 UTC (7 years, 9 months ago) by couturad
File size: 1836 byte(s)
Log Message:
Nouveau opencascade commit 1

File Contents

# Content
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.cpp
16 //
17 //------------------------------------------------------------
18 //------------------------------------------------------------
19 // COPYRIGHT 2000
20 // Version du 02/03/2006 � 11H22
21 //------------------------------------------------------------
22 //------------------------------------------------------------
23 #ifdef CSG_OCC
24
25 #include "gestionversion.h"
26 #include "mg_primitive.h"
27
28 #include <BRepGProp.hxx>
29 #include <GProp_GProps.hxx>
30
31 MG_PRIMITIVE::MG_PRIMITIVE():MG_CONSTRUCTION_GEOMETRIQUE()
32 {
33 }
34
35
36
37 MG_PRIMITIVE::MG_PRIMITIVE(unsigned long num):MG_CONSTRUCTION_GEOMETRIQUE(num)
38 {
39 }
40
41 MG_PRIMITIVE::MG_PRIMITIVE(MG_PRIMITIVE& mdd):MG_CONSTRUCTION_GEOMETRIQUE(mdd)
42 {
43 }
44
45
46 MG_PRIMITIVE::~MG_PRIMITIVE()
47 {
48
49 }
50
51 TopoDS_Shape MG_PRIMITIVE::get_forme()
52 {
53 return forme;
54 }
55
56
57 void MG_PRIMITIVE::change_forme(TopoDS_Shape m_forme)
58 {
59 forme = m_forme;
60 }
61
62 double MG_PRIMITIVE::get_volume(double eps)
63 {
64 GProp_GProps gprops;
65 BRepGProp::VolumeProperties(forme,gprops,eps);
66 return gprops.Mass();
67 }
68
69 int MG_PRIMITIVE::get_type_mg_construction_geometrique(void)
70 {
71 return TYPE_MG_CONSTRUCTION_GEOMETRIQUE::PRIMITIVE;
72 }
73
74 #endif
75