discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

WallBands class final

The walls' bands, cached for the tools that look for a wall under the pointer on every move (spec 07 D11; spec 08 D14, Ruling 08-11): the Wall tool, which joins a band it is clicked in, and the Door, Window and Gap tools, which find their host with hostAt. The shell owns one instance and hands it to all four.

Per live, non-degenerate wall, ascending by handle, _stride doubles: the world start and end (WorldWall's own s and e, so bitwise what WallType builds), the unit direction, the length, the left and right face offsets and the thickness; and the wall's handle beside them. Rebuilt only when the document reports a change (its changes stream, which delivers after the task that made the change) or a tool calls invalidate. A scan is O(walls) over the cached doubles and allocates nothing in steady state.

Constructors

WallBands()

Properties

generation → int
Bumped whenever the cache goes stale: on each of the document's changes, on invalidate, and when a different document is scanned. A tool that caches something derived from the walls compares it with the value it built at.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Cancels the document subscription. The owner calls it once.
hostAt(DraftDocument doc, double x, double y, {bool accept(DraftDocument, Handle)?}) → Handle?
The wall whose band contains the world point (x, y), the lowest handle when several do (spec 08 D14), or null. With accept, only a wall it accepts is a candidate (the Opening tools pass their layer rule, spec 12b S-11); it is called only for a wall whose band contains the point.
invalidate() → void
The next scan rebuilds the cache: a tool that has just committed, or is about to act on a click, must never see a band the document no longer has.
joinInto(DraftDocument doc, double px, double py, Vector2 out) → bool
Spec 07 D11: where the Wall tool joins the world point (px, py). When it lies in a wall's band (the lowest handle's, when several), out is set to:
liveWalls(DraftDocument doc) → List<Handle>
The live, non-degenerate walls of doc, ascending by handle (spec 09c D3, D6): what the wall faces are built from. Runs the refresh, so the first call starts the document subscription and a caller that never asked hostAt or joinInto still sees current walls; a change moves generation as before.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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