place
Import from bear/engine/place.
Interfaces
PlacedRole
Defined in: bear/engine/place.ts:45
One resolved connection role, in the connector's parent frame.
The member is published as its own extents and its pose, never as the
box it casts in this frame: a 4x6 post turned 45 degrees casts a box
6 3/8in square, which is neither of its faces. Nothing is derived here
that a connector could not derive, and nothing is dropped that only
this frame knows. blueprints/connectors/members.ts reads it.
Properties
| Property | Type | Description |
|---|---|---|
extents | Box | The member's own box, in its own frame: the section it was cut to. |
node | TreeNode | - |
plane? | WorldPlane | Present exactly when the author named a port (a Ref target). |
pose | TransformMatrix | The member's pose in the connector's parent frame. |
Type Aliases
PlacedRoles
type PlacedRoles<Roles> = Record<Roles, PlacedRole>;Defined in: bear/engine/place.ts:60
A connector's resolved roles, keyed by the role names its part declares.
Roles is a literal union for a part with a stated contract, so
roles.header is the header and a typo is a compile error.
Type Parameters
Functions
placeFromRoles()
function placeFromRoles(
node,
frame,
elementMap,
findings
):
| TransformMatrix
| undefined;Defined in: bear/engine/place.ts:76
The pose a connector derives from its resolved roles, if it has a
place callback and wired roles; undefined otherwise, or on failure
(reported as a finding on the connector).
Resolving the roles is also the moment the part can say whether it
physically suits them, so the part's check runs here off the same
resolution: one walk of the roles, one findings sink, no second pass
that would have to resolve them again. Both run only once every role
the part declares has a target, so neither has to ask whether it does.
Parameters
| Parameter | Type |
|---|---|
node | TreeNode |
frame | TreeNode | null |
elementMap | ReadonlyMap<BearElement<object>, TreeNode> |
findings | Findings |
Returns
| TransformMatrix
| undefined