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 |
|
|
// sld_fonction.h |
16 |
|
|
// |
17 |
|
|
//------------------------------------------------------------ |
18 |
|
|
//------------------------------------------------------------ |
19 |
|
|
// COPYRIGHT 2000 |
20 |
|
|
// Version du 02/03/2006 � 11H22 |
21 |
|
|
//------------------------------------------------------------ |
22 |
|
|
//------------------------------------------------------------ |
23 |
|
|
#ifdef BREP_SLD |
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
#ifndef sld_fonctionH |
28 |
|
|
#define sld_fonctionH |
29 |
|
|
|
30 |
|
|
#ifdef WINDOWS_VERSION |
31 |
|
|
#ifdef BUILT_DLL_GEOMETRIE |
32 |
|
|
#define DLLPORTGEOMETRIE __declspec(dllexport) |
33 |
|
|
#else |
34 |
|
|
#define DLLPORTGEOMETRIE __declspec(dllimport) |
35 |
|
|
#endif |
36 |
|
|
#else |
37 |
|
|
#define DLLPORTGEOMETRIE |
38 |
|
|
#endif |
39 |
|
|
|
40 |
|
|
#include <atl\atlmod.h> |
41 |
|
|
#include "SldWorks_TLB.h" |
42 |
|
|
#include "SwConst_TLB.h" |
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
class DLLPORTGEOMETRIE SLD_FONCTION |
48 |
|
|
{ |
49 |
|
|
|
50 |
|
|
|
51 |
|
|
public: |
52 |
|
|
SLD_FONCTION(void) ; |
53 |
|
|
~SLD_FONCTION(void); |
54 |
|
|
|
55 |
|
|
CComPtr <ISldWorks> swApp; |
56 |
|
|
CComPtr <IModelDoc2> swModel; |
57 |
|
|
|
58 |
|
|
|
59 |
|
|
void OuvrirFichier(char* ); |
60 |
|
|
void Sauvegarder(char* file); |
61 |
|
|
void identificateur(void); |
62 |
|
|
void VideNom(void); |
63 |
|
|
void Fermer(void); |
64 |
|
|
void Connection(void); |
65 |
|
|
|
66 |
|
|
void get_face_tessellation(CComPtr<IFace2> __swFace, long *__triangleCount, double ** __tessPts); |
67 |
|
|
|
68 |
|
|
void Modeler_SetToleranceValue(long iTol, double __tolerance); |
69 |
|
|
|
70 |
|
|
void SetID(IFace2* , long type=0 ); |
71 |
|
|
void SetID(IEdge* ,long type=0 ); |
72 |
|
|
void SetID(IVertex* ,long type=0); |
73 |
|
|
|
74 |
|
|
void EffaceID(IFace2* ); |
75 |
|
|
void EffaceID(IEdge* ); |
76 |
|
|
void EffaceID(IVertex* ); |
77 |
|
|
|
78 |
|
|
BOOL GetParID(char* ID,CComPtr<IFace2>&); |
79 |
|
|
BOOL GetParID(char* ID,CComPtr<IEdge>&); |
80 |
|
|
BOOL GetParID(char* ID,CComPtr<IVertex>&); |
81 |
|
|
BOOL GetParID(char* ID,CComPtr<ISurface>&); |
82 |
|
|
BOOL GetParID(char* ID,CComPtr<ICurve>& ); |
83 |
|
|
BOOL GetParID(BSTR nom,CComPtr<IFace2>&); |
84 |
|
|
BOOL GetParID(BSTR nom,CComPtr<IEdge>&); |
85 |
|
|
BOOL GetParID(BSTR nom,CComPtr<IVertex>&); |
86 |
|
|
|
87 |
|
|
class AnsiString GetID(IEdge* ); |
88 |
|
|
class AnsiString GetID(IFace2* ); |
89 |
|
|
class AnsiString GetID(IVertex* ); |
90 |
|
|
|
91 |
|
|
CComPtr <IAttributeDef> DefAttrDoublon; |
92 |
|
|
|
93 |
|
|
double GetValeurTolerance(); |
94 |
|
|
double sensMaitre; |
95 |
|
|
|
96 |
|
|
private: |
97 |
|
|
int ouvert; |
98 |
|
|
double tolerance; |
99 |
|
|
|
100 |
|
|
|
101 |
|
|
}; |
102 |
|
|
#endif |
103 |
|
|
#endif |
104 |
|
|
|
105 |
|
|
|
106 |
|
|
|