Expand description
GUI-free faceting-design editor logic shared by the desktop editor
(apps/indicatrix-cut) and the wasm web app (apps/indicatrix-web), so both
edit, validate, format and export a design identically – see this crate’s
README for the full picture.
session:EditorSession– the design, its undo/redo history (nudge coalescing on caller-supplied timestamps), the multi-selection and the generation/saved-generation pair behind “unsaved changes”.loading: the tier, index-shorthand, preform, New Design and material-form parsers, and a design from bare.asctext.material/material_lookup: the material combo, RI-source text, gear presets and remap preview; the custom-over-built-in material lookup and the nearest-built-in search.view_model: plain-struct tier rows, index chips, cut-order rows, yield/proportion texts and verdicts, and the validation banner.optimize_view: Optimize’s hint, result tables, preview design and weight parser.retarget: “Retarget for material” proposals and their view model.cut_sheet: the printable cutting-sheet HTML and diagram PNG bytes.guide: the guided walkthrough’s steps and completion predicates.solve_policy: when to solve synchronously, auto-solve eligibility, banner texts, the cancellable solve and the plane-cap diagnosis.scratch,stale,edit_intent,templates: form re-seed change detection, result staleness stamps, UI-intent coalescing, gallery cards.manipulate: mouse-driven direct manipulation – the pick-frame projection, the angle/depth/index drag handles of the selected facet, the Slice tool’s plane snapping, the tiers a drag drags along, and the hint and toast wording.files: file kinds by name and content (.isddand the earlier.indicatrixare design files),.gem/.gcsconversion to.asctext, and the desktop’s default save names.tier_save: whichEdita parsed tier form becomes (insert after the selection, modify in place, the depth / girdle-thickness / table-width target batch).printed_proportions: the design settings’ five printed figures (Vol/W^3, L/W, C/W, P/W, H/W) from their text fields.snapshot: “Compare to snapshot”’s rows – the tier-by-tier diff of a remembered design against the design now.raw_text: the design’s cutting instructions as editable.asctext – generating it, reading an edited copy back with line-numbered problems, merging it into the design as one undoable edit with a summary of what is lost, and a plain line diff.sweep: “Angle Sweep” – one tier’s angle over a range, every angle solved and scored, as rows, a chart and CSV text.cutting_mode: the cutting instructions as one page per step – the steps in sheet order with a stable key and a values fingerprint each, the done marks and index ticks (a mark whose step changed since reads “changed”, not “done”), the page texts and the index wheel with a step’s indices marked.slider_ranges: the sliders beside the main number fields – the angle ranges per side and material, the marked pavilion band over the critical angle, the “Typical” presets with their reasons, the Preform ranges, and the text a slider writes and reads back.metric_deltas: the compare window’s optical figures of two stones, the table rows beside them and a few plain sentences about what changed, with named noise thresholds so a change lost in the measurement noise reads “about the same”.verdict: the overall Good / Check / Problem verdict for the open design – the reasons behind it with named thresholds, and a validated one-edit “Fix” for each reason where a safe tool exists (snap to the gear, remove cut-away facets, move a tier behind the one it meets, steepen a windowing pavilion about its girdle edge, add a table).
No GUI toolkit types, no clock and no filesystem anywhere in this crate, and no
threads except the angle sweep’s worker threads, which are compiled out of a
wasm32-unknown-unknown build (it runs the same loop inline there), so it links
unchanged into that build. Each UI maps
the plain structs to its own row types, and supplies its own clock and threads
(or Workers).
Re-exports§
pub use manipulate::DragStart;pub use manipulate::DragValue;pub use manipulate::FacetFrame;pub use manipulate::HandleKind;pub use manipulate::HandleLayout;pub use manipulate::ScreenPoint;pub use manipulate::ScreenSize;pub use manipulate::SliceSide;pub use manipulate::SnapMode;pub use manipulate::SnappedFacet;pub use session::EditChange;pub use session::EditorSession;pub use session::HistorySnapshot;pub use session::JumpFailure;pub use session::JumpOutcome;pub use session::NudgeOutcome;pub use session::PinOutcome;
Modules§
- cut_
sheet - A design’s printable cutting sequence as a single self-contained HTML string.
- cutting_
mode - Cutting mode’s pure model: a solved design’s cutting instructions as steps, one per page.
- deep_
solve - Shared Deep Solve availability and diagnostic presentation. No UI or mutation.
- edit_
intent - Coalesce-at-the-source UI edit intents: several raw UI events (angle-nudge ticks, a slider drag’s steps) merge into ONE pending intent, applied once per frame rather than once per event.
- files
- File kinds, foreign-design conversion and file naming for a front end that opens and saves designs as bytes and names rather than paths (the wasm web app).
- guide
- Guided tutorials: the data model of a
Guide, its goals and the registry of guides. - lch_
color - The pure half of the path-aware LCh body-colour editor.
- loading
- Parsing the editor’s forms into
indicatrix-cut-coreedit payloads, and building a design from a bare.asctext. - manipulate
- Mouse-driven direct manipulation of the selected facet: the GUI-free math behind the three drag handles and the Slice tool, and all their wording.
- material
- Material/RI and gear-tooth view-model helpers.
- material_
lookup - The editor-side
indicatrix_cut_core::MaterialLookup. - metric_
deltas - “Deltas in words”: the optical figures of two stones side by side, and a few plain sentences about what changed between them.
- optimize_
view - Optimize’s view models: the availability hint, the result SUMMARY table
(
optimize_result_rows/optimize_status_text), the per-tier change table (optimize_change_rows). - printed_
proportions - The design settings panel’s “Printed Proportions” form: the five figures (Vol/W^3,
L/W, C/W, P/W, H/W) every
GemCAD-style sheet prints, parsed from their text fields. - raw_
text - The raw text view of a design’s cutting instructions (“Edit as Text”).
- retarget
- “Retarget for material” – proposing and applying a new set of facet angles when a design’s material changes.
- scratch
- Scratch-field change detection.
- session
EditorSession: the design under edit, its undo/redoHistory, the tier-list multi-selection, the edit-generation counter and the saved-generation mark that together make an editor.- slider_
ranges - Ranges, steps and presets for the sliders beside the main number fields.
- snapshot
- “Snapshot Design” / “Compare to Snapshot”: the toolkit-free rows of the tier-by-tier comparison between a snapshot taken earlier and the design now.
- solve_
policy - The solve policy every editor front end shares.
- stale
- A generation-stamp registry for analysis results with no other natural home to track their own “computed against generation N” bookkeeping in.
- sweep
- Angle sweeps: one tier’s angle over a range, every angle solved and scored.
- templates
- The New Design template gallery: its cards, and how a template becomes a design.
- tier_
save - The tier inspector’s Save/Add Tier: which
Edita parsed tier form becomes. - variants
- “Open variant”: the one edit that turns the open design into a saved variant.
- verdict
- The overall verdict: one green / amber / red answer for the open design, the reasons behind it, and a “fix it” action for each reason where a safe tool exists.
- view_
model - Plain-Rust view models: the tier table’s rows, the inspector’s index chips, the cut-order schedule rows, the yield/proportion texts and verdicts, and the validation banner.