Doors & windows
Opening interface
Doors and windows are the same thing under the hood in Smplrspace, we call them wall "openings". Multiple queries in this page return objects of the type Opening
described below:
interface Opening {
id: string;
name: string;
dimensions: {
width: number;
height: number;
baseHeight: number;
};
options: object;
coordinates: {
levelIndex: number;
x: number;
z: number;
elevation: number;
}[];
}
id
- unique identifier of this particular opening.name
- name given to the furniture in the editor. It could be an empty string.dimensions.width
- horizontal width of the opening in centimeters.dimensions.baseHeight
- distance between the ground and the bottom of the opening. It is usually 0 for doors and positive for windows.dimensions.height
- distance between the bottom and the top of the opening.options
- contains all sorts of options selected in the editor and used to render the opening.
getAllDoorsInSpace
To list all doors from a space, you can call the following query.
smplrClient.getAllDoorsInSpace(id: string): Promise<Opening[]>
id
- unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".Opening
- this main interface is described here.
getAllDoorsInSpaceFromCache
This is the synchronous equivalent of the query right above.
smplrClient.getAllDoorsInSpaceFromCache(id: string): Opening[]
where id
and Opening
are as defined in getAllDoorsInSpace
.
getDoorsOnLevel
To list all doors from a single level in a space, you can call the following query.
smplrClient.getDoorsOnLevel({
spaceId: string,
levelIndex: number
}): Promise<Opening[]>
spaceId
- unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".levelIndex
- zero-based index of the level. Refer to the Opening interface to learn more.Opening
- this main interface is described here.
getDoorsOnLevelFromCache
This is the synchronous equivalent of the query right above.
smplrClient.getDoorsOnLevelFromCache({
spaceId: string,
levelIndex: number
}): Opening[]
where spaceId
, levelIndex
, and Opening
are as defined in getDoorsOnLevel
.
getAllWindowsInSpace
To list all windows from a space, you can call the following query.
smplrClient.getAllWindowsInSpace(id: string): Promise<Opening[]>
id
- unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".Opening
- this main interface is described here.
getAllWindowsInSpaceFromCache
This is the synchronous equivalent of the query right above.
smplrClient.getAllWindowsInSpaceFromCache(id: string): Opening[]
where id
and Opening
are as defined in getAllWindowsInSpace
.
getWindowsOnLevel
To list all windows from a single level in a space, you can call the following query.
smplrClient.getWindowsOnLevel({
spaceId: string,
levelIndex: number
}): Promise<Opening[]>
spaceId
- unique identifier of the space in Smplrspace, something like "fbc5617e-5a27-4138-851e-839446121b2e".levelIndex
- zero-based index of the level. Refer to the Opening interface to learn more.Opening
- this main interface is described here.
getWindowsOnLevelFromCache
This is the synchronous equivalent of the query right above.
smplrClient.getWindowsOnLevelFromCache({
spaceId: string,
levelIndex: number
}): Opening[]
where spaceId
, levelIndex
, and Opening
are as defined in getDoorsOnLevel
.
Need any other data?
Get in touch with any use-case that would require new queries to be exposed.