/* spl_off.cdp - By Mark Reimer - 4-21-98 Creates offset splines on both sides of a selected spline at a specified distance */ /* initialize local variables */ local offset,enttype,dims,segs,j,k,A,B,C,D,E,F,G,H local x,y,ang,track,vm local double nodept[0][0] local double fdat[0] /* dimension arrays */ array nodept[210][2] array fdat[1600] offset = 1 :getwidth getflt "Enter the spline offset distance (%f) =>",offset,offset on (@key + 3) goto exit, exit, :select getent "Select spline to offset", enttype, ,fdat on (@key + 3) goto exit, getwidth, if (@error == 0) goto goodselect pause "Error selecting spline... Press Return" goto select :goodselect dims = @intdat[8] segs = @intdat[11] /* make sure it's 2d */ if (dims == 0) goto drawtrack pause "Must be a 2d Spline... Press Return" goto select :drawtrack /* Get construction view matrix and place in array */ getview @intdat[10],vm view 1,vm[0],vm[1],vm[2],vm[3],vm[4],vm[5],vm[6],vm[7],vm[8] for (track=1;track<3;track=track+1) { prompt "Processing spline %d...Please wait", track if (track == 2) offset = -offset for (j=0;j