discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

OpeningGrips class final

An opening's slide grip (spec 08 D16, D15), through the render layer's object grip seam.

  • The grip: one stretch grip at the opening's drawn centre on its host's centreline, in world: its cut's centre (D8), or its stored centre when it is no-fit.
  • The drag takes the point the select tool has already resolved through its snap chain (Ruling 08-15) and:
    1. projects it onto the host's centreline, in the host's local space;
    2. applies the host's edge snaps (edgeSnap) while edgeAperture gives an aperture (object snap on): the candidates are the host's stretch ends and its other openings' drawn cuts, as the document draws them now;
    3. stores the centre of the cut the opening would get there (D8, D14's interpretation): the projected centre where it fits, storedCentreOf where it had to be clamped into a stretch, and the projection clamped to [0, L] where it fits nowhere;
    4. returns one SetComponentCommand<OpeningParams>, or null when the centre to store is the stored one, or within wallJoin.linear of it while the opening is not drawn clamped now. A clamped one (by an ulp, from a file or an older rewrite) is re-seated where it is drawn by any drag, even onto its own edge (Task 11 review I1).
  • The preview: the would-be cut's two jamb lines across the band, in world; nothing when it would be no-fit.
  • Not movable (D16): the select tool neither moves nor rotates an opening; the slide grip is how it moves.

The host's layout and openings come from the document adapter (wallsInDocument, Ruling 08-8), computed 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.

Constructors

OpeningGrips({double? edgeAperture()?})
edgeAperture returns the snap aperture in world, or null to turn edge snaps off (Ruling 08-15); by default they are off.

Properties

edgeAperture → double? Function()
The world aperture of D15's edge snaps, read at each drag event; null: no edge snap.
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 an opening (spec 08 D16); 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