|
#include <uf.h>
/ G. C5 P. ^: A% y# J# B3 j, f2 q#include <uf_ui.h>" j6 _) B' L `0 Q' f Y4 B$ S7 i1 t: V
#include <uf_exit.h>7 O2 f4 X: W6 E8 Z; ~, k
#include "uf_modl.h"
1 W8 ?5 z% b# A0 ^3 n; yextern DllExport void ufusr( char *parm, int *returnCode, int rlen )6 N0 \" _: {1 Q! }
{
c& P% ]0 [4 c% b/ e8 r /* Initialize the API environment */3 t& Y% Q* x! S& J
if( UF_initialize() )
f5 x2 u/ q) t! W( i# M4 E {
% \/ |: p4 V3 f9 t& L /* Failed to initialize */
( _8 t8 m! C' Y4 N, e return;
0 X) x4 J- r& w6 ^% y& C }
+ _. j" w* ]# a. Y v UF_FEATURE_SIGN sign = UF_NULLSIGN;
' Y2 y! s( e7 b+ u" n double origin[3] = {0,0,0};
" b6 ?5 h7 g' T- D/ q char* height = "5"; \( F }' O9 ^
char* diam = "8";
1 j9 T/ k( K( e/ h4 l3 R8 @& O7 Z7 _ double direction[3] = {0,0,5};% ~/ P8 K* G/ J0 f
tag_t cyl1;
K% W7 b N4 F9 g* }! F UF_MODL_create_cyl1(sign,origin,height,diam,direction,&cyl1);
( r& R- O: _5 R* n9 a' T& C) {# O char* height2 = "50";. ~1 d3 _' @+ q X6 g
char* diam2 = "4";9 V- R" p: J3 Q G3 ]
tag_t cyl2;6 s$ |" _9 {- Y
UF_MODL_create_cyl1(sign,origin,height2,diam2,direction,&cyl2);
" g4 {( r# ?% X8 P& V. ]: \ tag_t cyl_ent;8 ] H- c+ q- \3 R# ^: @
logical retain_target_body=FALSE;2 S' k- ]; d- m* k" j6 _
logical retain_tool_body=FALSE; ! b/ Y1 G" G' U0 v! V
UF_MODL_unite_bodies_with_retained_options (cyl1,cyl2,retain_target_body,retain_tool_body,&cyl_ent);
5 L+ d0 R* B0 q! v# A- e( V( l; O /* Terminate the API environment */
) }+ z2 \; n) c5 \3 P* d7 g UF_terminate();
1 Q- o/ m6 b* p" C+ i}9 } ]" {$ g9 e' n
6 _% I8 L s$ [/ R ~% ~
extern int ufusr_ask_unload( void )8 Q. f! E/ [: @! J# A) a/ r7 T
{# E0 H% K& q# C, E; X
return( UF_UNLOAD_IMMEDIATELY );
3 `' X, ~- W! j9 c- t}$ B. ]9 z) V; H# e. h0 U
3 B1 r |6 |3 Q, Y |
|