docs/kitbash.md, install.md, action table: who asks the one-driver rule, a ram's limits and its dead centre, held
The rule is read before every write, by set_params before its mesh and by setObjectParent; a ram whose limits reach its closed length is refused by the conditioning bound; a held row is in neither unlimited nor rigid (finding docs-state-the-old-rule). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
08896d8565
commit
a25cec6f27
3 changed files with 25 additions and 16 deletions
|
|
@ -360,7 +360,7 @@
|
|||
},
|
||||
{
|
||||
"name": "brokkr_kitbash.joints",
|
||||
"doc": "The joints of the tree of kit parts attached under a root part, as {schema: brokkr.joints, version: 2, root, frame, rigid, unlimited, next, joints}. A row per revolute or prismatic connection, depth first with children by name, so a joint's parent row comes before it; a root that itself states a revolute or prismatic connection has its own row first, parent null: id (the child object), parent (the id of the nearest joint above, or null: rigid connections fold into it and are counted in rigid), part, socket ('Object:socket', the parent socket), kind, axis and origin (that socket's z and origin in the root object's frame: Blender axes, +Z up, metres), value (the roll in degrees or the slide in metres now), limits ([lo, hi] or null), min and max (the limits less the value: the travel either way from this pose), mechanism, compliance and driven (null, or {by: the driver's id, kind: ratio | loop, k, offset}: the value is derived from the driver's, so a rig makes a driven bone and not a DOF). kind is revolute or prismatic: Aetheria's ShipJoint calls them rotate and slide, one to one. unlimited lists the ids of the rows this report carries that are not driven and state no limits: an exporter that needs limits refuses by this one field of each report. Axis, origin and order are derived at each report from the kits and the parent tree; nothing stores them. Rows a receipt cannot carry are counted in jointsOmitted, and next is then the id of the last row carried (else null): call again with after set to it for the rows that follow and their unlimited ids; a report is never over a receipt and always carries a row. after refuses an id that is no row's. Refuses a connection that cannot be read. Evaluates no modifier.",
|
||||
"doc": "The joints of the tree of kit parts attached under a root part, as {schema: brokkr.joints, version: 2, root, frame, rigid, unlimited, next, joints}. A row per revolute or prismatic connection, depth first with children by name, so a joint's parent row comes before it; a root that itself states a revolute or prismatic connection has its own row first, parent null: id (the child object), parent (the id of the nearest joint above, or null: rigid connections fold into it and are counted in rigid), part, socket ('Object:socket', the parent socket), kind, axis and origin (that socket's z and origin in the root object's frame: Blender axes, +Z up, metres), value (the roll in degrees or the slide in metres now), limits ([lo, hi] or null), min and max (the limits less the value: the travel either way from this pose), held (true when the limits are of one value: the joint has no travel, as a torque link's lug held at [90, 90], so a rig makes a fixed bone and not a DOF; such a row is in neither unlimited nor rigid), mechanism, compliance and driven (null, or {by: the driver's id, kind: ratio | loop, k, offset}: the value is derived from the driver's, so a rig makes a driven bone and not a DOF). kind is revolute or prismatic: Aetheria's ShipJoint calls them rotate and slide, one to one. unlimited lists the ids of the rows this report carries that are not driven and state no limits: an exporter that needs limits refuses by this one field of each report. Axis, origin and order are derived at each report from the kits and the parent tree; nothing stores them. Rows a receipt cannot carry are counted in jointsOmitted, and next is then the id of the last row carried (else null): call again with after set to it for the rows that follow and their unlimited ids; a report is never over a receipt and always carries a row. after refuses an id that is no row's. Refuses a connection that cannot be read. Evaluates no modifier.",
|
||||
"changesScene": false,
|
||||
"editModeSafe": true,
|
||||
"result": "brokkr_mesh_polish_result",
|
||||
|
|
|
|||
|
|
@ -182,7 +182,9 @@ Behaviour the table does not say, per action:
|
|||
|
||||
- `createObject`: a `MESH` is a cube of `size`. `lightType`, `emptyDisplayType` and `meshType` apply
|
||||
only to their own `objectType`.
|
||||
- `setObjectParent`: an empty or absent `parentObjectName` clears the parent.
|
||||
- `setObjectParent`: an empty or absent `parentObjectName` clears the parent. Before it writes, each enabled
|
||||
add-on that defines `brokkr_parent_refusal(object, parent)` is asked, and a reason it answers refuses the
|
||||
intent with nothing changed (`brokkr_kitbash` answers its one-driver rule, `docs/kitbash.md`).
|
||||
- `importGltf`: `filepath`, `.gltf` or `.glb`, relative to the add-on preference
|
||||
`Import Directory` (absolute paths, `..` and symlinks that resolve outside it are
|
||||
refused). Empty `Import Directory` disables the action. Needs Blender's glTF add-on.
|
||||
|
|
|
|||
|
|
@ -223,12 +223,13 @@ driver is the only input the two ends depend on: every revolute or prismatic joi
|
|||
two ends share (or the root, when they share none) is the driver, follows it, or is held by limits of one value. A
|
||||
joint there that follows another driver, or that follows nothing and has travel, is a second driver: a pose of it
|
||||
would open the loop, and nothing here solves a loop for two drivers. The rule is read over every loop in the scene
|
||||
before each write, as the scene would stand after it (`one_driver`, asked by the one writer of connections and by
|
||||
`detach`), so it holds after the loop is stated as it does when `follow` states it. Each of these is refused with
|
||||
before each write, as the scene would stand after it (`one_driver`, asked by the one writer of connections, by
|
||||
`set_params` before it rebuilds a mesh, by `detach` and by Brokkr's `setObjectParent`), so it holds after the loop
|
||||
is stated as it does when `follow` states it. Each of these is refused with
|
||||
nothing changed, naming the loop's driver and each other one: `attach` of an end's root on a pin or a slide,
|
||||
`detach` of a part between an end and the part both ends hang from, `follow` with null on a follower between the
|
||||
ends, `joint` widening or clearing limits that held a pin there, and any pose once such a joint was written by
|
||||
hand. To change a mechanism between a loop's ends, give the new joint its one driver or its one value first, or
|
||||
ends, `joint` widening or clearing limits that held a pin there, `setObjectParent` giving or clearing a parent
|
||||
between the ends, and any pose or `set_params` once such a joint was written by hand. To change a mechanism between a loop's ends, give the new joint its one driver or its one value first, or
|
||||
clear the loop and state it again. A loop whose driver is detached is derived by nothing and is not read; the
|
||||
attach that gives the driver a connection again reads it. A torque link is the case for limits of one value: a
|
||||
real torque link exists to stop the rod rolling in its barrel, so its lug has no travel, and a strut pinned to
|
||||
|
|
@ -253,13 +254,15 @@ at 0 and the reading is the ram's lever over its closed lever: a ram drawn in to
|
|||
accepted and one at 0.047 refused. The sign of the Jacobian's determinant about the pin is the assembly branch (an
|
||||
elbow bent one way or the other, a rod's end on one side of its barrel's pin or the other), and a Newton step that
|
||||
lands on the other sign from its seed is refused as past the dead centre, so no pose answers the other branch.
|
||||
A ram with limits never comes near either: its slide leaves its limits first.
|
||||
A ram whose limits keep its slide clear of minus its closed length never comes near either: its slide leaves its
|
||||
limits first. One whose limits reach that far is refused by the bound above before it leaves them.
|
||||
|
||||
What followers give up: a loop of three or more unknowns, or one out of a plane, is not solved (follow-up
|
||||
`kit-follows-wider-loops`); a follower does not drive another; `set_params` never derives a follower again, so a
|
||||
loop it opens reads `holds: false` until its driver is posed; and the one-driver rule is checked when a loop is
|
||||
stated, so a part attached, detached, cleared of its statement or given wider limits afterwards between a loop's
|
||||
ends can still open it, and reads the same way. A connection's row in a report carries `follows: {driver, kind, k, offset, holds, reason}`:
|
||||
loop it opens reads `holds: false` until its driver is posed; and a scene that holds a loop
|
||||
with a second driver (a limit widened by hand, a parent set in Blender's own interface, a saved file) is refused
|
||||
every write of a connection, a `set_params` and a `setObjectParent`, related to the loop or not, until the joint
|
||||
is held again, follows the driver, or the loop is cleared. A connection's row in a report carries `follows: {driver, kind, k, offset, holds, reason}`:
|
||||
`holds` is false, with a reason, when the value stands off the ratio, the loop's closure does not hold, or the
|
||||
driver is gone or states no revolute or prismatic connection. Detaching a driver leaves its followers'
|
||||
statements; detaching a loop follower clears its partner's. No Blender driver or constraint is made: a follower's
|
||||
|
|
@ -280,14 +283,15 @@ nothing:
|
|||
"rigid": 2, "unlimited": ["Barrel"], "next": null, "joints": [
|
||||
{"id": "Strut", "parent": null, "part": "strut", "socket": "Mount:pivot", "kind": "revolute",
|
||||
"axis": [0.0, 1.0, 0.0], "origin": [0.436, 0.0, 0.85368], "value": -113.019997, "limits": [-116.02, -40.02],
|
||||
"min": -3.000003, "max": 72.999997, "mechanism": "knee", "compliance": null, "driven": null},
|
||||
"min": -3.000003, "max": 72.999997, "mechanism": "knee", "compliance": null, "held": false, "driven": null},
|
||||
{"id": "Cap", "parent": "Strut", "part": "strut", "socket": "Strut:end_a_back", "kind": "revolute",
|
||||
"axis": [0.0, -1.0, 0.0], "origin": [0.436, -0.09, 0.85368], "value": -56.509999, "limits": null,
|
||||
"min": null, "max": null, "mechanism": null, "compliance": null,
|
||||
"min": null, "max": null, "mechanism": null, "compliance": null, "held": false,
|
||||
"driven": {"by": "Strut", "kind": "ratio", "k": 0.5, "offset": 0.0}},
|
||||
{"id": "Rod", "parent": "Barrel", "part": "ram_rod", "socket": "Barrel:bore", "kind": "prismatic",
|
||||
"axis": [0.97429, 0.0, 0.225296], "origin": [1.072572, 0.124, 1.312762], "value": 0.12, "limits": [0.0, 0.3],
|
||||
"min": -0.12, "max": 0.18, "mechanism": "shock", "compliance": {"damping_ratio": 0.7, "hertz": 4.0}, "driven": null}]}
|
||||
"min": -0.12, "max": 0.18, "mechanism": "shock", "compliance": {"damping_ratio": 0.7, "hertz": 4.0},
|
||||
"held": false, "driven": null}]}
|
||||
```
|
||||
|
||||
A row per revolute or prismatic connection under the root, depth first with children by name, so a row's parent
|
||||
|
|
@ -295,7 +299,9 @@ comes before it; a root that itself states a revolute or prismatic connection ha
|
|||
null, so a report of a sub-tree carries the joint the sub-tree hangs by. `parent` is the nearest joint above, not
|
||||
the object the part hangs from: rigid connections fold into it and are counted in `rigid`. `axis` and `origin` are the parent socket's z and origin in the root object's
|
||||
frame. `min` and `max` are the limits less the value, the travel either way from the pose the report was taken at,
|
||||
which is the shape of Aetheria's `ShipJoint` (`Min` and `Max` about rest). `driven` is null, or what the row follows
|
||||
which is the shape of Aetheria's `ShipJoint` (`Min` and `Max` about rest). `held` is true when the limits are of
|
||||
one value: the joint has no travel (a torque link's lug held at `[90, 90]`), its `min` and `max` are 0, and a rig
|
||||
makes a fixed bone for it and not a degree of freedom; a held row is in neither `unlimited` nor `rigid`. `driven` is null, or what the row follows
|
||||
(`by` the driver's id, `kind`, `k`, `offset`): a driven row's value is derived, so a rig makes a driven bone for it
|
||||
and not a degree of freedom. `unlimited` lists the ids of the rows this report carries that are not driven and
|
||||
state no limits, so an exporter that needs limits on every degree of freedom refuses by reading one field of each
|
||||
|
|
@ -422,7 +428,8 @@ that breaks one (a `pipe_r` that no longer matches the flange it is bolted to) i
|
|||
connection.
|
||||
|
||||
**Drift.** `setObjectTransform` and `setObjectParent` are Brokkr's own rows and can move or re-parent an attached
|
||||
child. Reports show it: a part's `connection` is `null`, or
|
||||
child; `setObjectParent` refuses only a parent that would give a stated loop a second driver ("Followers").
|
||||
Reports show it: a part's `connection` is `null`, or
|
||||
|
||||
```json
|
||||
{"parent": "Tee", "socket": "mount", "parentSocket": "c", "roll": 37.0, "residual": 2.1e-07, "holds": true}
|
||||
|
|
@ -1348,7 +1355,7 @@ under such load (five runs), and reading a 336-face part takes 27 to 37 ms.
|
|||
| `brokkr_kitbash.reach` | `object_name`, `socket` (one of the part's), `height` (metres, -1000 to 1000), `direction_x`, `direction_y`, `direction_z` (world; default 0, 0, 1) | Solves the roll that brings the socket's origin to `height` along the direction, the nearer of the two, and turns the part to it. Refuses a height out of reach, naming the range. Reports the part, `reached: {roll, residual}` and `closures`. |
|
||||
| `brokkr_kitbash.joint` | `object_name`, `record` (a JSON object of any of `limits`: `[lo, hi]` or null; `mechanism`: a label or null; `compliance`: `{hertz, damping_ratio}` or null) | States the joint record of an attached part's connection; a key left out keeps what is stated and null clears it. A follower keeps its derived value, and a driver's followers are derived again. Refuses a rigid connection naming its socket type, limits that do not hold the value the joint has, revolute limits over a turn or past 360, prismatic limits past 10 m, and compliance on a revolute joint or without limits. Reports the part and `closures` as `roll` does |
|
||||
| `brokkr_kitbash.slide` | `object_name`, `slide` (metres, -10 to 10) | Slides an attached part along its parent socket's normal on a prismatic connection, where it hangs, and every follower of it with it. Refuses a revolute or rigid connection naming its socket type, a slide outside the joint's limits, and a follower. Reports the part and `closures` as `roll` does |
|
||||
| `brokkr_kitbash.joints` | `object_name` (the root, a kit part), `after` (default empty: an id, the `next` of the report before) | Reports the joints of the tree attached under the root as `brokkr.joints` version 2: a row per revolute or prismatic connection, parents first and the root's own first when it states one, with `id`, `parent`, `part`, `socket`, `kind`, `axis`, `origin`, `value`, `limits`, `min`, `max`, `mechanism`, `compliance` and `driven`, in the root's frame, and `unlimited` and `next` beside them ("Joint records"). With `after`, the rows after that id. Changes nothing and evaluates no modifier. |
|
||||
| `brokkr_kitbash.joints` | `object_name` (the root, a kit part), `after` (default empty: an id, the `next` of the report before) | Reports the joints of the tree attached under the root as `brokkr.joints` version 2: a row per revolute or prismatic connection, parents first and the root's own first when it states one, with `id`, `parent`, `part`, `socket`, `kind`, `axis`, `origin`, `value`, `limits`, `min`, `max`, `held`, `mechanism`, `compliance` and `driven`, in the root's frame, and `unlimited` and `next` beside them ("Joint records"). With `after`, the rows after that id. Changes nothing and evaluates no modifier. |
|
||||
| `brokkr_kitbash.follow` | `object_name` (the follower; for a loop, the part that states the closure), `record` (JSON: `{driver, kind: "ratio", k, offset}`, `{driver, kind: "loop"}` or null) | States that the part's joint follows the driver's, by a ratio or by keeping its closure closed with its parent's joint, and moves it there at once; null clears the statement, and a loop partner's with it ("Followers"). Refuses a rigid connection, a driver that is the follower, below it or itself a follower, a follower that already follows or drives another, a ratio whose driver states no limits, and a loop without a closure that holds, with both ends or neither moving with the driver, whose ends depend on another driver or on a joint posed by hand, that is not planar or that stands at a dead centre. Reports the part, `followers` and `closures`. |
|
||||
| `brokkr_kitbash.close` | `object_name` (the closing part), `socket`, `other_name`, `other_socket` | States that the closing part's socket meets the other part's, closing a loop. Accepted only when they already meet; moves nothing. Reports the closing part. |
|
||||
| `brokkr_kitbash.boolean` | `object_name` (any mesh), `cutter`, `operation` (`DIFFERENCE`, `UNION` or `INTERSECT`; default `DIFFERENCE`) | Adds the cutter to the collection of the target's one live Exact Boolean for the operation, above the Bevel. Refuses a cutter that is the target, is not a mesh, or already cuts it, and a scaled target. Reports the part (or `object` for a mesh that is not one), `booleans: [{cutter, operation}]` (difference, union, intersect; each in the order added; `booleansOmitted` counts rows a receipt had no room for) and `evaluated`. |
|
||||
|
|
|
|||
Loading…
Reference in a new issue