mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 20:23:53 +00:00
Dimension tool: linear dimensions measure horizontally, vertically or aligned
A linear dimension between two clicked points, or dragged out from a segment, always measured the straight distance between its points and drew its line parallel to them, so two points at different heights gave only a slanted dimension. The linear dimensions help describes aligned, horizontal and vertical linear dimensions: after the second click, clicking again gives an aligned one and moving the pointer gives a horizontal or vertical one. https://helpx.adobe.com/illustrator/desktop/measure-and-align/plot-and-measure/plot-linear-dimensions-of-objects.html While a linear dimension is being placed, the pointer's position sets whether it is aligned, horizontal or vertical. The rule is VectorCraft's own. With the pointer beside the two points (the nearest point of the line through them lies between them) or on that line, the dimension is aligned. Past either point, the line through the points and the perpendicular through that point bound a quarter on each side of the line. The quarter that holds the direction straight up or down gives the horizontal distance, and the quarter that holds the direction straight left or right gives the vertical distance. A click within reach of the second point, or of where the pointer was for the second click, places it aligned. Points on one horizontal or vertical line give an aligned dimension. The dimension stays linked to the anchors it measures. - Dimension recipes carry an orientation (aligned by default; files without it open as before). The line runs along the axis, and each extension line runs from its point to it. - dimension.create and dimension.update take orientation: aligned, horizontal or vertical, for linear dimensions only. Any other value is an error. A new orientation keeps the line on the side of the points it was on, and an update that changes nothing records no undo step. - A horizontal or vertical dimension keeps its orientation when it or the art it measures turns, and shows 0 when its points come into line across its axis. A line that lay outside the points stays outside them after a turn. - The hint bar names the two-click placement. Docs: docs/dimensions.md, the Evidence list in docs/target-app-parity.md.
This commit is contained in:
+27
-2
@@ -11,6 +11,26 @@ The **Dimension Tool** is in the Modify section of the toolbar. Its strip offers
|
||||
curved segment is measured from end to end. With Smart Guides on, both points also snap into line with other objects'
|
||||
anchors and centres, and the second onto the construction guides through the first; the guides
|
||||
show while hovering, before each click.
|
||||
A linear dimension is aligned, horizontal or vertical, as the
|
||||
[linear dimensions help](https://helpx.adobe.com/illustrator/desktop/measure-and-align/plot-and-measure/plot-linear-dimensions-of-objects.html)
|
||||
describes: after the second click, clicking again places an aligned dimension, and moving the
|
||||
pointer away gives a horizontal or vertical one. Which one a pointer position gives is
|
||||
VectorCraft's own rule. When the pointer is beside the two points (the nearest point of the
|
||||
line through them lies between them) or on that line, the dimension is aligned. When the
|
||||
pointer is past either point, the line through the points and the perpendicular through that
|
||||
point divide the area beyond it into two quarters, one on each side of the line. The quarter
|
||||
that contains the direction straight up or down from the point gives the horizontal distance,
|
||||
and the quarter that contains the direction straight left or right gives the vertical distance.
|
||||
A click within 8 pixels of the second point, or of where the pointer was for the second click,
|
||||
places an aligned dimension. Two points on one horizontal or vertical line always give an
|
||||
aligned dimension. A dragged segment uses the same rule with its two ends.
|
||||
A horizontal or vertical dimension keeps its orientation when it or the art it measures turns,
|
||||
and shows the new horizontal or vertical distance, as the help describes for rotated objects. It
|
||||
shows 0 when its points lie on one line across its axis. When the line of a linked dimension
|
||||
lies outside its points, the line stays on the same side of the art, as far past the outermost
|
||||
point as before. An unlinked dimension that
|
||||
turns has its line where the turn puts it, or, when that would put it between the points, as
|
||||
far past the outermost point as before.
|
||||
- **Angular:** hover a corner where two straight segments meet and drag outwards. Or click two
|
||||
straight lines that meet (or would, extended), then click to place.
|
||||
- **Radial:** hover a circle, or a segment that is a perfect arc, and drag: outwards gives its
|
||||
@@ -55,8 +75,13 @@ document.
|
||||
## Commands
|
||||
|
||||
- `dimension.create`: two points, or a source (segment, angle, circle, arc, points), the mode,
|
||||
offset and style; returns the group id and label.
|
||||
- `dimension.update`: restyle or move existing dimensions.
|
||||
the orientation of a linear dimension (`aligned`, the default, `horizontal` or `vertical`),
|
||||
offset and style; returns the group id and label. `offset` is the distance of the dimension
|
||||
line from the first point: along the left normal of a → b for an aligned dimension, downward
|
||||
for a horizontal one and leftward for a vertical one. A negative offset goes the other way.
|
||||
- `dimension.update`: restyle or move existing dimensions, or change the orientation of linear
|
||||
ones. A new orientation keeps the line on the side of the points it was on. An update that
|
||||
changes nothing records no undo step.
|
||||
- `dimension.applyToAll`: every dimension takes one dimension's style, in one undo step.
|
||||
- `tool.select {"tool":"dimension"}` and
|
||||
`tool.setOption {"tool":"dimension","values":{"mode":"linear","style":{"units":"mm","scale":"1:10"}}}`
|
||||
|
||||
@@ -564,6 +564,7 @@ since 2026-10-01.
|
||||
|
||||
**Drawing tools — Polygon and Star counts:** The existing canvas placement dialog reads the stored count and saves it only after successful placement. `polygon_and_star_canvas_counts_persist_without_new_toolbar_dialogs` covers both tools, repeated drags, tool switching, reopening and Cancel. Counts remain session tool options. Existing click and toolbar gestures are retained; no score or hour change.
|
||||
**Drawing tools, Star inner radius held with Ctrl/Cmd:** While a star is dragged out, Ctrl/Cmd keeps the inner radius the star showed when the key went down, also when the key is pressed with the pointer still. `a_star_drag_holds_its_inner_radius_with_ctrl_and_straightens_with_alt` and `a_star_drag_holds_the_inner_radius_it_shows_when_ctrl_goes_down` cover it, with Alt's straight shoulders and a drag canceled with Escape.
|
||||
**Drawing tools, Dimension tool horizontal and vertical linear dimensions:** A linear dimension between two clicked points or dragged out from a segment is aligned, horizontal or vertical, chosen by where the pointer moves while it is placed, and a click again by the second point gives aligned; `dimension.create` and `dimension.update` take `orientation`, and the dimension stays linked to the anchors it measures, keeps its orientation when it or the art turns, with a line that lay outside the points kept outside them; an unlinked horizontal or vertical dimension that is reflected has its line on the reflected side. `the_pointer_chooses_aligned_horizontal_or_vertical`, `two_points_measure_horizontally_vertically_or_aligned`, `clicking_again_by_the_second_point_places_an_aligned_dimension`, `a_segment_drag_measures_horizontally_vertically_or_aligned`, `points_on_a_vertical_line_measure_aligned`, `horizontal_and_vertical_dimensions_draw_lines_along_their_axis`, `turned_horizontal_dimensions_stay_horizontal`, `a_linked_horizontal_dimension_keeps_its_gap_from_turned_art`, `a_linked_horizontal_dimension_below_or_between_its_points_follows_turned_art`, `a_reflected_horizontal_dimension_keeps_its_line_on_the_reflected_side`, `a_dimension_without_an_orientation_reads_as_aligned`, `dimension_orientation_is_checked` and `a_turned_dimension_keeps_its_line_on_its_side` cover it.
|
||||
**Live trace result bounds and selection highlights exclude the retained bitmap except in source-image views:** `live_trace_result_bounds_exclude_the_retained_bitmap_at_any_angle` checks every TraceView, geometric and visual bounds and rotated result bounds. `live_trace_selection_highlight_excludes_the_retained_source_rectangle` checks result highlights and the existing ordinary-group policy. Shared editing-child traversal also preserves Shaper handling.
|
||||
**Artboard Options shares existing presets and orientation controls and can fit artwork without moving it; artwork fitting includes all drawn document art across artboards and off-board; artwork bounds are cached by active document and revision, and selection uses the shared bounds cache across artboards:** Shared existing preset definitions are reused; no external preset assets are added. Presets preserve each selected artboard's orientation, and orientation choices apply even when the active board already matches. Fit operations draft bounds until OK, affect only the active artboard and leave artwork in place. Regression coverage checks draft/Cancel, selected-set application, active-only fitting and Undo.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user