Stair Stringer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-11 05:44 PM
EDIT
Thanks for looking Dwight. I tried using gosub but it did the same thing. if I run it as it is shown now it works as before plus gives me the next step down. If I remove the ! from the 10: it doesn't seem to like having the 10: in the middle of the prism. Will a prism normally work with a line number in the middle of it?
ROTX 90
MATERIAL 81
L=NOR-3
STRW=11.25"
TH=(NOR*7.3125")+LF
TRW=RUN/NOTR
RISE=TH/NOR
ANG=ATN(RISE/TRW)
R2=RISE-1"
N=STRW/SIN(ANG)
M=R2/TAN(ANG)
F=N-M
Q=M-1.5"
U=(RUN-2.375")+Q
W=U-N
G=W*TAN(ANG)
V=TH-(RISE+1")
H=TRW-3.875"
I=3
!PRISM ((NOTR-2)*2)+8, 1.5",
PRISM 11, 1.5",
M, 0, N, 0, U, G, U, V, U-H, V,
U-H, V-RISE, U-(H+TRW), V-RISE,
!10:
U-(H+(TRW*(I-2))), V-(RISE*(I-1)),
U-(H+(TRW*(I-1))), V-(RISE*(I-1)),
!I=I+1
!IF I > NOR+3 THEN 20:
!GOTO 10:
!20:
M, R2, M, 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-11 07:06 PM
GOTO 10:
IS:
GOSUB 10:
??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-11 08:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-11 10:06 PM
I did not think that one could
jump out of the parameters of a command
and go to a label. But to be sure, I tried
it with a very simple PRISM command
and got an error using goto and gosub.
I am curious about why you are not writing
the PRISM command in the normal manner
with each pair of x and y values on a separate line.
The code is more understandable this way.
I am not clear about why you would want
to jump out to a label.
Peter Devlin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-11 10:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-11 10:49 PM
I think you will need a FOR loop to do this.
Look at the code for the stringers in the
library part "Stair straight run.gsm" in
the concrete folder in the complete stairs folder.
You don't have to use the parameter buffer
but you need a FOR loop to fill the parameters
of the PRISM command based on the calculated
number of steps.
Peter Devlin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-11 10:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-12 12:54 AM
If you look at the script of the
lib part I mentioned you will
notice that some of the points
are not from the parameter buffer
but are in the command.
This is common in GDL.
Peter Devlin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-12 01:10 AM
Edit:
I found "Put"..."Get"..."Use"...NSP" in the manual. I'm starting to see how it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2007-03-12 03:46 AM
I wrote a small 3D script that I hope shows how
the FOR NEXT loop and PUT GET work.
The 3D script is as follows.
numriser=5 !!!number of risers
riserht=7" !!!riser height
trdp=11" !!!tread depth
width=3'-0" !!!stair width
!!!-------------------------------------
put 0,0
put 0,riserht
for i=1 to numriser step 1
put (i-1)*trdp,i*riserht
put i*trdp,i*riserht
next i
put trdp*numriser, riserht*(numriser-1)
put trdp,0
!!!--------------------------------------
material 18
pen 1
rotx 90
prism nsp/2,width,
get (nsp)
del 1
end
I hope this helps
Peter Devlin