//hexagonCurve // // Date: 2004/01/06 // Author: Dai Sato dstruevision@dstruevision.com http://www.dstruevision.com // Procedure Name: JustListMaterials // // Description: This smiple scripts create a hexgon cv curve and fillet square by clicking a button. // global proc hc_makeHexagon () { string $createdCurve = `curve -p -1.337 0 -0.171 -p -1.439 0 -0.0303 -p -1.296 0 0.179 -p -0.817 0 1.006 -p -0.7 0 1.208 -p -0.442 0 1.207 -p 0.474 0 1.195 -p 0.73 0 1.208 -p 0.835 0 1.026 -p 1.316 0 0.196 -p 1.447 0 -0.0299 -p 1.31 0 -0.266 -p 0.858 0 -1.047 -p 0.73 0 -1.268 -p 0.433 0 -1.268 -p -0.46 0 -1.268 -p -0.7 0 -1.268 -p -0.812 0 -1.074`; closeCurve -ch 1 -ps 1 -rpo 1 -bb 0.5 -bki 0 -p 0.1 $createdCurve; rebuildCurve -ch 1 -rpo 1 -rt 0 -end 1 -kr 0 -kcp 1 -kep 1 -kt 0 -s 0 -d 3 -tol 0.01 $createdCurve; } global proc hc_makeFilletSquare () { string $createdCurve = `curve -p -0.38 0 -0.5 -p -0.5 0 -0.5 -p -0.5 0 -0.38 -p -0.5 0 0.38 -p -0.5 0 0.5 -p -0.38 0 0.5 -p 0.38 0 0.5 -p 0.5 0 0.5 -p 0.5 0 0.38 -p 0.5 0 0.0 -p 0.5 0 -0.38 -p 0.5 0 -0.5 -p 0.38 0 -0.5`; closeCurve -ch 1 -ps 1 -rpo 1 -bb 0.5 -bki 0 -p 0.1 $createdCurve; rebuildCurve -ch 1 -rpo 1 -rt 0 -end 1 -kr 0 -kcp 1 -kep 1 -kt 0 -s 0 -d 3 -tol 0.01 $createdCurve; } global proc hexagonCurve (){ if ((`window -ex hexagonCurveWindow`) == true) deleteUI hexagonCurveWindow; window -t "hexagonCurveWindow" -s true -mnb true -mxb true -mb true hexagonCurveWindow; columnLayout -rs 3; button -label "Make Hexagon" -c "hc_makeHexagon()"; button -label "Make Fillet Square" -c "hc_makeFilletSquare()"; window -e -width 150 -height 100 hexagonCurveWindow; showWindow hexagonCurveWindow; }