|
static void do_ugopen_api(void)
5 Q$ o5 L8 H+ w; N{
! g6 b# @+ ?' S: U# B# v int obj_count;
" z( c& Z# {4 h x5 } UF_FEATURE_SIGN mode_sign = UF_NULLSIGN;: X+ F2 e2 ~3 e, i: E5 R
tag_t generators[4], line1, line2, line3, line4, *objects;
5 m: v2 g7 |6 Z/ ` char *body_limit[2] = {"0.0", "360.0"};
7 V$ W+ n3 n5 d6 q$ t1 N5 E char *offsets[2]= {"0.0", "0.0" };1 P) G/ f6 t" G! q2 f
double origin[3] = {-2.0, 0.0, 0.0};
9 o9 T! T- \! G, P double direction[3] = {0.0, 1.0, 0.0};
- q( {* |0 A: u; Q# _; _
/ j/ n; h2 n7 s# ? UF_MODL_SWEEP_TRIM_object_p_t trim_data = NULL; / d1 O; ~9 A0 y9 d( s: g4 Q. s
H5 Y! ~. v( c( Y+ B: \ UF_CURVE_line_t sline1, sline2, sline3, sline4;2 J' B U" C! \" g5 J
: o2 p3 u* a! {" ^2 H4 \, d' A /* line#1 */! H# b1 r$ ]) C9 M2 f9 T; o
sline1.start_point[0] = 0.0;
7 [+ p6 [% j* S5 x/ h+ O: c sline1.start_point[1] = 0.0;
) e3 B7 K+ P7 V1 d sline1.start_point[2] = 0.0;# c+ {- d8 E* A7 T( a& c
sline1.end_point[0] = 0.0;5 j% p+ U. v" t R. g
sline1.end_point[1] = 1.0;. r* l' T9 O3 W% P3 B6 [% {
sline1.end_point[2] = 0.0;
& G+ b- I- l. v1 \4 P UF_CALL(UF_CURVE_create_line(&sline1,&line1));
A9 w$ M K x& ^$ d; I7 ?; V! ~ ! W; P3 q+ E" X* E
/* line#2 */
# `5 B# T% n; X4 Y5 M( F% S sline2.start_point[0] = 0.0;7 }! Y+ L& ?2 e# s3 k: U
sline2.start_point[1] = 1.0;& g9 y" z1 e. M- ~! K( w
sline2.start_point[2] = 0.0;6 m% u( J1 d' R: ?& r
sline2.end_point[0] = 2.5;( @# ~% [5 T- D0 b% h1 h% Z) K/ F
sline2.end_point[1] = 3.5;
' o# c. ]9 r# O- ?& | sline2.end_point[2] = 0.0;
) Z9 P3 ?2 S8 z# y9 y UF_CALL(UF_CURVE_create_line(&sline2,&line2));9 p7 E+ n! _* b6 A0 x( H
~# U$ w5 b$ w
/* line#3 */
+ t0 s& m! e6 h( B* d sline3.start_point[0] = 2.5;+ J5 g8 P5 b4 l8 h& y u
sline3.start_point[1] = 3.5;) [1 B6 O) U" i
sline3.start_point[2] = 0.0;8 T' j" A2 t8 {, I; ]" I- T6 }
sline3.end_point[0] = 1.0;
4 d# z# q1 Q) N sline3.end_point[1] = 0.0;
* Q$ p! O" l L4 b1 o+ b) G6 M sline3.end_point[2] = 0.0;
; U; f6 J: l3 i" ` z UF_CALL(UF_CURVE_create_line(&sline3,&line3));5 J8 n8 N4 S. _
& _7 p& z ]6 Y* S
/* line#4 */
; t, @( e9 M( w9 u9 x8 D sline4.start_point[0] = 1.0;: \8 w Y+ N# n& D l- p" X
sline4.start_point[1] = 0.0;# H# t; l# A/ q* T3 w
sline4.start_point[2] = 0.0;' V! [ N, i. ~& d6 p
sline4.end_point[0] = 0.0;6 k3 k n4 b8 r! V
sline4.end_point[1] = 0.0;/ v% Z2 E0 C$ m# b
sline4.end_point[2] = 0.0;
) N3 [1 ] u8 J% g UF_CALL(UF_CURVE_create_line(&sline4,&line4));
' L8 w9 O: K3 i3 z) ` ( w, g; T' s; L6 \
generators[0] = line1;0 @# y+ t0 }# k# i2 X
generators[1] = line2;
* G5 Y2 Y+ X% o, E# B W) I& ? generators[2] = line3;/ ?, _3 D8 d# M" F$ h: \# X: c
generators[3] = line4;
" y5 Z1 ]' J. V2 J
: b% y, p" ]$ q Y0 G) R UF_CALL(UF_MODL_create_revolution(generators, 4, trim_data,
* {- L* N& O2 V3 @+ `! J | body_limit, offsets, origin, false,
% m* q( @, { I* t8 r: g( E true, origin, direction, mode_sign,
& `. Z5 \- j+ m3 ? &objects, &obj_count ));
/ n0 O" l, u- O' [, ]4 o
7 i: @: J9 C$ j5 h} |
|