discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

RoomGrips class final

A room's label grip (spec 10 D21, S-10, R-22, R-26), through the render layer's object grip seam. Every step is in a named frame: _w world, _l the room group's local space.

  • The grip: one stretch grip at the labels' anchor, in world: anchor_w = toWorld(q) − (0, 0.7 · h_name_w), q the name TEXT's stored insertion point (local) and h_name_w the name's world height, kRoomNamePaperMm × the page's scale (D11; the app's opening page when the root carries none, R-14). D10 offsets the two lines from the anchor in world directions, so the offset is taken off in world, after toWorld, never from q in local space.

  • The pole, local: pole_l = toLocal(anchor_w) − label, label (0, 0) when auto (or not finite, which the room draws as auto, D2).

  • The drag takes the point the select tool has already resolved through its snap chain (08's Ruling 08-15), p_w, and stores:

    • null (auto) when |p_w − toWorld(pole_l)|, in world, is within aperture (R-26: the one way back to auto). The shell's aperture is the snap aperture at the camera's scale whatever F3 says (Ruling 10-17): a reset gesture, not a snap;
    • otherwise label = toLocal(p_w) − pole_l.

    One SetComponentCommand<RoomParams>, or null when the drop stores what is stored (a drop on the grip itself included: the label stays where it is, bit for bit).

  • The preview: a line from the pole to the would-be anchor, in world; nothing when the drop returns the label to auto.

  • Not movable (R-22): the select tool neither moves nor rotates a room. A group move would carry the seed into another face, silently re-seating the room, or into a wall, deleting it.

The name TEXT is found among the room's own leaves at each call: grips are built at selection-change and document-change rate, and a drag's calls at pointer-move rate, never per frame. preview reuses the state it computed for the grip being dragged.

Constructors

RoomGrips({required double aperture()})

Properties

aperture → double Function()
The world radius about the pole within which a drop returns the label to auto, read at each drag event.
final
hashCode → int
The hash code for this object.
no setterinherited
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 one command that moves grip of group to world, or null when that drag is refused (a degenerate result, say). world is only read during the call.
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 for a room (R-22); true for any other group.
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