|
| MAS ETH ARCH/CAAD - 2005/06 - STUDENT PAGES Master of Advanced Studies in Architecture, Specialization in Computer Aided Architectural Design | 065-0005/6 Supervision: Prof. Dr. Ludger Hovestadt, Philipp Schaerer Chair of CAAD, ETH Zurich _______________________________________________________________________________________________________________________________ layout plugin :graphical output
______________________________________________________________________________________________________________________________ Object Info box :modifiable parameters
_______________________________________________________________________________________________________________________________ vectorscript :first plugin Procedure firstplugin; VAR i,k : INTEGER; r,g,b : LONGINT; patNumber: LONGINT; cX1, cY1, cX2, cY2: REAL; STARTx, STARTy: REAL; rectLengthblock1, rectWidthblock1: REAL; rectLengthblock2, rectWidthblock2: REAL; tablelengthmax, tablelengthmin, tablelength: REAL; tablewidthmax, tablewidthmin, tablewidth: REAL; gapwallmax, gapwallmin, gapwall: REAL; Xgapmax, Xgapmin, gapX: REAL; Ygapmax, Ygapmin, gapY: REAL; Ymaxunits, Xmaxunits: INTEGER; BEGIN; {Choose Colors,Hatch} ColorIndexToRGB(255,r,g,b); PenFore (r,g,b); FillPat (0); {Draw outline space} rectLengthblock1:=IntDialog('gebe die Längsseite des Raumes ein','0'); rectWidthblock1:=IntDialog('gebe die Querseite des Raumes ein','0'); cX1:=0; cY1:=0; Rect (cX1,cY1,rectLengthblock1,rectWidthblock1); DSelectAll; BEGIN; {Draw outline with gapwall} ColorIndexToRGB(0,r,g,b); PenFore (r,g,b); FillPat (0); gapwallmax:=IntDialog('gebe max Abstand von der Wand ein','0'); gapwallmin:=IntDialog('gebe min Abstand von der Wand ein','0'); gapwall:=gapwallmin+Random*(gapwallmax-gapwallmin); rectLengthblock2:=rectLengthblock1-2*gapwall; rectWidthblock2:=rectWidthblock1-2*gapwall; cX2:=cX1+gapwall; cY2:=cY1+gapwall; Rect (cX2,cY2,rectLengthblock2+gapwall,rectWidthblock2+gapwall); DSelectAll; BEGIN; {ask parameters for tables} tablelengthmax:=IntDialog('max Längsseite des Tisches ein','0'); tablelengthmin:=IntDialog('min Längsseite des Tisches ein','0'); tablelength:=tablelengthmin + Random*(tablelengthmax-tablelengthmin); tablewidthmax:=IntDialog('max Tiefe des Tisches ein','0'); tablewidthmin:=IntDialog('min Tiefe des Tisches ein','0'); tablewidth:=tablewidthmin+Random*(tablewidthmax-tablewidthmin); {ask for gap x axis} Xgapmax:=IntDialog('max Abstand zu den Tischen x-achse','0'); Xgapmin:=IntDialog('min Abstand zu den Tischen x-achse','0'); gapX:=Xgapmin +Random*(Xgapmax-Xgapmin); {ask for gap y axis} Ygapmax:=IntDialog('max Abstand zu den Tischen y-achse','0'); Ygapmin:=IntDialog('min Abstand zu den Tischen y-achse','0'); gapY:=Ygapmin +Random*(Ygapmax-Ygapmin); Xmaxunits:=Trunc(rectLengthblock2/(tablelength+gapX)); Ymaxunits:=Trunc(rectWidthblock2/(tablewidth+gapY)); {draw tables in floorplan} ColorIndexToRGB(255,r,g,b); PenFore (r,g,b); FillPat (0); For i:= 0 TO Xmaxunits DO BEGIN For k:= 0 TO Ymaxunits DO BEGIN startX := i*(tableLength + gapX); startY := k*(tableWidth + gapY); Rect(startX,startY,startX + tableLength,startY + tableWidth); Group; END; END; MoveObjs(cX2,cY2,FALSE,FALSE); END; END; END; _______________________________________________________________________________________________________________________________ -- NDSMonikaAnnen - 17 Nov 2005
|
This website has been archived and is no longer maintained.