(OfficeLayout.jam) =
constants
(architectScale) .5 .def
(width) 103.75 .def
(depth) 151.75 .def
(postWidth) 8 .def
(postDepth) 20.75 .def
(doorSize) 36 .def
(wallSize) 4.5 .def
(narrowLine) 1 .def
(mediumLine) 2 .def
(wideLine) 3 .def
utilities
(goX) {scale 0 .translate} .cvx .def
(goY) {scale 0 .exch .translate} .cvx .def
(goXY) {scale .exch scale .exch .translate} .cvx .def
(scale) {architectScale .mul 72 .mul 12 .div} .cvx .def
(unscale) {architectScale .div 72 .div 12 .mul} .cvx .def
(Hline) {scale 0 0 .moveto 0 .lineto .maskstroke} .cvx .def
(HlineN) {{.dup Hline wallSize goY Hline} .cvx .dosave} .cvx .def
(HlineS) {{.dup Hline wallSize .neg goY Hline} .cvx .dosave} .cvx .def
(Vline) {scale 0 0 .moveto 0 .exch .lineto .maskstroke} .cvx .def
(VlineW) {{.dup Vline wallSize .neg goX Vline} .cvx .dosave} .cvx .def
(VlineE) {{.dup Vline wallSize goX Vline} .cvx .dosave} .cvx .def
(NEcorner) {{wallSize wallSize goXY wallSize .neg Hline wallSize .neg Vline} .cvx .dosave} .cvx .def
(NWcorner) {{wallSize .neg wallSize goXY wallSize Hline wallSize .neg Vline} .cvx .dosave} .cvx .def
(SEcorner) {{wallSize wallSize .neg goXY wallSize .neg Hline wallSize Vline} .cvx .dosave} .cvx .def
(SWcorner) {{wallSize .neg wallSize .neg goXY wallSize Hline wallSize Vline} .cvx .dosave} .cvx .def
(centeredShow) ( 0 0 .setxy (theText) .exch .store -0.5 1 .scale .true .setnoimage theText .show -2 1 .scale .false .setnoimage theText .show).cvx .def
(set-font){(xerox/pressfonts/helvetica-mrr) .exch 0 .nsrsetfont}.cvx .def
(sline) {{
.dup 120 .rotate 0 0 .moveto 0 .exch .lineto 0 .exch .dup 4 .add 0 .exch .arcto .maskstroke
}.cvx .dosave }.cvx .def
(label) {{
12 set-font
goXY
-150 .rotate 0 0 .moveto -40 0 .lineto .maskstroke -40 0 .translate 150 .rotate
2 0 .setxy .show
}.cvx .dosave }.cvx .def
(measure) {
.touch .touch in-inches} .cvx .def
(whereis) {
.touch 60 60 in-inches} .cvx .def
(here) {.touch 60 .sub unscale .exch 60 .sub unscale .exch} .cvx .def
(in-inches) {
(startY) .exch .store (startX) .exch .store
.exch startX .sub unscale (dX=) = =
startY .sub unscale (dY=) = =} .cvx .def
(outline) {{
mediumLine .setstrokewidth
width doorSize .sub 2 .sub .dup HlineS
.dup goX wallSize .neg Vline .neg goX
depth VlineW SWcorner
depth goY
width postWidth .sub HlineN NWcorner
width depth .neg goXY
-2 goX wallSize .neg Vline 2 HlineS 2 goX
depth postDepth .sub VlineE SEcorner
depth postDepth .sub goY -8 goX 16 Hline postDepth 6 .add .dup Vline goY 16 Hline
} .cvx .dosave } .cvx .def
(door) {{
mediumLine .setstrokewidth
width 2 .sub goX -1.75 Hline doorSize Vline -1.75 doorSize goXY 1.75 Hline -36 Vline
narrowLine .setstrokewidth
1.75 doorSize .neg goXY
doorSize scale .neg 0 .moveto
doorSize scale .5 .sqrt .mul .dup .neg .exch 0 doorSize scale .arcto .maskstroke
}.cvx .dosave}.cvx .def
(windows) {{
narrowLine .setstrokewidth
2 goX wallSize .neg Vline
width doorSize .sub 6 .sub .dup goX .dup
wallSize .neg Vline .dup .neg goX
wallSize 2 .div .dup .neg goY .exch Hline goY
depth goY wallSize Vline
width postWidth .sub 4 .sub .dup goX
wallSize Vline wallSize 2 .div goY .neg Hline
}.cvx .dosave}.cvx .def
(whiteboard) {{
wideLine .setstrokewidth
width depth goXY
postDepth 2 .add .neg goY
-.5 goX .5 Hline -60.5 .dup Vline goY .5 Hline
}.cvx .dosave}.cvx .def
(shelves) {{
narrowLine .setstrokewidth
1 goY
12 Hline 12 goX depth 2 .sub .dup Vline goY -12 Hline
}.cvx .dosave}.cvx .def
(bulletinboard) {{
wideLine .setstrokewidth
width depth goXY
postDepth 64 .add .neg goY
-.5 goX .5 Hline -36.5 .dup Vline goY .5 Hline
}.cvx .dosave}.cvx .def
(furniture) {{
narrowLine .setstrokewidth
32 150 HTable60
1 150 VTable60
1 89 VTable45
82 100 VCredenza
}.cvx .dosave}.cvx .def
(LabeledBox) {{
(bh) .exch .store (bw) .exch .store
bw Hline bh .neg Vline bw bh .neg goXY bw .neg Hline bh Vline
bw 2 .div .neg bh 2 .div goXY 12 set-font .rotate centeredShow
}.cvx .dosave}.cvx .def
(HTable60) {{
goXY
(30 x 60 Table) 0 60 30 LabeledBox
}.cvx .dosave}.cvx .def
(VTable60) {{
goXY
(30 x 60 Table) 90 30 60 LabeledBox
}.cvx .dosave}.cvx .def
(VTable45) {{
goXY
(30 x 45 Table) 90 30 45 LabeledBox
}.cvx .dosave}.cvx .def
(VCredenza) {{
goXY
(Credenza) 90 20 62 LabeledBox
}.cvx .dosave}.cvx .def
(office) {{
60 60 .translate
outline
door
windows
whiteboard
shelves
bulletinboard
furniture
(60 in whiteboard) 104 104 label
(36 in bulletin board) 104 63 label
(4 shelves, bottom 45 in off floor) 6 20 label
}.cvx .dosave}.cvx .def
(redo) {.erase (OfficeLayout).run office} .cvx .def
(h-office) {(officelayout.pd) .openhornetpd .true .setpriorityimportant office .closepd}.cvx .def