|
static void do_ugopen_api(void): K# f$ S- I! n6 z5 H, n
{
* C% Z6 J0 c4 b# i) g1 B int obj_count;% Y# U8 z% f3 a5 [
UF_FEATURE_SIGN mode_sign = UF_NULLSIGN;: K9 R4 N; W# r/ b2 I1 P o
tag_t generators[4], line1, line2, line3, line4, *objects;
- L: w( X( Q3 _+ T7 S char *body_limit[2] = {"0.0", "360.0"}; 7 M& G3 z2 K$ m7 ~3 I/ o
char *offsets[2]= {"0.0", "0.0" };
+ _3 D( d8 B" M* Y' ]% k double origin[3] = {-2.0, 0.0, 0.0};; B) Z4 m% q% U7 z4 C
double direction[3] = {0.0, 1.0, 0.0};
2 \! P3 j# ?2 ~/ a1 { ; x5 ^. Y+ O- R4 M) c
UF_MODL_SWEEP_TRIM_object_p_t trim_data = NULL;
& F% s; J1 z# V+ I
* h. q# n4 k; P) l UF_CURVE_line_t sline1, sline2, sline3, sline4;! v0 N& c& g4 M# B. p& R' e
( u. S- s0 U( h4 H5 }+ L
/* line#1 */. m/ h: p( ~$ h2 i4 v; v: ^; D
sline1.start_point[0] = 0.0; 6 o5 }7 ^8 q& O* u6 s$ M+ h
sline1.start_point[1] = 0.0;
4 P( S$ L$ [1 _7 Y sline1.start_point[2] = 0.0;
, i" t8 d; h# E2 x* b& L7 ^ sline1.end_point[0] = 0.0;
# Z6 H3 p4 o& W( J, ]# v sline1.end_point[1] = 1.0;
+ x; H+ @; z+ D/ L, n sline1.end_point[2] = 0.0;! S: v, L4 C) K- ]! y
UF_CALL(UF_CURVE_create_line(&sline1,&line1));( K7 I4 B9 j( M' h1 ?0 u
* H' e/ D; C; Q) d& C0 e4 H1 j6 a
/* line#2 */2 k1 z% r G; x' Z* }; R& N
sline2.start_point[0] = 0.0;: k4 y1 g) S! l( g/ f: j7 U0 e
sline2.start_point[1] = 1.0;
( D# m5 l# U: O5 W r6 Y+ W- G: u9 O sline2.start_point[2] = 0.0;
. W$ O! a3 P1 f! { sline2.end_point[0] = 2.5;
' U+ K9 t! U; m* c' D& i sline2.end_point[1] = 3.5;) @9 Q) e- D# q% D( Z6 E
sline2.end_point[2] = 0.0;
7 ~/ l9 I3 A, H) B4 `% ? UF_CALL(UF_CURVE_create_line(&sline2,&line2));
$ ?) v8 ]( H u5 \* s% @# f( R 4 e0 z5 T; X) M7 }; c/ G
/* line#3 */
+ j# f4 v* g/ A2 r' y8 t/ z sline3.start_point[0] = 2.5;4 r) j, f ~5 R2 v5 R; ~2 |7 k9 h
sline3.start_point[1] = 3.5;
0 c. A6 d* k2 U/ ~* b" h% q* m; e sline3.start_point[2] = 0.0;
( o+ h0 v( L9 K# t9 G sline3.end_point[0] = 1.0;4 \* G) z* X1 C) U
sline3.end_point[1] = 0.0;
: c; o" ^- Y* d z; q2 e5 n sline3.end_point[2] = 0.0;" o# s6 o1 b5 f
UF_CALL(UF_CURVE_create_line(&sline3,&line3));. H. t; @& r# r2 @: D
9 l. q, d$ ]0 }, k+ j% H. m /* line#4 */( q; H4 x ~ N' V/ T+ |+ M
sline4.start_point[0] = 1.0;. G; ~5 u, R: K: Q
sline4.start_point[1] = 0.0;
6 f. f7 T. i0 C# I sline4.start_point[2] = 0.0;
2 F5 ^3 F. q5 y$ h- b' L! x1 l/ ] sline4.end_point[0] = 0.0;
9 N) T+ B. B2 s2 v/ h sline4.end_point[1] = 0.0;! {, T4 G- O' t7 n$ R
sline4.end_point[2] = 0.0;
k/ {. _0 Z! ~ P+ E UF_CALL(UF_CURVE_create_line(&sline4,&line4));
+ ?- v; }- s, h5 k" B2 Y
2 ^. t# Q. e2 X9 d. H' ^' L5 e generators[0] = line1;1 x) h( s( d) d4 \8 e
generators[1] = line2;3 u8 f0 _7 z1 N% o; X
generators[2] = line3;$ |; D5 O: F' F7 k! l5 @
generators[3] = line4;
1 I5 u! P* F3 B5 Z# }9 g% L & j6 `: Q5 e3 T8 H% v* C' x
UF_CALL(UF_MODL_create_revolution(generators, 4, trim_data,
* U! v- {/ G! _' D body_limit, offsets, origin, false,
6 L8 \" B0 O. R d6 `2 @/ ~ true, origin, direction, mode_sign,. c& ]3 h5 F+ R- ~
&objects, &obj_count ));0 m9 ^% L; @2 E, G0 v
0 D+ D, i' y5 N} |
|