{"format":"cadcraft-library-item","format_version":1,"uuid":"e46c546e-4755-44b8-a802-a7900702dea3","version":2,"name":"Parametric bed","kind":"furniture","category":"furniture/beds","description":"A bed in plan with a size table (twin, full, queen, king: the usual North American mattress sizes) and its own width and length. One pillow below 1200 wide, two from there up.","maker":"","model":"","ifc":{"class":"IfcFurniture","predefined":"NOTDEFINED"},"plan":{"layers":[{"name":"PB-OUTLINE","color":7},{"name":"PB-DETAIL","color":8},{"name":"PB-CENTER","color":1},{"name":"PB-TEXT","color":3}],"entities":[{"type":"poly","layer":"PB-OUTLINE","color":null,"pts":[[0,0],[1525,0],[1525,2030],[0,2030]],"closed":true},{"type":"line","layer":"PB-DETAIL","color":null,"x1":0,"y1":1430,"x2":1525,"y2":1430},{"type":"poly","layer":"PB-DETAIL","color":null,"pts":[[100,1580],[712.5,1580],[712.5,1930],[100,1930]],"closed":true},{"type":"poly","layer":"PB-DETAIL","color":null,"pts":[[812.5,1580],[1425,1580],[1425,1930],[812.5,1930]],"closed":true}]},"body":null,"params":{"width":1525,"depth":2030,"height":550,"remarks":"Parametric block: the sizes here are its starting sizes."},"dynamic":{"format":"cadcraft-parametric-block","version":1,"params":[{"name":"Width","expr":"1525","kind":"length","min":700,"max":2200,"step":5},{"name":"Length","expr":"2030","kind":"length","min":1500,"max":2300,"step":5},{"name":"Pillow","expr":"if(Width < 1200, Width - 200, (Width - 300) / 2)","kind":"length","note":"Worked out: pillow width"}],"acts":[{"t":"set","key":0,"f":{"x0":"0","y0":"0","x1":"Width","y1":"0","x2":"Width","y2":"Length","x3":"0","y3":"Length"}},{"t":"set","key":1,"f":{"x2":"Width","y1":"Length - 600","y2":"Length - 600"}},{"t":"set","key":2,"f":{"x0":"100","y0":"Length - 450","x1":"100 + Pillow","y1":"Length - 450","x2":"100 + Pillow","y2":"Length - 100","x3":"100","y3":"Length - 100"}},{"t":"set","key":3,"f":{"x0":"200 + Pillow","y0":"Length - 450","x1":"200 + 2 * Pillow","y1":"Length - 450","x2":"200 + 2 * Pillow","y2":"Length - 100","x3":"200 + Pillow","y3":"Length - 100"}},{"t":"show","keys":[3],"when":"Width >= 1200"}],"grips":[{"t":"list","name":"Size","table":"Size","x":"Width / 2","y":"Length / 2"},{"t":"linear","name":"Width","param":"Width","x":"Width","y":"Length / 2","ax":1,"ay":0},{"t":"linear","name":"Length","param":"Length","x":"Width / 2","y":"Length","ax":0,"ay":1}],"tables":[{"name":"Size","cols":["Width","Length"],"rows":[{"name":"Twin","vals":["990","1905"]},{"name":"Full","vals":["1370","1905"]},{"name":"Queen","vals":["1525","2030"]},{"name":"King","vals":["1930","2030"]}]}]},"source_attrs":{},"license":{"id":"CC0-1.0","holder":"CadCraft","attribution":"“Parametric bed” by CadCraft, CC0 (https://creativecommons.org/publicdomain/zero/1.0/)","url":"https://creativecommons.org/publicdomain/zero/1.0/"},"provenance":{"library":"librarycraft","item":"e46c546e-4755-44b8-a802-a7900702dea3","version":2,"sha256":"ec108a0c0b3195ee2086621a5094346992b5b043f44891c7afec8740813f6689","source_file":"bed.item.json","source_sha256":"ad978702d6918790b09bdf1b78b211f080f33ed9691c29fd2710c899aec6670e","published_at":"2026-11-24T22:41:37Z"}}