|
#include <uf.h>
# @9 a1 c7 r: r: z) }#include <uf_ui.h>
8 ]6 W1 t% }2 K+ d# O% {7 K7 k0 e#include <uf_exit.h>
' \* W4 ]' `: w: t#include "uf_modl.h". R( g! J* k6 Y% S9 l& z6 z
extern DllExport void ufusr( char *parm, int *returnCode, int rlen )
1 z* _/ W* R: F; e7 ?3 |$ W- _{3 Z! j9 K F6 \; }" x: S
/* Initialize the API environment */* _0 Y; R! G5 V: M. D- e! k9 Y
if( UF_initialize() ) # P# R9 F3 g8 x. Z1 Q
{( F6 }. U1 G( O) v) r5 v
/* Failed to initialize */+ h7 k2 G8 [! C" R' a" u
return;
6 c, s. H, V: \ }# L& @, b4 L" A
UF_FEATURE_SIGN sign = UF_NULLSIGN;: ^0 `- B0 R5 ]: u) \4 u
double origin[3] = {0,0,0};- I+ U1 q6 E5 O% ^
char* height = "5";
6 q! L% F& D; M1 E9 p char* diam = "8";
2 Y* Z8 ?2 n+ R double direction[3] = {0,0,5};
! R% k( y6 n ^9 R tag_t cyl1;
" O' q; n$ _6 a- K8 F UF_MODL_create_cyl1(sign,origin,height,diam,direction,&cyl1);" W5 i( Y, B* s( H
char* height2 = "50";* ~! I: N' z# ~3 ?1 T, y$ S
char* diam2 = "4";, F/ F9 ~9 z( K' L3 a$ p6 j2 f9 P
tag_t cyl2;$ O5 O/ P& m3 w) @, X
UF_MODL_create_cyl1(sign,origin,height2,diam2,direction,&cyl2);
' L! C2 M. l* k2 W tag_t cyl_ent;
6 r# W* w( Q1 p y" M7 S/ s logical retain_target_body=FALSE;8 q) R% h6 v) \2 E
logical retain_tool_body=FALSE; " b* V6 x! Y8 ^, f/ n& w# O* o
UF_MODL_unite_bodies_with_retained_options (cyl1,cyl2,retain_target_body,retain_tool_body,&cyl_ent);
+ B) F- ?% r }8 B& e! k' v0 G /* Terminate the API environment */6 a. K# e U, H; M: B
UF_terminate();- [ K5 N0 g* d/ G8 |
}% ^& E6 T+ X) O0 s/ Y, e
( I: m6 Y* ~6 a5 Z, l- Oextern int ufusr_ask_unload( void )( w) q' D9 h* @+ R" i
{" P* l9 `+ R6 q3 D
return( UF_UNLOAD_IMMEDIATELY );
8 l) I; \- I) S}. S3 b* p! ~- w8 z
1 M/ J! i3 L" d, v2 F, [ |
|