Ayam 1.14 0 23 1 0 1 1 0 0 0 0 0 2 0 0 0 0 0 35 0 0 0 1 0 1 1 NP SpiralAttr 1 1 1296 # Ayam, save array: SpiralAttrData # crtspiralgui.tcl: example script for Ayam Script object # this script wants Script Object Type "Create" and creates # a spiral NURBS curve; it also has a property GUI, just # add a tag "NP SpiralAttr" to the script object to see it if { ![info exists ::SpiralAttrData] } { array set ::SpiralAttrData { Length 30 AngleD 0 Radius 3.0 ZDiff 0.25 SP {Length AngleD Radius ZDiff} } set ::SpiralAttrData(AngleD) [expr {90.0*3.141592654/180.0}] } set length $::SpiralAttrData(Length) set angled $::SpiralAttrData(AngleD) set r $::SpiralAttrData(Radius) set zd $::SpiralAttrData(ZDiff) crtOb NCurve -length $length;hSL setProperty NCurveAttr(Knot-Type) 1 set angle 0.0 set z 0.0 for {set i 0} {$i < $length} {incr i} { set x [expr {$r*cos($angle)}] set y [expr {$r*sin($angle)}] setPnt $i $x $y $z 1.0 set angle [expr {$angle + $angled}] set z [expr {$z + $zd}] } # for if { ![info exists ::SpiralAttr] } { array set ::SpiralAttr { arr SpiralAttrData sproc "" gproc "" w fSpiralAttr } global ay set w [frame $ay(pca).fSpiralAttr] addParam $w SpiralAttrData Length addParam $w SpiralAttrData AngleD addParam $w SpiralAttrData Radius addParam $w SpiralAttrData ZDiff } # crtspiralgui.tcl 5 SP Length AngleD Radius ZDiff Length 40 AngleD 0.3927 Radius 1.5 ZDiff 0.125 0 35 0 0 0 1 0 1 1 NP SpiralAttr 1 1 1316 # Ayam, save array: SpiralAttrData # crtspiralgui.tcl: example script for Ayam Script object # this script wants Script Object Type "Create" and creates # a spiral NURBS curve; it also has a property GUI, just # add a tag "NP SpiralAttr" to the script object to see it if { ![info exists ::SpiralAttrData] } { array set ::SpiralAttrData { Length 30 AngleD 0 Radius 3.0 ZDiff 0.25 SP {Length AngleD Radius ZDiff} } set ::SpiralAttrData(AngleD) [expr {90.0*3.141592654/180.0}] } set length $::SpiralAttrData(Length) set angled $::SpiralAttrData(AngleD) set r $::SpiralAttrData(Radius) set zd $::SpiralAttrData(ZDiff) crtOb NCurve -length $length;hSL setProperty NCurveAttr(Knot-Type) 1 set angle 0.0 set z 0.0 for {set i 0} {$i < $length} {incr i} { set x [expr {$r*cos($angle)}] set y [expr {$r*sin($angle)}] setPnt $i $x $y $z 1.0 set angle [expr {$angle + $angled}] set z [expr {$z + $zd + 0.5*sin($angle*4)}] } # for if { ![info exists ::SpiralAttr] } { array set ::SpiralAttr { arr SpiralAttrData sproc "" gproc "" w fSpiralAttr } global ay set w [frame $ay(pca).fSpiralAttr] addParam $w SpiralAttrData Length addParam $w SpiralAttrData AngleD addParam $w SpiralAttrData Radius addParam $w SpiralAttrData ZDiff } # crtspiralgui.tcl 5 SP Length AngleD Radius ZDiff Length 40 AngleD 0.3927 Radius 3.0 ZDiff 0.125 0 3 0 0 0 1 0 0 0 0