MCVSIKarte1
VectorScripts`u#û$Karte1gZIn diesem Bereich bestimmen Sie, unter welchen Bedingungen das Objekt neu gezeichnet wird.
V
VD ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýüùúùû¬ýýýýýýûøúùøúúøüûVøúøø¬ýýýýýúýàøüààø¬ýùøýýøààààý¬¬ýýøüýýüýýùøýýøüýýýýôàýýýøüýýýýýùøýüVúýýýýàôôôôôûø¬àààààùøøøøúýôôüôôôôôüVýôôôôôúVôôVùôôVùôôôôôüVýôôôôôúVôôôúVàôààôôôôôüVýôôôôôúVôôôúVàôôàôôôôôV¬ôôôôôúVôôôVúôôúôôôàVVù¬ôôôûVVùúVúôôôùúôôôàü¬ýü¬ôôôüüüüýàôôôôùôôôôôôôôôôôôôôôôôôôôôüVàôôôôôôôôôôôôôôôôôôôôôú¬ôÿÿðÿÿðÿÿðÿÿð
ýÿð
™ðÝðßðß›ð߃ðßÜÀßÞðßÞðßÝð‹ÐÿÿÐÿÿÐÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿð
Êã ü
.
Ginput_platforms5input_steps8input_stairswidth20input_platformlength20input_height120input_width100PROCEDURE faltkarte;
VAR
pageWidth, pageHeight: real;
pageFoldY: real;
width, depth, height: real;
steps, platforms: integer;
i, j, k, factor: integer;
zeroy, zerox: real;
stairsheight, stairswidth, stepheight, platformlength: real;
error: boolean;
errortext: string;
PROCEDURE paper;
BEGIN
{*Stift einstellen*}
penPat(2);
penFore(0,0,65535);
{*blatt zeichnen*}
moveto(0,0);
lineto(pageWidth,0);
lineto(pageWidth,pageHeight);
lineto(0,pageHeight);
lineto(0,0);
{*Stift einstellen*}
penFore(65535,0,0);
penPat(-2);
{*blatt faltkanten zeichnen*}
moveto(0,pageFoldY);
lineto((pagewidth-width)/2,pageFoldY);
moveto(pagewidth-(pagewidth-width)/2,pageFoldY);
lineto(pageWidth,pageFoldY);
END;
PROCEDURE errors;
BEGIN
error := false;
IF zeroy<10 THEN
BEGIN
error := true;
errortext := 'Die Treppenbreite musste verringert werden.#13#10';
stairswidth := stairswidth + ((zeroy-10)/platforms);
depth:=platforms*stairswidth;
zeroy:=pageFoldY-depth;
END;
IF platforms<1 THEN
BEGIN
error := true;
errortext := concat(errortext, 'Ganz ohne Treppe klappts leider nicht.#13#10');
platforms := 1;
depth:=platforms*stairswidth;
zeroy:=pageFoldY-depth;
stairsheight:=height/platforms;
stairsheight:=stairsheight-stepheight;
END;
IF error THEN
BEGIN
TextFont(GetFontID('Verdana'));
TextSize(14.5);
TextOrigin(0,297+12);
BEGINText;
errortext
ENDText;
END;
END;
PROCEDURE drawstep;
BEGIN
{*Stift einstellen*}
penPat(2);
penFore(0,0,65535);
{*Stufe zeichnen*}
moveto(zerox+(((j-1)*((width-2*platformlength)/steps)))*factor,zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+((j-1)*(stairsheight/steps)));
lineto(zerox+(((j-1)*((width-2*platformlength)/steps)))*factor,zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+stairswidth+((j)*(stairsheight/steps)));
{*Stift einstellen*}
penFore(65535,0,0);
penPat(-2);
{*Stufenfaltung zeichnen*}
IF j<>steps+1 THEN
BEGIN
FOR k:=0 TO 1 DO
BEGIN
moveto(zerox+(((j-1)*((width-2*platformlength)/steps)))*factor,zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+((j)*(stairsheight/steps))+(k*stairswidth));
lineto(zerox+(((j)*((width-2*platformlength)/steps)))*factor,zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+((j)*(stairsheight/steps))+(k*stairswidth));
END;
END;
{*Faltung fŸr Boden*}
IF j=steps+1 THEN
BEGIN
moveto(zerox+(width-2*platformlength)*factor,zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+((j)*(stairsheight/steps)));
lineto(zerox+(((j-1)*((width-2*platformlength)/steps))+platformlength)*factor,zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+((j)*(stairsheight/steps)));
moveto(zerox,zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+stairswidth);
lineto(zerox+platformlength*(-factor),zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+stairswidth);
IF i=platforms THEN
BEGIN
moveto(zerox+(((j-1)*((width-2*platformlength)/steps)))*factor,zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+((j)*(stairsheight/steps))+stairswidth);
lineto(zerox+(((j-1)*((width-2*platformlength)/steps))+platformlength)*factor,zeroy+((i-1)*(stairsheight+stairswidth+(stairsheight/steps)))+((j)*(stairsheight/steps))+stairswidth);
END;
END;
END;
PROCEDURE drawstairs;
BEGIN
zerox:=(pageWidth-width)/2;
{*Stift einstellen*}
penFore(65535,0,0);
penPat(-2);
IF i mod 2 = 0 THEN
BEGIN
{*gerade*}
zerox:=zerox+width-platformlength;
factor:=-1;
END
ELSE
BEGIN
{*ungerade*}
zerox:=zerox+platformlength;
factor:=1;
END;
{*Faltung unter Treppe fŸr erste Treppe*}
IF i=1 THEN
BEGIN
moveto(zerox,zeroy+((i-1)*stairsheight));
lineto(zerox+width-2*platformlength+platformlength,zeroy+((i-1)*stairsheight));
END;
FOR j:=1 TO steps+1 DO
BEGIN
drawstep;
END;
END;
PROCEDURE finalcuts;
BEGIN
{*Seitenschnitte*}
penPat(2);
penFore(0,0,65535);
zerox:=(pageWidth-width)/2;
IF factor=1 THEN
BEGIN
{*ungerade*}
moveto(zerox,zeroy+stairswidth);
lineto(zerox,pageFoldY+(platforms-1)*stairsheight+(platforms-1)*(stairsheight/steps));
moveto(zerox+width,zeroy);
lineto(zerox+width,pageFoldY+platforms*stairsheight+platforms*(stairsheight/steps));
END
ELSE
BEGIN
moveto(zerox,zeroy+stairswidth);
lineto(zerox,pageFoldY+platforms*stairsheight+platforms*(stairsheight/steps));
moveto(zerox+width,zeroy);
lineto(zerox+width,pageFoldY+(platforms-1)*(stairsheight)+(platforms-1)*(stairsheight/steps));
END;
END;
BEGIN
Units(7);
{*Variablen berechnen*}
pageWidth:=210;
pageHeight:=297;
pageFoldY:= pageHeight/2;
steps:=pinput_steps;
platforms:=pinput_platforms;
stairswidth:=pinput_stairswidth;
platformlength:=pinput_platformlength;
height:=pinput_height;
width:=pinput_width;
depth:=platforms*stairswidth;
zerox:=(pageWidth-width)/2;
zeroy:=pageFoldY-depth;
stairsheight:=height/platforms;
stepheight:=stairsheight/steps;
stairsheight:=stairsheight-stepheight;
errors;
FOR i:=1 to platforms do
BEGIN
drawstairs;
END;
finalcuts;
paper;
END;
RUN(faltkarte);TreppenlŠufeTreppenstufen pro LaufTreppebreitePodestbreite
GesamthšheTreppenlŠnge