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 |
|
|
// step_surface.cpp |
16 |
|
|
// |
17 |
|
|
//------------------------------------------------------------ |
18 |
|
|
//------------------------------------------------------------ |
19 |
|
|
// COPYRIGHT 2000 |
20 |
|
|
// Version du 02/03/2006 � 11H22 |
21 |
|
|
//------------------------------------------------------------ |
22 |
|
|
//------------------------------------------------------------ |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
#include "gestionversion.h" |
26 |
|
|
|
27 |
|
|
#ifdef BREP_STEP |
28 |
|
|
|
29 |
|
|
#include "step_surface.h" |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
STEP_SURFACE::STEP_SURFACE(unsigned long num,ST_SURFACE *srf):MG_SURFACE(num),surface(srf) |
36 |
|
|
{ |
37 |
|
|
|
38 |
|
|
u_min=surface->get_umin(); |
39 |
|
|
u_max=surface->get_umax(); |
40 |
|
|
v_min=surface->get_vmin(); |
41 |
|
|
v_max=surface->get_vmax(); |
42 |
|
|
} |
43 |
|
|
|
44 |
|
|
STEP_SURFACE::STEP_SURFACE(ST_SURFACE *srf):MG_SURFACE(),surface(srf) |
45 |
|
|
{ |
46 |
|
|
u_min=surface->get_umin(); |
47 |
|
|
u_max=surface->get_umax(); |
48 |
|
|
v_min=surface->get_vmin(); |
49 |
|
|
v_max=surface->get_vmax(); |
50 |
|
|
} |
51 |
|
|
|
52 |
|
|
STEP_SURFACE::STEP_SURFACE(STEP_SURFACE& mdd):MG_SURFACE(mdd),surface(mdd.surface) |
53 |
|
|
{ |
54 |
|
|
u_min=mdd.get_umin(); |
55 |
|
|
u_max=mdd.get_umax(); |
56 |
|
|
v_min=mdd.get_vmin(); |
57 |
|
|
v_max=mdd.get_vmax(); |
58 |
|
|
} |
59 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
STEP_SURFACE::~STEP_SURFACE() |
63 |
|
|
{ |
64 |
|
|
} |
65 |
|
|
|
66 |
|
|
void STEP_SURFACE::evaluer(double *uv,double *xyz) |
67 |
|
|
{ |
68 |
|
|
surface->evaluer(uv,xyz); |
69 |
|
|
} |
70 |
|
|
|
71 |
|
|
void STEP_SURFACE::deriver(double *uv,double *xyzdu, double *xyzdv) |
72 |
|
|
{ |
73 |
|
|
surface->deriver(uv,xyzdu,xyzdv); |
74 |
|
|
} |
75 |
|
|
|
76 |
|
|
void STEP_SURFACE::deriver_seconde(double *uv,double* xyzduu,double* xyzduv,double* xyzdvv,double *xyz, double *xyzdu, double *xyzdv) |
77 |
|
|
{ |
78 |
|
|
|
79 |
|
|
surface->deriver_seconde( uv, xyzduu,xyzduv,xyzdvv,xyz,xyzdu,xyzdv ); |
80 |
|
|
|
81 |
|
|
} |
82 |
|
|
|
83 |
|
|
void STEP_SURFACE::inverser(double* uv,double *xyz,double precision) |
84 |
|
|
{ |
85 |
|
|
surface->inverser(uv,xyz,precision); |
86 |
|
|
} |
87 |
|
|
|
88 |
|
|
int STEP_SURFACE::est_periodique_u(void) |
89 |
|
|
{ |
90 |
|
|
return surface->est_periodique_u(); |
91 |
|
|
} |
92 |
|
|
|
93 |
|
|
int STEP_SURFACE::est_periodique_v(void) |
94 |
|
|
{ |
95 |
|
|
return surface->est_periodique_v(); |
96 |
|
|
} |
97 |
|
|
|
98 |
|
|
double STEP_SURFACE::get_periode_u(void) |
99 |
|
|
{ |
100 |
|
|
if (surface->est_periodique_u()==0) return 0.; |
101 |
|
|
return surface->get_periode_u(); |
102 |
|
|
} |
103 |
|
|
|
104 |
|
|
double STEP_SURFACE::get_periode_v(void) |
105 |
|
|
{ |
106 |
|
|
if (surface->est_periodique_v()==0) return 0.; |
107 |
|
|
return surface->get_periode_v(); |
108 |
|
|
} |
109 |
|
|
|
110 |
|
|
|
111 |
francois |
763 |
void STEP_SURFACE::enregistrer(std::ostream& o,double version) |
112 |
francois |
283 |
{ |
113 |
|
|
o << "%" << get_id() << "=SURFACE_STEP("<< surface->get_id()<< ");" << std::endl; |
114 |
|
|
} |
115 |
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
int STEP_SURFACE::get_type_geometrique(TPL_LISTE_ENTITE<double> ¶m) |
119 |
|
|
{ |
120 |
|
|
return surface->get_type_geometrique(param); |
121 |
|
|
} |
122 |
|
|
|
123 |
|
|
|
124 |
|
|
void STEP_SURFACE::get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> ¶m) |
125 |
|
|
{ |
126 |
|
|
surface->get_param_NURBS(indx_premier_ptctr,param); |
127 |
|
|
} |
128 |
|
|
|
129 |
francois |
820 |
void STEP_SURFACE::get_liste_pole(std::vector<double> *liste_pole,double eps) |
130 |
couturad |
814 |
{ |
131 |
francois |
820 |
printf("void STEP_SURFACE::get_liste_pole(std::vector<double> liste_pole) : Fonction non implementee !\n"); |
132 |
couturad |
814 |
} |
133 |
francois |
283 |
|
134 |
|
|
|
135 |
couturad |
814 |
|
136 |
|
|
|
137 |
|
|
|
138 |
|
|
|
139 |
francois |
283 |
#endif |
140 |
|
|
|
141 |
|
|
|
142 |
|
|
|
143 |
|
|
|