mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-13 14:20:24 +00:00
Object › Plug-ins › Cutting Tools › Stencil Bridges… (`addon.cutting.bridges`) cuts strips of a set width out of the selected art so that a stencil cut from it holds together: every island (the inside of an O, A or 8, a hole in a shape) stays joined to the sheet, directly or through another island. Bridges take the shortest crossings that fit first, then spread around each island up to the count asked for, at least two widths apart. They run vertically, horizontally or along the shortest crossing among 12 directions 15° apart. - The art is measured by the area its outlines enclose, whatever their paint, with hidden objects left out; type by its glyph outlines, without converting the type. The result is one compound path with the strips cut out, painted as the topmost selected shape with outlines, in the place of the topmost selected object with outlines. Selected objects with no outlines in the art stay where they are. - Keep Original (on by default) moves the selected objects that make up the art to a new hidden layer, Stencil Original; off replaces them. - Art with no islands, or none a bridge of the width fits, is left as it is with a message and no undo step. Islands the cut result still encloses are counted in `unbridged`, with a message. Otherwise the run is one undo step. - Curves are followed within a twentieth of the width (0.002 to 0.25 pt). Art that reaches more than 10000000 pt from the origin or has more than 200000 anchors is refused before it is combined. Art is also refused when its combined area has more than 4000 outlines, when its outlines need more than 200000 straight segments, or when placing the outlines or joining every island takes more work than a fixed budget allows; when the budget runs out while extra bridges are added, the bridges found so far are kept. Tests in vectorcraft-pathops, vectorcraft-engine and vectorcraft-ui-egui, command_sweep cases, catalog rows in all 27 languages, docs/mcp.md, the evidence list in docs/target-app-parity.md and the ROADMAP progress log.
28 lines
1.5 KiB
Rust
28 lines
1.5 KiB
Rust
//! Geometry for VectorCraft's built-in add-ons, one module per add-on, with the kernels they share.
|
|
//!
|
|
//! - [`keep_shape`]: remove anchors while refitting their neighbours' handles, so the outline keeps
|
|
//! its shape within a tolerance (shared by every add-on that takes anchors away).
|
|
//! - [`cleanup`]: Artwork Cleanup's path repairs (collinear, duplicate and near anchors, tiny
|
|
//! handles, nearly closed paths) and Rejoin Path Pieces.
|
|
//! - [`pathtools`]: Path Precision Tools' anchor edits, path readouts, extending open paths,
|
|
//! finding where paths cross, sliding anchors along their path, merging touching edges and the
|
|
//! Parametric Shape Tool's re-editable shapes.
|
|
//! - [`segment_reshape`]: bending a segment by dragging a point on it (shared by the tools that
|
|
//! reshape segments directly).
|
|
//! - [`pen`]: the Smart Pen's straight and curved segments and its point edits.
|
|
//! - [`stencil`]: Stencil Bridges, the strips cut out of art so that a stencil cut from it keeps
|
|
//! its islands attached.
|
|
|
|
pub mod cleanup;
|
|
pub mod keep_shape;
|
|
pub mod pathtools;
|
|
pub mod pen;
|
|
pub mod segment_reshape;
|
|
pub mod stencil;
|
|
|
|
pub use cleanup::{
|
|
Rejoined, close_nearly_closed, merge_duplicate_anchors, near_point_groups, rejoin, remove_collinear_anchors, retract_tiny_handles,
|
|
};
|
|
pub use keep_shape::{PT_PER_TOLERANCE, SHARP_CORNER_DEG, remove_anchor_keep_shape, simplify_anchors_keep_shape, simplify_keep_shape};
|
|
pub use segment_reshape::{ReshapeMode, reshape_segment};
|