1 |
francois |
1158 |
//####//------------------------------------------------------------ |
2 |
|
|
//####//------------------------------------------------------------ |
3 |
|
|
//####// MAGiC |
4 |
|
|
//####// Jean Christophe Cuilliere et Vincent FRANCOIS |
5 |
|
|
//####// Departement de Genie Mecanique - UQTR |
6 |
|
|
//####//------------------------------------------------------------ |
7 |
|
|
//####// MAGIC est un projet de recherche de l equipe ERICCA |
8 |
|
|
//####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres |
9 |
|
|
//####// http://www.uqtr.ca/ericca |
10 |
|
|
//####// http://www.uqtr.ca/ |
11 |
|
|
//####//------------------------------------------------------------ |
12 |
|
|
//####//------------------------------------------------------------ |
13 |
|
|
//####// |
14 |
|
|
//####// sld_point.cpp |
15 |
|
|
//####// |
16 |
|
|
//####//------------------------------------------------------------ |
17 |
|
|
//####//------------------------------------------------------------ |
18 |
|
|
//####// COPYRIGHT 2000-2024 |
19 |
|
|
//####// jeu 13 jun 2024 11:58:54 EDT |
20 |
|
|
//####//------------------------------------------------------------ |
21 |
|
|
//####//------------------------------------------------------------ |
22 |
foucault |
27 |
|
23 |
|
|
|
24 |
|
|
#include "gestionversion.h" |
25 |
|
|
|
26 |
|
|
#ifdef BREP_SLD |
27 |
|
|
#include <system.hpp> |
28 |
|
|
#include "sld_point.h" |
29 |
|
|
#include "constantegeo.h" |
30 |
|
|
#include "sld_fonction.h" |
31 |
|
|
|
32 |
|
|
#include <atl\atlmod.h> |
33 |
|
|
#include "smartvars.h" |
34 |
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
SLD_POINT::SLD_POINT(unsigned long num,std::string idvertex,SLD_FONCTION& fonc):MG_POINT(num),fonction(fonc) |
39 |
|
|
{ |
40 |
francois |
283 |
idoriginal=idvertex; |
41 |
|
|
fonction.GetParID((char*)idvertex.c_str(),swVertex); |
42 |
|
|
CComVariant vretval; |
43 |
|
|
swVertex->GetPoint(&vretval) ; |
44 |
|
|
SafeDoubleArray retval(vretval); |
45 |
|
|
xyz[0]=retval[0]; |
46 |
|
|
xyz[1]=retval[1]; |
47 |
|
|
xyz[2]=retval[2]; |
48 |
foucault |
27 |
} |
49 |
|
|
|
50 |
|
|
SLD_POINT::SLD_POINT(std::string idvertex,SLD_FONCTION& fonc):MG_POINT(),fonction(fonc) |
51 |
|
|
{ |
52 |
francois |
283 |
idoriginal=idvertex; |
53 |
|
|
fonction.GetParID((char*)idvertex.c_str(),swVertex); |
54 |
|
|
CComVariant vretval; |
55 |
|
|
swVertex->GetPoint(&vretval) ; |
56 |
|
|
SafeDoubleArray retval(vretval); |
57 |
|
|
xyz[0]=retval[0]; |
58 |
|
|
xyz[1]=retval[1]; |
59 |
|
|
xyz[2]=retval[2]; |
60 |
foucault |
27 |
} |
61 |
|
|
|
62 |
|
|
|
63 |
|
|
SLD_POINT::~SLD_POINT() |
64 |
|
|
{ |
65 |
|
|
if (swVertex.p) |
66 |
|
|
swVertex.p = NULL; |
67 |
|
|
} |
68 |
|
|
|
69 |
|
|
void SLD_POINT::evaluer(double *coord) |
70 |
|
|
{ |
71 |
francois |
283 |
coord[0]=xyz[0]; |
72 |
|
|
coord[1]=xyz[1]; |
73 |
|
|
coord[2]=xyz[2]; |
74 |
foucault |
27 |
} |
75 |
|
|
|
76 |
francois |
763 |
void SLD_POINT::enregistrer(std::ostream& o,double version) |
77 |
foucault |
27 |
{ |
78 |
francois |
283 |
o << "%" << get_id() << "=POINT_SLD("<< idoriginal.c_str() << ");" << std::endl; |
79 |
foucault |
27 |
} |
80 |
|
|
|
81 |
|
|
int SLD_POINT::get_type_geometrique(TPL_LISTE_ENTITE<double> ¶m) |
82 |
|
|
{ |
83 |
francois |
283 |
param.ajouter(xyz[0]); |
84 |
|
|
param.ajouter(xyz[1]); |
85 |
|
|
param.ajouter(xyz[2]); |
86 |
|
|
return MGCo_POINT; |
87 |
foucault |
27 |
} |
88 |
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
void SLD_POINT::get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> ¶m) |
92 |
|
|
{ |
93 |
|
|
|
94 |
francois |
283 |
param.ajouter(0); |
95 |
|
|
param.ajouter(1); |
96 |
|
|
param.ajouter(0); |
97 |
foucault |
27 |
|
98 |
francois |
283 |
param.ajouter(1); |
99 |
|
|
param.ajouter(0); |
100 |
foucault |
27 |
|
101 |
|
|
|
102 |
francois |
283 |
param.ajouter(xyz[0]); |
103 |
|
|
param.ajouter(xyz[1]); |
104 |
|
|
param.ajouter(xyz[2]); |
105 |
foucault |
27 |
|
106 |
francois |
283 |
param.ajouter(1); |
107 |
foucault |
27 |
|
108 |
francois |
283 |
indx_premier_ptctr=5; |
109 |
foucault |
27 |
|
110 |
|
|
|
111 |
|
|
} |
112 |
|
|
|
113 |
|
|
#endif |
114 |
|
|
|