Skip to main content

Module forms

Module forms 

Source
Expand description

The Simulation pane’s forms: a motor’s and a clip’s fields as the app’s schema-driven form engine reads them (an inputParamsSchema of number, options, boolean and reference_selection fields), a FLAT view of the item for the form to edit (the engine binds top-level keys), which fields hide for the item’s current mode, and the way back — the patch simulation_patch merges into the item. Pure functions: the pane draws, this decides what it draws and what an edit means.

Structs§

FormChoices
What the forms’ option lists are built from: the assembly’s mates, every constraint (a suppress clip’s), the PMI views with a camera, the PMI views with a section, the exploded views.
MateChoice
A mate a motor can drive, as the form offers it.

Constants§

CAMERA_VIEW_SLOTS
A camera clip offers this many view slots (view1…), in play order.
NO_VIEW
The option an empty camera-view slot shows.
OCCURRENCES
The field key a parts list binds to (the reference field a pick writes).

Functions§

clip_hidden
The clip fields the current state has no use for (a sweep that is off).
clip_kind
The clip kind’s word in the schema (suppress, camera, …), the same kind the block stores.
clip_params
The clip as the form edits it, flat: the span and the kind’s fields.
clip_patch
The patch an edited clip form means for clip’s kind.
clip_schema
The clip form’s schema: the span, then the kind’s own fields — the mate (suppress), the parts as a reference field picked in the viewport (visibility, transparency: solids or components), the fade’s end opacities, the view slots (camera), the section view and its sweep, the exploded view and Collapse.
clip_title
The clip form’s title word.
motor_hidden
The motor fields the current mode has no use for.
motor_params
The motor as the form edits it: its fields flat, the drive’s under mode, speed, shape, start, end, accel.
motor_patch
The patch an edited motor form means: constraint, from, to and the drive rebuilt from the mode. A mode just switched has no fields of its own yet, so they are seeded as the pane always did: a speed of 10 mm/s or 90°/s, a profile from the mate’s value 20 mm or 360° on, a trapezoid’s default acceleration share.
motor_schema
The motor form’s schema: the mate it drives, its span, the drive mode and the mode’s own fields (speed, or a profile’s shape, start, end and the trapezoid’s acceleration share).