@rulecad/cad 0.7.57 → 0.7.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +48 -3
- package/CHANGELOG.md +200 -0
- package/EXAMPLES.md +421 -3
- package/README.md +391 -11
- package/bin/cad.mjs +102 -20
- package/lib/assembly.mjs +15 -2
- package/lib/beams.mjs +44 -11
- package/lib/buildpage.mjs +1 -1
- package/lib/fasten.mjs +31 -9
- package/lib/fittings.mjs +50 -8
- package/lib/framebuild.mjs +62 -6
- package/lib/framecheck.mjs +831 -0
- package/lib/framegen.mjs +111 -0
- package/lib/frameheat.mjs +94 -0
- package/lib/frameprint.mjs +277 -0
- package/lib/frames.mjs +2 -1
- package/lib/framesize.mjs +261 -0
- package/lib/jigs.mjs +18 -15
- package/lib/joins.mjs +7 -3
- package/lib/kit.mjs +190 -0
- package/lib/links.mjs +11 -3
- package/lib/list.mjs +6 -2
- package/lib/loads.mjs +3 -2
- package/lib/measured.mjs +24 -2
- package/lib/optimise.mjs +18 -3
- package/lib/order.mjs +10 -4
- package/lib/panels.mjs +1 -1
- package/lib/plates.mjs +31 -17
- package/lib/sheet.mjs +15 -1
- package/lib/task.mjs +39 -1
- package/package.json +5 -5
- package/schemas/assembly.schema.json +8 -5
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "rulecad assembly",
|
|
5
5
|
"description": "Objects placed together: a fit check (fits between them, joints and poses) or a plate (everything printed at once).",
|
|
6
6
|
"type": "object",
|
|
7
|
-
"required": ["items"],
|
|
7
|
+
"anyOf": [{ "required": ["items"] }, { "required": ["frame"], "properties": { "frame": { "required": ["kind"] } } }],
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
10
|
"$schema": { "type": "string" },
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"description": { "type": "string" },
|
|
13
13
|
"note": { "type": "string" },
|
|
14
14
|
"kind": { "enum": ["fit", "plate"] },
|
|
15
|
-
"packed": { "type": "object", "description": "Written by cad plates: which assembly this plate is for, its filament and gap, and each part's build hash, so a changed part re-packs only its plate", "required": ["of", "filament", "gap", "parts"], "additionalProperties": false, "properties": { "of": { "type": "string" }, "filament": { "type": "string" }, "gap": { "type": "number" }, "parts": { "type": "object" } } },
|
|
15
|
+
"packed": { "type": "object", "description": "Written by cad plates: which assembly this plate is for, its filament, its material (each plate is one plastic: the project's, or a printed beam's own) and gap, and each part's build hash, so a changed part re-packs only its plate", "required": ["of", "filament", "gap", "parts"], "additionalProperties": false, "properties": { "of": { "type": "string" }, "filament": { "type": "string" }, "material": { "type": "string" }, "gap": { "type": "number" }, "parts": { "type": "object" } } },
|
|
16
16
|
"uses": { "type": "array", "items": { "type": "string" } },
|
|
17
17
|
"requires": { "type": "object", "additionalProperties": { "type": "string" }, "description": "object → semver range" },
|
|
18
18
|
"items": { "type": "array", "items": { "$ref": "#/$defs/item" } },
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"power": { "type": "object", "additionalProperties": false, "properties": { "margin": { "type": "number" } } },
|
|
29
29
|
"wires": { "type": "array", "description": "Wires between anchors, their length measured through every pose", "items": { "type": "object", "required": ["from", "to"], "additionalProperties": false, "properties": { "id": { "type": "string" }, "from": { "type": "string" }, "to": { "type": "string" }, "via": { "type": "array", "items": { "anyOf": [{ "type": "string" }, { "type": "object", "required": ["along", "from", "to"], "additionalProperties": false, "description": "A run along a beam's slot: the wire follows the slot from one distance to another, held by printed cable clips at a pitch", "properties": { "along": { "type": "string", "description": "A beam's slotted face: rail.top" }, "from": { "$ref": "#/$defs/expr", "description": "mm from the beam's end a" }, "to": { "$ref": "#/$defs/expr" }, "pitch": { "$ref": "#/$defs/expr", "description": "The most between clips, mm (default 100)" }, "cable": { "$ref": "#/$defs/expr", "description": "The bundle the clips hold, mm (default 6)" } } }] }, "description": "Anchors, path joints or runs along a slot that the wire is routed by" }, "gauge": { "type": "string", "description": "awg22" }, "colour": { "type": "string" }, "conductors": { "type": "number" }, "connectors": { "type": "array", "items": { "type": "string" } }, "current": { "type": "number", "description": "A: else a motor's rated current at either end, or a signal's" }, "note": { "type": "string" } } } },
|
|
30
30
|
"gravity": { "$ref": "#/$defs/vec3", "description": "Which way down is, for masses in loads (default [0, 0, -1])" },
|
|
31
|
+
"frame": { "type": "object", "additionalProperties": false, "description": "The frame: what it is (a generator, kind with inside or outside, which expands into beams, joins and their ends before anything is built, as cad frame --expand writes out), and how its beams and joins are solved for frame.deflection, frame.stress, frame.buckling, frame.rack and frame.frequency, which beams could be printed (beam.printable), and how it is cut and heated for frame.square and frame.heat. Left out, it stands on its feet: the beam ends that carry a foot, a levelling foot, a castor plate or a stacking foot, or else the lowest beam ends, each held from moving (pinned)", "properties": {"kind": {"enum": ["box", "portal", "table", "gantry", "shelf"], "description": "A frame generated from a size: box (four posts and a ring of beams at the bottom and top), portal (two legs and a beam across: inside and outside are [width, height]; it lies in one plane and tips over on its feet alone, so it is refused until supports says its feet are held down, as z1.a and z2.a fixed), table (four legs and a ring at the top), gantry (a box without its top beams across, and a beam riding along the two top side beams on a sliding joint) or shelf (a box with rings between, shelves of them). Its beams are z1 .. (upright), x1 .. and y1 .. (along x and y, by ring from the bottom), g (a gantry's moving beam); its corner arrangement follows the join"}, "inside": {"type": "array", "minItems": 2, "maxItems": 3, "items": {"$ref": "#/$defs/expr"}, "description": "The clear volume the frame encloses, [width (x), depth (y), height (z)] in mm (a portal: [width, height]); the beams go round it. Give inside or outside"}, "outside": {"type": "array", "minItems": 2, "maxItems": 3, "items": {"$ref": "#/$defs/expr"}, "description": "The volume the whole frame must fit in, [width, depth, height] in mm (a portal: [width, height]); the beams go within it"}, "profile": {"type": "string", "description": "Every beam's profile, a square one (2020-misumi-hfs5, 3030-generic, 4040-item-8)"}, "join": {"description": "How the beams meet at each corner: a kind (blind, end-tap, bracket, gusset, hidden, anchor: the upright beams run through and the others butt against their faces, each shorter by the profile's width at each end; cube: every beam butts into a corner node, each as long as the inside), or { kind, fitting, screw } as a join takes them", "oneOf": [{"type": "string"},{"type": "object", "additionalProperties": false, "required": ["kind"], "properties": {"kind": {"type": "string"}, "fitting": {"type": "string"}, "screw": {"type": "string"}}}]}, "feet": {"type": ["string", "null"], "description": "What stands under the upright beams' lower ends: foot, levelling, castor or stacking (printed), or a bought foot's set by name (fitting-motedis-foot-m6-d19); left out, an end cap"}, "caps": {"type": ["string", "boolean"], "description": "The ends no join covers: printed end caps (true, the default), a bought end cap's set by name, or false for none (join.end then names them)"}, "braces": {"type": "array", "items": {"enum": ["front", "back", "left", "right"]}, "description": "The upright sides whose corners are stiffened against racking: each join in that side becomes a bracket join with a printed corner bracket in the corner, on drop-in nuts"}, "panels": {"type": "object", "additionalProperties": false, "required": ["sheet", "thickness"], "description": "Panels closing the upright sides, each cut to its bay with its clips (a box, a shelf, a gantry's two sides)", "properties": {"sheet": {"type": "string", "description": "The sheet's material: acrylic, polycarbonate, aluminium, plywood, mdf"}, "thickness": {"$ref": "#/$defs/expr", "description": "mm"}, "sides": {"type": "array", "items": {"enum": ["front", "back", "left", "right"]}, "description": "Which sides (default every side that has a bay)"}}}, "shelves": {"type": "integer", "minimum": 1, "maximum": 20, "description": "A shelf: how many rings stand between the bottom and the top, spacing its height into equal clear bays (default 1)"}, "supports": {"type": "object", "description": "Where the frame is held, by beam end (\"z1.a\") or a place on a beam (\"x1.bottom@50%\"): pinned holds it from moving and lets it turn, fixed holds it from turning too, resting holds it from moving and from twisting about the beam's own length (a beam lying across a round bar, as the beam coupon does; for a beam along x, y or z). Given, these are the only supports", "additionalProperties": {"enum": ["pinned", "fixed", "resting"]}}, "limit": {"$ref": "#/$defs/expr", "description": "The sag allowed in every frame.deflection finding, in mm: at each load's point, each named point and along each guide whose rail gives no parallelism of its own (default: the task's accuracy, else the span of the beam it is on over 360)"}, "points": {"type": "array", "description": "Places on beams to report the sag at, beside each load's point and every guide (\"x1.top@50%\")", "items": {"type": "string"}}, "cut": {"type": "object", "additionalProperties": false, "description": "How the beams are cut in this workshop, where it differs from the profile's set and the kit's defaults: frame.square, frame.cut and the cut list read it", "properties": {"tolerance": {"$ref": "#/$defs/expr", "description": "How far a cut length may be from the length asked, either way, in mm (default: the profile's cut_tolerance, else 0.5)"}}}, "heat": {"type": "object", "additionalProperties": false, "description": "frame.heat: the temperatures the frame works at. The beams grow with the air in the enclosure; each printed fitting is held to its plastic's softening point", "properties": {"air": {"$ref": "#/$defs/expr", "description": "The air round the frame when it runs, in degrees C (inside its enclosure)"}, "built": {"$ref": "#/$defs/expr", "description": "The air it was built and squared in, in degrees C (default 20)"}, "heaters": {"type": "array", "description": "Hot things near the frame: what is within reach of one is taken at its temperature", "items": {"type": "object", "required": ["at", "temperature", "reach"], "additionalProperties": false, "properties": {"name": {"type": "string"}, "at": {"$ref": "#/$defs/vec3", "description": "Its middle, in the assembly's frame, mm"}, "temperature": {"$ref": "#/$defs/expr", "description": "Degrees C at its surface"}, "reach": {"$ref": "#/$defs/expr", "description": "How far from its middle a part is taken at that temperature, mm"}}}}}}, "printed": {"description": "beam.printable: each beam tried printed in this plastic (the kit's printable profile of its size, lying down or standing up), the frame solved again and held to its own limits: its sags, stress, buckling, creep and lowest mode; the beams that can be printed are listed, and printed together solved once more. A plastic's set by name (\"petg\"), or how it prints", "oneOf": [{"type": "string"},{"type": "object", "additionalProperties": false, "required": ["material"], "properties": {"material": {"type": "string", "description": "The plastic's set: pla, petg"}, "walls": {"type": "integer", "minimum": 1, "description": "Walls round every outline, in lines (3)"}, "infill": {"type": "number", "minimum": 0, "maximum": 1, "description": "The share of the inside the infill fills (0.4)"}, "pose": {"enum": ["lying", "standing"], "description": "Only this way up (both are tried where left out)"}}}]}, "size": {"type": "object", "additionalProperties": false, "description": "frame.size: each group of beams that must match given the lightest profile from a list that meets the frame's own limits (the sag at each load, point and guide, each beam's stress and buckling with frame.margin to spare, and the lowest mode against the task's moves), solved in every pose; a table of each group's profile, the limit that set it and its margin, and cad frame --size --write writes the profiles in", "properties": {"profiles": {"type": "array", "minItems": 1, "items": {"type": "string"}, "description": "The profiles to choose from, by set (default MISUMI's HFS5, HFS6 and HFS8 series from 2020 to 4080). One that is not square is tried lying as drawn and turned a quarter. Choose one family whose joins fit each other: the join checks of the written frame say where they do not"}, "groups": {"type": "object", "description": "Beams that must take one profile, by group name (\"rails\": [\"x1\", \"x2\"]); the rest are grouped by themselves: one profile, one direction, lengths within 0.5 mm", "additionalProperties": {"type": "array", "minItems": 1, "items": {"type": "string"}}}, "limits": {"type": "object", "additionalProperties": false, "description": "Limits in place of the frame checks' own", "properties": {"deflection": {"$ref": "#/$defs/expr", "description": "The sag allowed at every load, named point and guide, mm"}, "stress": {"$ref": "#/$defs/expr", "description": "How many times under its alloy's strength each beam stays (default frame.margin, 2)"}, "buckling": {"$ref": "#/$defs/expr", "description": "How many times its load the frame, and each grouped beam by Euler's load, must carry before it buckles (default frame.margin, 2)"}, "frequency": {"$ref": "#/$defs/expr", "description": "The lowest mode's floor, Hz (default twice what the task's moves shake it at; none without a task)"}}}, "by": {"enum": ["mass", "cost"], "description": "What is made least (mass: no profile set in the kit gives a price per metre yet)"}}}, "rack": {"type": "object", "additionalProperties": false, "description": "frame.rack: the side push at the frame's top and the sway allowed", "properties": {"load": {"$ref": "#/$defs/expr", "description": "The side push in N, shared among the top corners (default 20, an estimate)"}, "limit": {"$ref": "#/$defs/expr", "description": "The sway allowed at the top, in mm (default: the task's accuracy, else the height over 400)"}}}} },
|
|
31
32
|
"loads": { "type": "array", "description": "What the assembly has to do: a torque (N m) or force (N) on a joint, or a mass (kg) carried at an anchor", "items": { "type": "object", "additionalProperties": false, "properties": { "joint": { "type": "string" }, "torque": { "$ref": "#/$defs/expr" }, "force": { "$ref": "#/$defs/expr" }, "mass": { "$ref": "#/$defs/expr" }, "at": { "$ref": "#/$defs/anchorRef" }, "note": { "type": "string" } } } },
|
|
32
33
|
"poses": { "type": "object", "description": "Named sets of joint values ({ \"hinge\": 90 }), and of items' variables (\"action.travel\": 25: a flexure drawn bent in that pose, printed as drawn)", "additionalProperties": { "type": "object", "additionalProperties": { "$ref": "#/$defs/values" } } },
|
|
33
34
|
"pose": { "type": "string" }
|
|
@@ -49,10 +50,10 @@
|
|
|
49
50
|
"bought": { "type": "string", "description": "A part from a rule set (\"608\", \"drv8825\", \"fitting-motedis-end-cap-20-b6\"): bought, not printed; drawn faint from its figures, with anchors from what it is. A frame's bought fitting (an end cap, a levelling foot, a hinge) placed at a beam's address is checked against that beam's profile, and its price goes on cad list" },
|
|
50
51
|
"variant": { "type": "string" },
|
|
51
52
|
"set": { "type": "object" },
|
|
52
|
-
"fitting": { "type": "object", "required": ["kind"], "additionalProperties": false, "description": "A printed fitting from @rulecad/frames, drawn from a profile's and its slot nuts' rules and sized from a named load (a join with \"fitting\": \"printed\" adds one for itself; a panel adds its clips, a door its hinges, handle and catch). A bracket, gusset or splice is sized by finite elements; the others by beam formulas, each reporting its grams and margin. In its fitted frame: a bracket's x along b's face away from a, y up a, z across; a plate's x along b, y along a, its contact face at z = 0", "properties": { "kind": { "enum": ["bracket", "gusset", "splice", "panel-clip", "panel-corner", "slot-cover", "panel-edge", "gasket-strip", "hinge", "handle", "latch", "magnet-catch", "end-cap", "foot", "levelling-foot", "castor-plate", "stacking-foot", "device-mount", "fan-mount", "drag-chain-end", "din-rail", "cable-clip", "tie-anchor", "spool-holder", "rail-jig", "wheel-plate", "slider", "rod-holder", "rod-carriage", "motor-plate", "endstop-mount"] }, "profile": { "type": "string", "description": "The profile the base leg or the plate lies on" }, "other": { "type": "string", "description": "A bracket's: the profile its upright leg lies on, where not the same" }, "face": { "type": "string", "description": "The face of the profile it lies on (top, top.2): its slot sizes the tongue and the nut" }, "otherFace": { "type": "string" }, "shape": { "enum": ["L", "T", "cross", "splice"], "description": "A gusset's shape" }, "brace": { "type": "boolean", "description": "A bracket's brace across its inside corner" }, "load": { "type": "number", "description": "The design load in N, across beam a at the fitting's screw (default 100)" }, "count": { "type": "number", "description": "A plate's screws on each arm (default 2)" }, "thread": { "type": "string" }, "head": { "enum": ["cap", "button"] }, "part": { "type": "string", "description": "A hinge's leaf (frame, door) or a levelling foot's part (body, pad): an item each" }, "sheet": { "type": "number", "description": "The panel's or door's thickness, in mm" }, "length": { "type": "number", "description": "A strip's length, in mm" }, "standoff": { "type": "number", "description": "A latch's or catch's: the door's inner face over the beam's face (a hinge's standoff)" }, "edge": { "type": "number" }, "magnet": { "type": "array", "items": { "type": "number" } }, "stud": { "type": "string" }, "range": { "type": "number" }, "holes": { "type": "array", "items": { "type": "number" } }, "end": { "enum": ["a", "b"] }, "depth": { "type": "number" }, "grip": { "type": "number" }, "span": { "type": "number" }, "gap": { "type": "number" }, "squeeze": { "type": "number" }, "pin": { "type": "string" }, "screw": { "type": "string" }, "thickness": { "type": "number" }, "nut": { "type": "string" }, "material": { "type": "string" }, "device": { "type": "string", "description": "A device mount's: the rule set its holes are read from (supply-24v, cnc-shield-v3)" }, "variant": { "type": "string", "description": "A device mount's: the device's variant" }, "turn": { "enum": [0, 90, 180, 270], "description": "A device mount's: the device's x from the slot's line, degrees" }, "offset": { "type": "number", "description": "A device mount's: the device's middle across the slot, mm" }, "deviceHead": { "enum": ["cap", "button"] }, "size": { "type": "number", "description": "A fan mount's fan, mm: 40, 60, 80, 92 or 120" }, "side": { "enum": [1, -1] }, "flange": { "type": "number" }, "cable": { "type": "number", "description": "A cable clip's bundle, mm" }, "width": { "type": "number" }, "tie": { "type": "array", "items": { "type": "number" } }, "spool": { "type": "object" }, "rod": { "type": "string", "description": "A rod holder's or carriage's: the rods' rule set" }, "bearing": { "type": "string", "description": "A carriage's linear bearings' rule set" }, "spacing": { "type": "number" }, "height": { "type": "number" }, "leadNut": { "type": "string", "description": "A rod holder's or carriage's: the lead nut's rule set" }, "support": { "type": ["string", "null"], "description": "A rod holder's: the screw's ball bearing's rule set" }, "flag": { "type": "object", "description": "A carriage's endstop flag: where its tip reaches, { y, z }" }, "motor": { "type": "string", "description": "A motor plate's: the motor's rule set (28byj48, nema14, nema17)" }, "coupler": { "type": "object", "description": "A motor plate's: the coupler's { length, D }" }, "switch": { "type": "string", "description": "An endstop mount's: the switch's rule set" }, "toward": { "enum": [1, -1], "description": "An endstop mount's: which way across the face its lever reaches" }, "pose": { "enum": ["fit", "print"], "description": "fit (the default): in its place, as the item's at and rotate put it; print: laid as it prints, for a plate (cad plates writes it so)" } } },
|
|
53
|
+
"fitting": { "type": "object", "required": ["kind"], "additionalProperties": false, "description": "A printed fitting from @rulecad/frames, drawn from a profile's and its slot nuts' rules and sized from a named load (a join with \"fitting\": \"printed\" adds one for itself; a panel adds its clips, a door its hinges, handle and catch). A bracket, gusset or splice is sized by finite elements; the others by beam formulas, each reporting its grams and margin. In its fitted frame: a bracket's x along b's face away from a, y up a, z across; a plate's x along b, y along a, its contact face at z = 0", "properties": { "kind": { "enum": ["bracket", "gusset", "splice", "panel-clip", "panel-corner", "slot-cover", "panel-edge", "gasket-strip", "hinge", "handle", "latch", "magnet-catch", "end-cap", "foot", "levelling-foot", "castor-plate", "stacking-foot", "device-mount", "fan-mount", "drag-chain-end", "din-rail", "cable-clip", "tie-anchor", "spool-holder", "rail-jig", "wheel-plate", "slider", "rod-holder", "rod-carriage", "motor-plate", "endstop-mount", "nut-carrier"], "description": "A nut-carrier is a printed block that slides in a slot holding a hex nut or a heat-set insert (face, thread, holds, length, count, pitch, load)" }, "profile": { "type": "string", "description": "The profile the base leg or the plate lies on" }, "other": { "type": "string", "description": "A bracket's: the profile its upright leg lies on, where not the same" }, "face": { "type": "string", "description": "The face of the profile it lies on (top, top.2): its slot sizes the tongue and the nut" }, "otherFace": { "type": "string" }, "shape": { "enum": ["L", "T", "cross", "splice"], "description": "A gusset's shape" }, "brace": { "type": "boolean", "description": "A bracket's brace across its inside corner" }, "load": { "type": "number", "description": "The design load in N, across beam a at the fitting's screw (default 100)" }, "count": { "type": "number", "description": "A plate's screws on each arm (default 2)" }, "thread": { "type": "string" }, "head": { "enum": ["cap", "button"] }, "part": { "type": "string", "description": "A hinge's leaf (frame, door) or a levelling foot's part (body, pad): an item each" }, "sheet": { "type": "number", "description": "The panel's or door's thickness, in mm" }, "length": { "type": "number", "description": "A strip's length, in mm" }, "standoff": { "type": "number", "description": "A latch's or catch's: the door's inner face over the beam's face (a hinge's standoff)" }, "edge": { "type": "number" }, "magnet": { "type": "array", "items": { "type": "number" } }, "stud": { "type": "string" }, "holds": { "enum": ["nut", "insert"], "description": "A nut-carrier's: a hex nut slid in from the side (the default) or a heat-set insert pressed in from below" }, "range": { "type": "number" }, "holes": { "type": "array", "items": { "type": "number" } }, "end": { "enum": ["a", "b"] }, "depth": { "type": "number" }, "grip": { "type": "number" }, "span": { "type": "number" }, "gap": { "type": "number" }, "squeeze": { "type": "number" }, "pin": { "type": "string" }, "screw": { "type": "string" }, "thickness": { "type": "number" }, "nut": { "type": "string" }, "material": { "type": "string" }, "device": { "type": "string", "description": "A device mount's: the rule set its holes are read from (supply-24v, cnc-shield-v3)" }, "variant": { "type": "string", "description": "A device mount's: the device's variant" }, "turn": { "enum": [0, 90, 180, 270], "description": "A device mount's: the device's x from the slot's line, degrees" }, "offset": { "type": "number", "description": "A device mount's: the device's middle across the slot, mm" }, "deviceHead": { "enum": ["cap", "button"] }, "size": { "type": "number", "description": "A fan mount's fan, mm: 40, 60, 80, 92 or 120" }, "side": { "enum": [1, -1] }, "flange": { "type": "number" }, "cable": { "type": "number", "description": "A cable clip's bundle, mm" }, "width": { "type": "number" }, "tie": { "type": "array", "items": { "type": "number" } }, "spool": { "type": "object" }, "rod": { "type": "string", "description": "A rod holder's or carriage's: the rods' rule set" }, "bearing": { "type": "string", "description": "A carriage's linear bearings' rule set" }, "spacing": { "type": "number" }, "height": { "type": "number" }, "leadNut": { "type": "string", "description": "A rod holder's or carriage's: the lead nut's rule set" }, "support": { "type": ["string", "null"], "description": "A rod holder's: the screw's ball bearing's rule set" }, "flag": { "type": "object", "description": "A carriage's endstop flag: where its tip reaches, { y, z }" }, "motor": { "type": "string", "description": "A motor plate's: the motor's rule set (28byj48, nema14, nema17)" }, "coupler": { "type": "object", "description": "A motor plate's: the coupler's { length, D }" }, "switch": { "type": "string", "description": "An endstop mount's: the switch's rule set" }, "toward": { "enum": [1, -1], "description": "An endstop mount's: which way across the face its lever reaches" }, "pose": { "enum": ["fit", "print"], "description": "fit (the default): in its place, as the item's at and rotate put it; print: laid as it prints, for a plate (cad plates writes it so)" } } },
|
|
53
54
|
"panel": { "type": "object", "required": ["sheet", "thickness", "bay", "out"], "additionalProperties": false, "description": "A panel from @rulecad/frames: a sheet cut to the bay of four beams it closes, on their faces that look along out, held by printed clips at a pitch; with door, a door on printed hinges that turns on a joint", "properties": { "sheet": { "enum": ["acrylic", "polycarbonate", "aluminium"] }, "thickness": { "$ref": "#/$defs/expr" }, "bay": { "type": "array", "items": { "type": "string" }, "minItems": 4, "maxItems": 4, "description": "The four beam items round it, in order" }, "out": { "type": "array", "items": { "$ref": "#/$defs/expr" }, "minItems": 3, "maxItems": 3, "description": "The way its face looks, square to the bay" }, "pitch": { "$ref": "#/$defs/expr" }, "nut": { "type": "string" }, "load": { "$ref": "#/$defs/expr" }, "door": { "type": "object", "required": ["hinge"], "additionalProperties": false, "properties": { "hinge": { "type": "string", "description": "The beam of the bay its hinges go on" }, "open": { "$ref": "#/$defs/expr" }, "handle": { "type": "boolean" }, "catch": { "type": "boolean" }, "latch": { "type": "boolean" }, "load": { "$ref": "#/$defs/expr" } } } } },
|
|
54
55
|
"mount": { "type": "object", "required": ["on"], "additionalProperties": false, "description": "A bought board's or supply's printed mount on a beam (@rulecad/frames' deviceMountModel), its holes read from the item's rule set: the mount goes at a slotted face's address, the item on it, and the screws into the slot and into the device are fastens", "properties": { "on": { "type": "string", "description": "An address on a beam's slotted face: rail.top@200" }, "turn": { "enum": [0, 90, 180, 270], "description": "The device's x from the beam's line, degrees" }, "offset": { "$ref": "#/$defs/expr", "description": "The device's middle across the slot, mm" }, "standoff": { "$ref": "#/$defs/expr", "description": "A board's least standoff, mm" }, "load": { "$ref": "#/$defs/expr", "description": "N on the device at its farthest hole (default 50)" }, "nut": { "type": "string" }, "head": { "enum": ["cap", "button"] }, "screw": { "type": "string", "description": "A board's screws, where not the largest its holes pass" } } },
|
|
55
|
-
"beam": { "type": "object", "required": ["profile"], "additionalProperties": false, "description": "A length of a profile from @rulecad/frames: bought and cut to length, faint in previews; placed by its ends (from, to, roll) or by at and rotate", "properties": { "profile": { "type": "string", "description": "A profile's name: 2020-misumi-hfs5, profile-4040-item-8, or a set in this workspace's rules/" }, "length": { "$ref": "#/$defs/expr", "description": "mm from end a to end b; may be left out when from and to are both given" }, "printed": { "type": "boolean", "description": "
|
|
56
|
+
"beam": { "type": "object", "required": ["profile"], "additionalProperties": false, "description": "A length of a profile from @rulecad/frames: bought and cut to length, faint in previews, or printed; placed by its ends (from, to, roll) or by at and rotate", "properties": { "profile": { "type": "string", "description": "A profile's name: 2020-misumi-hfs5, profile-4040-item-8, or a set in this workspace's rules/" }, "length": { "$ref": "#/$defs/expr", "description": "mm from end a to end b; may be left out when from and to are both given" }, "printed": { "description": "A printed beam (@rulecad/frames printed beams): true, or how it prints. A printed beam is a printed part, weighed by the plastic laid, on a plate, off the cut list; a bought one is false, the default", "oneOf": [{ "type": "boolean" }, { "type": "object", "additionalProperties": false, "properties": { "pose": { "enum": ["lying", "standing"], "description": "lying (the default): on its bottom face, its layers along it; standing: on end a, its section the layer" }, "walls": { "type": "integer", "minimum": 1, "description": "Walls round every outline, in lines (3)" }, "infill": { "type": "number", "minimum": 0, "maximum": 1, "description": "The share of the inside the infill fills (0.4)" }, "end": { "enum": ["insert", "nut"], "description": "What a tapped end becomes in print: a heat-set insert (the default) or a captive nut" }, "pull": { "type": "number", "exclusiveMinimum": 0, "description": "A slot nut's design pull in N (100)" } } }] }, "laid": { "type": "boolean", "description": "A printed beam drawn as it prints, for a plate (cad plates writes it so)" }, "material": { "type": "string", "description": "A material set in place of the profile's alloy: al6063-t5, or a plastic" }, "ops": { "type": "array", "items": { "$ref": "#/$defs/beamOp" }, "description": "Operations on the beam, each a line on its sheet and a cut in its solid, placed by an address on the beam and dimensioned from end a" } } },
|
|
56
57
|
"at": { "anyOf": [{ "$ref": "#/$defs/vec3" }, { "$ref": "#/$defs/address" }] },
|
|
57
58
|
"rotate": { "$ref": "#/$defs/vec3" },
|
|
58
59
|
"to": { "$ref": "#/$defs/vec3", "description": "A beam's end b, with from its end a" },
|
|
@@ -132,6 +133,8 @@
|
|
|
132
133
|
"b": { "type": "string", "description": "A place on the other beam where a's end (its bore's axis) meets it: a face with a distance from its end a (x1.back@120, x1.top@-20, x1.top@50%), or an end (x1.b) for a splice, mitre or corner" },
|
|
133
134
|
"fitting": { "type": "string", "minLength": 1, "description": "For a kind with a fitting: printed, or a bought fitting's rule set by name (fitting-motedis-bracket-20-b6), or bought to be told which sets there are. Printed, a bracket, gusset or splice join adds the fitting as an item, placed from where the beams are, its screws into slot nuts in both beams as fastens, and its own stiffness by finite elements. A bought set on a bracket, gusset, splice, hidden or anchor join adds its item (a reference, listed with its price), its screws into the set's nuts as fastens, the hole a beam needs for it, and its set's stiffness, an estimate until the joint rig measures it" },
|
|
134
135
|
"brace": { "type": "boolean", "description": "A printed bracket's brace across its inside corner" },
|
|
136
|
+
"face": { "type": "string", "description": "A printed gusset's: the face of b it lies on (front, back.2), one of the two square to a; left out, the one its frame from the beams' directions gives. A generated frame names the face looking out of the frame" },
|
|
137
|
+
"shape": { "enum": ["L", "T"], "description": "A printed gusset's shape: L (one arm along each beam) or T (a bar along b on both sides of a, where b has room). Left out, a T where b has room for its bar, else an L. A generated gantry gives L at its top side beams, where a T's bar would rise beside the post into the moving beam's path" },
|
|
135
138
|
"load": { "type": "number", "description": "A printed fitting's design load in N, across beam a at its screw (default 100): it is sized to about twice the margin at it" },
|
|
136
139
|
"nut": { "enum": ["slide-in", "drop-in", "roll-in", "hammer", "square", "t-bolt"], "description": "A printed fitting's slot nuts' kind (default: the strongest made for the slot)" },
|
|
137
140
|
"screw": { "type": "string", "description": "For blind and end-tap: the screw by thread and head (M5 button), where not the end bore's thread with the kind's head" },
|
|
@@ -180,7 +183,7 @@
|
|
|
180
183
|
"min": { "$ref": "#/$defs/values" },
|
|
181
184
|
"max": { "$ref": "#/$defs/values" },
|
|
182
185
|
"value": { "$ref": "#/$defs/values" },
|
|
183
|
-
"support": { "type": "object", "additionalProperties": false, "description": "What takes this joint's tipping load: bought bearings, or printed clips (read by FE)", "properties": { "bearings": { "type": "array", "items": { "type": "string" } }, "clips": { "type": "array", "items": { "type": "string" } }, "pitch": { "$ref": "#/$defs/expr", "description": "Diameter the clips stand on, mm" }, "cell": { "$ref": "#/$defs/expr", "description": "FE cell, mm" } } },
|
|
186
|
+
"support": { "type": "object", "additionalProperties": false, "description": "What takes this joint's tipping load: bought bearings, or printed clips (read by FE)", "properties": { "bearings": { "type": "array", "items": { "type": "string" } }, "clips": { "type": "array", "items": { "type": "string" } }, "pitch": { "$ref": "#/$defs/expr", "description": "Diameter the clips stand on, mm" }, "cell": { "$ref": "#/$defs/expr", "description": "FE cell for the clips, mm (0.8 by default)" }, "linkCell": { "$ref": "#/$defs/expr", "description": "FE cell for the link bent beyond this joint (link.deflection), mm (by default a third of the link's thinnest side, 1 to 4)" } } },
|
|
184
187
|
"errors": { "type": "object", "description": "What this joint adds to the error at the tool, degrees, by name (play, twist, bearing): an expression reading a rule, so a measurement moves it", "additionalProperties": { "$ref": "#/$defs/expr" } },
|
|
185
188
|
"home": { "type": "object", "additionalProperties": false, "required": ["endstop"], "description": "How this joint finds zero", "properties": { "endstop": { "type": "string", "description": "An item.anchor at the switch" }, "direction": { "enum": [1, -1] } } },
|
|
186
189
|
"brake": { "type": "string", "description": "What holds this joint with the power off (a ratchet, a detent): counted by motor.holds" },
|