discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

DimensionGrips class final

A dimension's grips (spec 11 D13), through the render layer's object grip seam. Every coordinate is world, and every grip is a stretch grip, so it is hit and dragged only while components and geometry are allowed (07 OG5). The ordinals (R-26):

  1. the offset grip, at the dimension line's midpoint (Q0 + Q1) / 2: a drop stores offsetFor of the drop with the dimension's current kind, which the grip never changes; null when the new offset compareTos equal to the stored one;
  2. the end grip at a, at P0; 2. the end grip at b, at P1: a drop makes the dropped end D10's choice at the drop, and only that end (decision 22): the attach candidates gathered afresh against the document as it is then (attachCandidates, by position while F3 is on, decision 23; the plan's Ruling 11-8: no memo), decided by decideEnd with the current kind and the other end's current world point, or a FixedEnd at the drop in the group's local space when nothing attaches (F3 off, or no wall end point there). So an end attaches, detaches or moves to another wall end point (decision 11). The other end keeps its stored reference, and the offset is kept. Null when the new end equals the stored one, or when the result is degenerate: the two ends' points within wallJoin.linear, or the new end equal to the other end.

Each drag receives the point the select tool already resolved through its snap chain (08's Ruling 08-15) and returns one SetComponentCommand<DimensionParams>: one undo step, in which the dimension regenerates.

Preview: the would-be five lines (the dimension line, the extension lines at a and b, the slashes at a and b), in world, from layoutDimension with the would-be parameters (the plan's Ruling 11-3), computed once per pointer move; nothing when the drop would be refused as degenerate or cannot be laid out. No attach ring (R-34): a preview is world geometry and knows no camera; the select tool's snap marker shows where the drop resolves.

The per-drag memo (Task 11's review, M-2): the previews of one drag (one dimension, one grip) share the dimension as it stands, T (thickestWall) and each wall's six points, handed to attachCandidates' points map as the Dimension tool's hover memo does. So a drag sliding along a wall's line lays that wall out once, not once per move. The memo is made at the first preview of a drag and dropped at the drop, when a preview names another dimension or grip (a drag that was cancelled and another begun), and on any document change heard (doc.changes; nothing changes the document during a drag). The drop never reads it (the plan's Ruling 11-8): it gathers afresh against the document as it is then.

A broken dimension (D15: an end that does not resolve, an offset that is not finite, or a layout that is not finite) has no grips.

Movable: the select tool moves and rotates a dimension like a box (D11, R-19): a fixed end moves with its group, an attached end stays on its wall.

Constructors

DimensionGrips({required SpatialIndex index, required bool objectSnap()})

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → SpatialIndex
The shell's spatial index, which attachCandidates queries.
final
objectSnap → bool Function()
Whether object snap (F3) is on, read at each drag event: with it off nothing attaches (decision 4).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

drag(DraftDocument d, Handle group, Grip grip, Vector2 world) → DraftCommand?
The drop: afresh against the document as it is now, never the memo, which it drops (Ruling 11-8).
gripsOf(DraftDocument d, Handle group) → List<Grip>
group's grips, in world; empty when group is not one of this provider's objects. The list order is each grip's ordinal.
movable(DraftDocument d, Handle group) → bool
False when the select tool must not move or rotate the root-level group (spec 08 D16): a move or rotate skips it, as it skips a fill, the rotation grip needs some other movable key, and its body shows no move cursor. True for any group this provider does not own.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preview(DraftDocument d, Handle group, Grip grip, Vector2 world) → List<(EntityKind, GeometryPayload)>
What drag would draw, in world: the pieces a reshape preview paints, computed once per pointer move, never per frame. Empty when there is nothing to show. world is only read during the call.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited