shapeToOverlayItems
Function in @bimworks/viewercommon.
API catalogue · @bimworks/viewercommon · Function
TypeScript#
function shapeToOverlayItemsMembers#
| Member | Kind | Description |
|---|---|---|
| shapeToOverlayItems | Method | Overlay items for a shape of a BVL or query result: an OrientedBox ({center, extent, axis1..3}), OrientedCylinder ({center, orientation, radius, height}), Or… |
shapeToOverlayItems#
TypeScript#
shapeToOverlayItems(shape: object, id: string, common?: { [field: string]: unknown }): (ShapeOverlayItem)[]Overlay items for a shape of a BVL or query result: an OrientedBox ({center, extent, axis1..3}),
OrientedCylinder ({center, orientation, radius, height}), OrientedCone (the same fields) or Sphere
({center, radius}), points and vectors as {x, y, z} in raw world mm of the shape's model (bind the
overlay to it). A box or cylinder may leave out __type. A cylinder also gets its diameter as a
dimension across the top. Empty for a shape this function does not know
Parameters#
| Name | Type | Description |
|---|---|---|
shape |
object |
|
id |
string |
|
common |
{ [field: string]: unknown } |
fields every item gets (color, qids, depth, ...); color defaults to red |