SDK · crate
kinogaki-edit
Kinogaki Studio's edit contracts: what core and the kernels agree on when a value is selected and changed.
- Repository
- SDK (kinogaki/studio-sdk)
- Folder
sdk/crates/edit- Source
- 24 files, 5,511 lines
- Tests
- 9 files, 2,198 lines
What it is
Kinogaki Studio's edit contracts: what core and the kernels agree on when a value is selected and changed.
Core owns the geometric values (kinogaki-geometry); kernels bring the operations and the math; plugins bring tools and nodes. The edit policy core and every kernel share lives here, beside the data crate rather than in it; a kernel reaches it through kinogaki-studio-api (kinogaki_studio_api::edit), where its verbs are declared:
| Module | What |
|---|---|
select | a selection as another domain (convert, by Coverage), how a pick grows (Mode: a domain and an Expand), and what the selection commands find from it (loops, rims, borders, likeness, the shortest way) |
deform | a move as data (Deform: a Move, per-point weights and a Symmetry), the one function a preview and a commit place points with |
editor | the one way a stored value changes (Editor): adding, removing, welding, splitting and rewiring, attributes, groups and ids following, unchanged columns shared, with a report of what changed (Change); values gathered into one |
ids | stable ids: fresh ones for new elements |
preview | the points a drag moves (Moving), which core previews over the shown value without a cook |
Every rule reads values through kinogaki-geometry's Incidence, so one rule serves polygons and B-rep alike.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-geometry | SDK | normal | Kinogaki Studio's standard geometry values. |
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-shared | Core and the app | normal | The crates Studio and its plugins share, built once as a Rust dylib. |
kinogaki-studio-api | SDK | normal | Kinogaki Studio's headless plugin API. |
kinogaki-viewport-core | lib-viewport | normal | Kinogaki viewport core: what a 3D viewport shows, independent of any GPU API or UI toolkit. |
Modules
deformA move as data:Deform, aMoveapplied to each point by its weight, mirrored by an optionalSymmetry.355 lineseditorEditor: the one way a storedGeometrychanges.542 lineseditor::carry(private)How attributes and groups follow an edit: the declared rule of each attribute type, and oneLayoutapplied to every column of a domain.389 lineseditor::change(private)Change: what an edit did, in a few numbers.69 lineseditor::extract(private)extract: some of a value's elements as a value of their own, at the cost of what it takes and not of what it leaves: the pieces of a loop.145 lineseditor::finish(private)Editor::finish: the changes made into a new value, in one pass over what they reach; everything else stays shared.513 lineseditor::follow(private)Typed values following a deformation (Editor::deform): where each moved point goes is the deformation's; the values of aMeaningthat turns (other points, vectors, normals, rotations, transforms) take the placement the deformation is near their ...194 lineseditor::gather(private)gather: values into one, each at a placement: what a Merge and a realize of instances make, the one rule for both.588 lineseditor::layout(private)Layout: where the elements of one domain of an edited value come from, the one plan every column and group of that domain follows.152 lineseditor::place(private)How a placement acts on attribute values, by theirMeaning: what agatherdoes to each input and whatplace_pointsandplace_primitivesask for.216 lineseditor::reblend(private)reblend: some elements' attributes and groups made again from their sources, as anEditormade them, in place.122 lineseditor::settle(private)What an edit comes to, before a column is written: the rows it reaches as they end up, and the numbers of the elements.259 lineseditor::split(private)The editor's splits, each a few of its plain changes: an edge, a polygon, a point.136 linesidsStable ids: the one rule kernels keep the standardidattribute by.264 linespreviewMoving: the points a drag moves, which core previews over the shown value while the drag lasts.27 linesselectSelection rules: aSelectionas another domain, the elements it holds, how it is found again after its value changed (reresolve), how a pick grows before it becomes a selection (expand: connected pieces, edge loops and rings), what lies next to it ...415 linesselect::alike(private)What the selection commands find by likeness: elements like the selected ones (similar), faces by their facing (by_normal,flood_by_angle) and the hard edges of the pieces selected edges lie on (hard_edges).143 linesselect::expand(private)How a pick grows before it becomes a selection:Expandby a level'sMode, to connected pieces, edge loops or rings.115 linesselect::near(private)What lies next to a selection:grow,shrinkand a face selection's outline (boundary).147 linesselect::topology(private)What the selection commands find over a polygon value's topology: the loops two selected neighbours lie on (loops), a selection's rim (rim), the open borders it touches (border) and the shortest way between two selected elements ...155 linesselect::ways(private)The one shortest-way search over elements (Ways, Dijkstra's): the Shortest Path command's way between two elements and a soft selection's reach along the surface both run it.108 lines
Public types and traits
By module: 16 public types and traits in 9 modules
deform AxisDeformMoveSideSymmetry
editor CornerEditor
editor::carry Rule
editor::change ChangeNumbers
editor::gather Placed
preview Moving
select Coverage
select::expand ExpandMode
select::ways Ways
Besides these, 10 public functions at module level.
