1 |
|
5 |
//------------------------------------------------------------
|
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 |
|
|
void OuvrirFichier(char* );
|
59 |
|
|
void Sauvegarder(char* file);
|
60 |
|
|
void identificateur(void);
|
61 |
|
|
void VideNom(void);
|
62 |
|
|
void Fermer(void);
|
63 |
|
|
void Connection(void);
|
64 |
|
|
|
65 |
|
|
void get_face_tessellation(CComPtr<IFace2> __swFace, long *__triangleCount, double ** __tessPts);
|
66 |
|
|
|
67 |
foucault |
27 |
void Modeler_SetToleranceValue(long iTol, double __tolerance);
|
68 |
|
|
|
69 |
|
5 |
void SetID(IFace2* , long type=0 );
|
70 |
|
|
void SetID(IEdge* ,long type=0 );
|
71 |
|
|
void SetID(IVertex* ,long type=0);
|
72 |
|
|
|
73 |
|
|
void EffaceID(IFace2* );
|
74 |
|
|
void EffaceID(IEdge* );
|
75 |
|
|
void EffaceID(IVertex* );
|
76 |
|
|
|
77 |
|
|
BOOL GetParID(char* ID,CComPtr<IFace2>&);
|
78 |
|
|
BOOL GetParID(char* ID,CComPtr<IEdge>&);
|
79 |
|
|
BOOL GetParID(char* ID,CComPtr<IVertex>&);
|
80 |
|
|
BOOL GetParID(char* ID,CComPtr<ISurface>&);
|
81 |
|
|
BOOL GetParID(char* ID,CComPtr<ICurve>& );
|
82 |
|
|
BOOL GetParID(BSTR nom,CComPtr<IFace2>&);
|
83 |
|
|
BOOL GetParID(BSTR nom,CComPtr<IEdge>&);
|
84 |
|
|
BOOL GetParID(BSTR nom,CComPtr<IVertex>&);
|
85 |
|
|
|
86 |
|
|
class AnsiString GetID(IEdge* );
|
87 |
|
|
class AnsiString GetID(IFace2* );
|
88 |
|
|
class AnsiString GetID(IVertex* );
|
89 |
|
|
|
90 |
|
|
CComPtr <IAttributeDef> DefAttrDoublon;
|
91 |
|
|
|
92 |
bournival |
23 |
double GetValeurTolerance();
|
93 |
|
|
|
94 |
|
5 |
private:
|
95 |
|
|
int ouvert;
|
96 |
bournival |
23 |
double tolerance;
|
97 |
|
5 |
|
98 |
|
|
|
99 |
|
|
};
|
100 |
|
|
#endif
|
101 |
|
|
#endif
|
102 |
|
|
|
103 |
|
|
|
104 |
|
|
|