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