{"units":"mm","rules":["All sizes are millimetres. Z is up; the floor is z = 0. X is left-right, Y is front-back.","Each part has a \"type\" plus its size parameters written straight on the part (for example {\"type\":\"box\",\"w\":40,\"d\":20,\"h\":10}). Missing parameters use the defaults.","\"at\": [x, y] puts the centre of the part there and rests it on the floor. \"at\": [x, y, z] puts the centre of the part at that exact point (use this to stack parts or float them).","\"rotate\": [rx, ry, rz] turns the part in degrees about X, then Y, then Z, before it is placed. Cylinders, cones and tubes stand along Z; rotate [90,0,0] lays them along Y, [0,90,0] along X.","\"op\": \"add\" (default) adds a part. \"cut\" removes this shape from every earlier part (or only from the one named in \"target\"). \"intersect\" keeps only the overlap. Parts are processed in order.","\"reshape\": [{\"kind\":\"twist\",\"amount\":90}] twists (degrees over the height), \"taper\" scales the top (0.05-3, 1 = unchanged), \"bend\" bends over (degrees, -180 to 180), \"bulge\" swells the middle (-0.9 to 2).","\"round_edges\": 2 rounds every edge of a simple part by 2 mm. \"hollow\": {\"wall\":2,\"open\":true} makes a cup. Both only work on low-detail parts (boxes, plates, prisms, low quality cylinders).","\"color\" is a hex colour like \"#ff8800\" or a name (red, orange, yellow, green, blue, purple, pink, brown, black, white, grey, cyan, teal, gold, silver). \"name\" labels the part.","Top level: \"name\", \"join\": true to merge everything into one printable solid, \"quality\": \"low\" | \"medium\" | \"high\" (roundness), \"formats\": any of stl, glb, 3mf, obj (default all).","STL, 3MF and OBJ are written in mm, Z up. GLB is written in metres, Y up (the glTF standard) unless \"glb_units\": \"mm\".","\"scale\": 1.5 or [sx, sy, sz] stretches a part (a sphere with scale [1,1,0.5] is a flattened ball). \"mirror\": \"x\" adds a mirrored twin across the plane x = 0 (also \"y\", \"z\", or \"xy\" for four copies).","\"repeat\": {\"count\": 6} makes 6 copies evenly round the Z axis through the origin (place the first one off-centre with \"at\"); add \"angle\": 180 to spread them over part of a circle. \"repeat\": {\"count\": 4, \"step\": [20, 0, 0]} makes a straight row. Mirror and repeat also work on cut parts (bolt circles, rows of slots).","Type \"text\" makes raised stroke lettering (capitals, digits and - . ! + / :): {\"type\":\"text\",\"text\":\"MAX\",\"size\":12,\"h\":2,\"at\":[0,0,5]}. Sit it on a surface, or use \"op\":\"cut\" to engrave. Letters lie flat reading along +X; rotate [90,0,0] stands them upright facing the front.","Type \"hull\" wraps a smooth skin round several parts: {\"type\":\"hull\",\"of\":[{\"type\":\"sphere\",\"d\":30,\"at\":[0,0,15]},{\"type\":\"sphere\",\"d\":12,\"at\":[40,0,6]}]} gives a teardrop body. Use it for organic, blended or tapered shapes.","The picture returned by build_model has four views: top-left three-quarter view, top-right front (camera on -Y looking along +Y, X to the right), bottom-left right side (camera on +X, Y to the right), bottom-right top (X right, Y up). Check all four before telling the user it is done.","Limits: 60 parts, 2000 mm per size, 400 000 triangles, 30 s per build."],"part_types":[{"type":"box","label":"Box","params":{"w":{"meaning":"Width","unit":"mm","default":20},"d":{"meaning":"Depth","unit":"mm","default":20},"h":{"meaning":"Height","unit":"mm","default":20},"round":{"meaning":"Round edges","unit":"mm","default":0},"bevel":{"meaning":"Bevel edges","unit":"mm","default":0}}},{"type":"cylinder","label":"Cylinder","params":{"d":{"meaning":"Diameter","unit":"mm","default":20},"h":{"meaning":"Height","unit":"mm","default":20},"round":{"meaning":"Round edges","unit":"mm","default":0}}},{"type":"sphere","label":"Ball","params":{"d":{"meaning":"Diameter","unit":"mm","default":20}}},{"type":"cone","label":"Cone","params":{"d":{"meaning":"Base diameter","unit":"mm","default":20},"top":{"meaning":"Top diameter","unit":"mm","default":0},"h":{"meaning":"Height","unit":"mm","default":25}}},{"type":"torus","label":"Ring","params":{"d":{"meaning":"Outside diameter","unit":"mm","default":30},"t":{"meaning":"Thickness","unit":"mm","default":8}}},{"type":"wedge","label":"Ramp","params":{"w":{"meaning":"Length","unit":"mm","default":30},"d":{"meaning":"Depth","unit":"mm","default":20},"h":{"meaning":"Height","unit":"mm","default":15}}},{"type":"tube","label":"Tube","params":{"d":{"meaning":"Outside diameter","unit":"mm","default":20},"wall":{"meaning":"Wall","unit":"mm","default":2},"h":{"meaning":"Height","unit":"mm","default":25}}},{"type":"plate","label":"Plate","params":{"w":{"meaning":"Width","unit":"mm","default":60},"d":{"meaning":"Depth","unit":"mm","default":40},"h":{"meaning":"Thickness","unit":"mm","default":3},"round":{"meaning":"Corner radius","unit":"mm","default":4}}},{"type":"pyramid","label":"Pyramid","params":{"sides":{"meaning":"Sides","unit":"count","default":4},"d":{"meaning":"Base size","unit":"mm","default":24},"h":{"meaning":"Height","unit":"mm","default":20}}},{"type":"prism","label":"Prism","params":{"sides":{"meaning":"Sides","unit":"count","default":6},"d":{"meaning":"Size","unit":"mm","default":24},"h":{"meaning":"Height","unit":"mm","default":15}}},{"type":"dome","label":"Dome","params":{"d":{"meaning":"Diameter","unit":"mm","default":24}}},{"type":"capsule","label":"Capsule","params":{"d":{"meaning":"Diameter","unit":"mm","default":12},"h":{"meaning":"Height","unit":"mm","default":30}}},{"type":"star","label":"Star","params":{"points":{"meaning":"Points","unit":"count","default":5},"d":{"meaning":"Size","unit":"mm","default":30},"inner":{"meaning":"Pointiness","unit":"ratio 0.15-0.95","default":0.45},"h":{"meaning":"Thickness","unit":"mm","default":5}}},{"type":"heart","label":"Heart","params":{"w":{"meaning":"Width","unit":"mm","default":30},"h":{"meaning":"Thickness","unit":"mm","default":5}}},{"type":"gear","label":"Gear","params":{"teeth":{"meaning":"Teeth","unit":"count","default":12},"d":{"meaning":"Diameter","unit":"mm","default":36},"h":{"meaning":"Thickness","unit":"mm","default":6},"hole":{"meaning":"Hole","unit":"mm","default":6}}},{"type":"arch","label":"Arch","params":{"w":{"meaning":"Width","unit":"mm","default":40},"d":{"meaning":"Depth","unit":"mm","default":10},"h":{"meaning":"Height","unit":"mm","default":35},"t":{"meaning":"Thickness","unit":"mm","default":6}}},{"type":"stairs","label":"Stairs","params":{"w":{"meaning":"Width","unit":"mm","default":20},"d":{"meaning":"Length","unit":"mm","default":40},"h":{"meaning":"Height","unit":"mm","default":20},"steps":{"meaning":"Steps","unit":"count","default":5}}},{"type":"extrude","label":"Flat outline pulled up","params":{"points":{"meaning":"Outline as [[x,y],...] in mm, at least 3 points, not self-crossing","default":null},"holes":{"meaning":"Optional list of hole outlines, each [[x,y],...]","default":[]},"h":{"meaning":"Height","unit":"mm","default":10},"twist":{"meaning":"Twist over the height","unit":"degrees","default":0},"taper":{"meaning":"Top scale, 1 = straight, 0 = point","unit":"ratio 0-4","default":1},"round":{"meaning":"Round the outline corners","unit":"mm","default":0}}},{"type":"text","label":"Raised lettering (single-line stroke letters: A-Z, 0-9 and - . ! + / :)","params":{"text":{"meaning":"The words, up to 40 characters; lower case is drawn as capitals","default":"HI"},"size":{"meaning":"Letter height","unit":"mm","default":10},"h":{"meaning":"Thickness (how far the letters stand up)","unit":"mm","default":2},"weight":{"meaning":"Stroke width; default is 14% of the letter height","unit":"mm","default":null}}},{"type":"hull","label":"Smooth skin stretched around several parts (for blended, organic or tapered bodies)","params":{"of":{"meaning":"List of ordinary parts (each with type, sizes, at, rotate). The result is the tightest convex shape that wraps them all, placed where they are.","default":null}}},{"type":"revolve","label":"Profile spun around the Z axis (vase, wheel, knob)","params":{"points":{"meaning":"Half profile as [[radius,height],...] in mm, radius >= 0","default":null},"deg":{"meaning":"Sweep angle","unit":"degrees","default":360}}}],"example":{"name":"Mug","join":true,"parts":[{"type":"cylinder","d":80,"h":95,"name":"body"},{"type":"cylinder","d":72,"h":95,"at":[0,0,51.5],"op":"cut"},{"type":"torus","d":60,"t":10,"rotate":[90,0,0],"at":[44,0,48]},{"type":"cylinder","d":71,"h":90,"at":[0,0,50],"op":"cut"}]},"more_examples":[{"name":"Name plate","parts":[{"type":"plate","w":70,"d":24,"h":3,"round":4,"color":"blue","name":"plate"},{"type":"text","text":"MAX","size":12,"h":1.5,"at":[0,0,3.75],"color":"white"},{"type":"cylinder","d":4,"h":10,"at":[30,0,1.5],"op":"cut","target":"plate","mirror":"x"}]},{"name":"Wheel","join":true,"parts":[{"type":"revolve","points":[[4,0],[30,0],[32,2],[32,10],[30,12],[4,12]],"name":"wheel"},{"type":"cylinder","d":10,"h":14,"at":[18,0,6],"op":"cut","repeat":{"count":5}}]},{"name":"Toy fish","parts":[{"type":"hull","color":"orange","name":"body","of":[{"type":"sphere","d":30,"scale":[1,0.6,1],"at":[0,0,20]},{"type":"sphere","d":8,"at":[38,0,20]}]},{"type":"extrude","points":[[0,0],[16,12],[16,-12]],"h":3,"rotate":[90,0,0],"at":[46,0,20],"color":"orange"},{"type":"sphere","d":5,"at":[-9,8,24],"color":"black","mirror":"y"}]}]}