Appearance
Cores
The building's vertical-circulation cores — lift, stair, and shaft shells. Read the cores in the scene and test whether a space is a core element. Accessed via snaptrude.program.cores.
Both methods are read-only host API calls that return Promises. list never throws for an empty building — it returns an empty cores array. Nothing in this namespace mutates the model.
At a glance
| Method | What it does | Mutates? |
|---|---|---|
list() | List the cores in the building | — |
isCore(id) | Whether a space is a core element | — |
Types
PluginProgramCore
A circulation core element in the building.
| Property | Type | Description |
|---|---|---|
id | string | Component id of the core element |
groupId | string | Id of the core group this element belongs to |
storey | number | Storey (floor number) the element sits on |
Functions
list()
List the cores currently in the building, with each core's id, core group, and storey.
- Returns:
{ cores: PluginProgramCore[] }— empty when there are none.
ts
const { cores } = await snaptrude.program.cores.list();
for (const core of cores) console.log(core.id, core.groupId, core.storey);isCore(id)
Test whether a space is a circulation core element.
- Parameters:
id:string— the id of the space to test
- Returns:
boolean—trueif the space is a core element.
ts
const isCore = await snaptrude.program.cores.isCore("sp_1");
console.log(isCore ? "circulation core" : "not a core");Errors
Failed calls reject with a typed PluginError — see Error Handling. This namespace has no specific error conditions: list and isCore are total reads — list returns an empty array for a building with no cores, and isCore returns false for an unknown id.
There is no cores.create on this surface — core generation is geometry-owned and is not exposed here; calling it rejects with METHOD_NOT_FOUND.