OpeningGrips class final
An opening's slide grip (spec 08 D16, D15), through the render layer's object grip seam.
- The grip: one
stretchgrip 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:
- projects it onto the host's centreline, in the host's local space;
- 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;
- 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; - returns one
SetComponentCommand<OpeningParams>, or null when the centre to store is the stored one, or withinwallJoin.linearof 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()?})
-
edgeAperturereturns 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
gripofgrouptoworld, or null when that drag is refused (a degenerate result, say).worldis only read during the call. -
gripsOf(
DraftDocument d, Handle group) → List< Grip> -
group's grips, in world; empty whengroupis 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.
worldis only read during the call. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited