Expand description
What editing is: the vocabulary a step’s editing is said in — dialogs,
visuals, gizmos, events, picks (editing), number fields of numbers
typed as formulas (geop_core_program::numeric,
edit_form::EditForm::numeric) — what an operation shows and does
with them (editable::Editable), what a part is drawn as and picked
in (view), and what is made of a part rather than in it: files and
answers (output); the interaction every step shares
(step_editor) and the whole of editing a program (editor), over
what a registry::Registry offers — operations, drawers, panels,
tools (tools), a settler, examples — none of which it names; and
the editor driven by an agent’s tools (agent), which every front end
an agent talks to offers. A program runs without any of it (see
geop_core_program).
Modules§
- agent
- An
Editordriven by an agent’s tools: the one tool layer of every front end an agent talks to — the MCP server (geop mcp) and the web app’s hosted assistant alike. - edit_
form EditForm: aFormbuilt together with what setting each of its fields does — for an operation with many fields, whose events are then answered by the setter of the field they set (seeEditForm::set) rather than by matching their keys. Every setter gets the wholeEdit: a field may set the step’s arguments or its session.- editable
Editable: what anOperationis to an editor — how it is offered, the arguments of a new step, the form a step is edited through and what the user’s events do to it — andEditors, the operations an editor offers, which also gives the program runner its registry.- editing
- What an editor exchanges with an operation while a step is edited: the
Presentationit shows, aDialogof fields and theVisuals it draws, and theEvents of what the user did. Fields say what a value means, never how it is edited, so a pick, a selection or a drag means the same in every operation. - editor
Editor: the whole of editing a program, as one state machine an editor drives withCommands and draws from theUpdates it answers.- keys
- The keys of what every front end offers besides the operations — the
command palette, the key list, committing and cancelling a step,
undoing, framing the view — named once, here, so that the web app and
VS Code press the same keys for the same things (see
docs/ux.md). An operation’s key is its own (crate::editable::OperationInfo::shortcut). - output
- What is made of a part rather than in it: files written from what a
program built (
Exporter), and questions answered about it (Inspector). Neither is a step: exporting and inspecting change no program and are nothing to undo. - part_
operation PartOperation: an operation and how it is edited, in one trait — what a step is given, how it runs, and the one form it is edited through, whose fields each set what they show, so a field’s key is written once — andpart_operation!, which makes it anOperationand anEditable, its editing state aFormStateof its session.- registry
Registry: everything an editor offers, gathered in one builder that each operation crate adds to with its oneregisterfunction — the operations a step can be, how what they build is drawn and listed (Drawer), the exporters and inspectors (crate::output), the panels (Panel), the tools (Tool), what settles the program’s state after every edit (Settle) and the examples (ExampleSet).- selectable
Selectable: what a reference field of a dialog holds — an element of a kind the user picks (SelectableElement), or one of several (one_of!) — and how a click on what the editor draws selects one, withselected, the values a reference field’s picks come to.- step_
editor StepEditor: editing one step — the interaction every operation shares, so a pick, a selection or a drag means the same whatever is edited — against aScene: the part as drawn, which picks are made in.- tools
Tool: a mode in hand while no step is edited, which the events of the viewport go to — the drag tool of an assembly, the pick tool of an inspector (pick).- view
PartView: a part as the viewport draws it, and picking elements of it with aPointer.
Macros§
- one_of
- Declares an enum of references, each variant one source of what an
operation takes — a line from a straight edge, a datum axis or a sketch
line — given
-> Out, all resolving to the same value,Out(resolve). Saved by its variant’s name:{"edge": "extrude(e,end)"}. It isSelectable: a click selects the first variant that selects it. A value held is told from a click by its kind, so no variant may be of a kind drawn as itself that another variant selects from — a field of edges or chains would take a click on an edge for an edge held. The crate using it depends onserde. - part_
operation - Makes each
PartOperationnamed,Operation(Args), anOperationand anEditable, edited through its form — and its arguments theStepArgsof it. (Named, since what an operation’sArgsstand for is not known to other crates’ impls.)