Class: Model

BIM.Analysis. Model

Defines a simulation model from a building for performance analysis and simulation.

A simulation model is a simplification of the detailed building geometry that allows for the computation of spatial adjacency and the resulting analysis of heat and air flow, as well as energy use and acoustic transmission.


new Model()

Creates a new analysis model.

Author:
  • drajmarsh

Members


:BIM.Building

building

Stores the building this model is based on.

Type

:number

defaultWallTolerance

Stores a default wall tolerance value.

Type
  • number

:boolean

isAnalysisModel <readonly>

A flag identifying this object as an analysis model.

Type
  • boolean

:BIM.Analysis.SurfaceShell

surfaceShell

A shell to create, store and manage simulation surfaces.

Type

Methods


addApertureSurface(element, junction, aperture, profile, clipPath)

Creates a surface from an aperture within an element.

Parameters:
Name Type Description
element BIM.Element

The BIM element that owns the junction.

junction BIM.Junction

The wall junction to generate the surface from.

aperture BIM.Aperture

The surface type for this surface.

profile Array

The hole profile contour generated for the aperture.

clipPath Array

The ClipperLib path generated from the profile.

Returns:

Returns an array of new or reused surfaces.

Type
BIM.Analysis.Surface

addBRepSurface(element, face, surfaceType)

Creates a surface defined by a planar BRep face within an element.

Parameters:
Name Type Description
element BIM.Element

The BIM element that owns the polygon.

face PD.BRep.Face

The BRep face to add as a surface.

surfaceType BIM.SURFACE

The type of this surface.

Returns:

Returns a reused or new surface, or null if the face is not planar.

Type
BIM.Analysis.Surface | null

addPathSurface(element, path, surfaceType [, offset])

Creates one or more surfaces by offsetting the given path.

Parameters:
Name Type Argument Description
element BIM.Element

The BIM element defined by the path.

path BIM.Path

The path to generate the surface from.

surfaceType BIM.SURFACE

The surface type for this surface.

offset number <optional>

An optional offset in the direction of the surface normal.

Returns:

Returns an array of new or reused surfaces.

Type
Array.<BIM.Analysis.Surface>

addPolygonSurface(element, polygon, surfaceType)

Creates a surface defined by a polygon within an element.

Parameters:
Name Type Description
element BIM.Element

The BIM element that owns the junction.

polygon PD.Polygon

The shell polygon to add as a surface.

surfaceType BIM.SURFACE

The type of this surface.

Returns:

Returns a reused or new surface.

Type
BIM.Analysis.Surface

addWallSurfaces(element, junction, surfaceType)

Creates a surface from the extrusion of a wall/space path segment.

Parameters:
Name Type Description
element BIM.Element

The BIM element that owns the junction.

junction BIM.Junction

The wall junction to generate the surface from.

surfaceType BIM.SURFACE

The surface type for this surface.

Returns:

Returns an array of new or reused surfaces.

Type
Array.<BIM.Analysis.Surface>

computeFloorCeilingAdjacencies(surfaces1, surfaces2, tolerance)

Calculates any areas of adjacency between floors and ceilings.

This method simply cycles through the floor and ceiling surfaces in each list and tests for areas of adjacency between surfaces of the opposite type. Any adjacencies found are added to the Sim.Surface.adjacencyList property of both surfaces.

Parameters:
Name Type Description
surfaces1 Array

The first set of surfaces to check.

surfaces2 Array

The second set of surfaces to check.

tolerance number

The maximum distance vertical surfaces can be apart.

Returns:

Returns true if any adjacencies were found.

Type
boolean

computeLevelAdjacencies(level)

Calculates areas of adjacency between the spaces on the given level.

Parameters:
Name Type Description
level BIM.Level

The level to check for spatial adjacencies.


computeLevelToLevelAdjacencies(level1, level2)

Calculates any areas of adjacency between the spaces on each given level.

Parameters:
Name Type Description
level1 BIM.Level

The first level to check.

level2 BIM.Level

The second level to check.


computeSpatialAdjacencies( [building])

Regenerates the simulation model from the given building.

This method first (re)generates simulation surfaces for all spatial elements on all levels within the building/structure. It then iterates to calculate areas of adjacency between each surface.

Parameters:
Name Type Argument Description
building BIM.Structure <optional>

An optional building to model, defaults to previous.

Returns:

Returns this model to support method chaining.

Type
BIM.Analysis.Model

computeSurfaceAdjacencies(surfaces1, surfaces2)

Calculates any areas of adjacency between the given surface lists.

This method simply cycles through the surfaces in each list and tests for areas of adjacency between them. Any adjacencies found are added to the Sim.Surface.adjacencyList property of both surfaces.

Parameters:
Name Type Description
surfaces1 Array

The first set of surfaces to check.

surfaces2 Array

The second set of surfaces to check.

Returns:

Returns true if any adjacencies were found.

Type
boolean

displayLevelAdjacencies(view, level)

Displays the spatial adjacency information for the given level.

Parameters:
Name Type Description
view PD.ViewData

The view definition to render the model within.

level BIM.Level

The level to display spatial adjacencies for.


getModelAttributeKey()

The name of the simulation model attribute key.

This method simply returns BIM.ATTRIB.ANALYSIS_MODEL, allowing other classes to access the simulation model without knowing about of referencing the BIM.Analysis.Model class.

This key is used by the simulation model to store/access computed models as an attribute of the building or structure it is derived from.


getNextPointIndex()

Retrieves the ordinal index of the next reusable 2D point in the model.

Returns:

Returns an ordinal point index.

Type
number

getSurfacesAttributeKey()

Retrieves the name of the simulation surface list attribute key.

This method simply returns BIM.ATTRIB.SURFACES, allowing other classes to access surface data without knowing about or referencing the BIM.Analysis.Surface class.

This key is used by the simulation model to store/access the list of simulation surfaces generated for a particular building element as an attribute of that element.


reuseEnd()

Trims the 2D reusable point list.

This method must be called after you have first called reuseStart() to reset the reusable point and surface indices. Its role is to trim any extra points and surfaces that have not been reused and are leftover from a previous construction.

Returns:

Returns this model to support method chaining.

Type
BIM.Analysis.Model

reuseStart()

Resets the 2D reusable point counter.

Returns:

Returns this model to support method chaining.

Type
BIM.Analysis.Model