new Model()
Creates a new analysis model.
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 elementBIM.Element The BIM element that owns the junction.
junctionBIM.Junction The wall junction to generate the surface from.
apertureBIM.Aperture The surface type for this surface.
profileArray The hole profile contour generated for the aperture.
clipPathArray 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 elementBIM.Element The BIM element that owns the polygon.
facePD.BRep.Face The BRep face to add as a surface.
surfaceTypeBIM.SURFACE The type of this surface.
Returns:
Returns a reused or new surface, or
nullif 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 elementBIM.Element The BIM element defined by the path.
pathBIM.Path The path to generate the surface from.
surfaceTypeBIM.SURFACE The surface type for this surface.
offsetnumber <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 elementBIM.Element The BIM element that owns the junction.
polygonPD.Polygon The shell polygon to add as a surface.
surfaceTypeBIM.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 elementBIM.Element The BIM element that owns the junction.
junctionBIM.Junction The wall junction to generate the surface from.
surfaceTypeBIM.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.adjacencyListproperty of both surfaces.Parameters:
Name Type Description surfaces1Array The first set of surfaces to check.
surfaces2Array The second set of surfaces to check.
tolerancenumber 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 levelBIM.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 level1BIM.Level The first level to check.
level2BIM.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 buildingBIM.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.adjacencyListproperty of both surfaces.Parameters:
Name Type Description surfaces1Array The first set of surfaces to check.
surfaces2Array 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 viewPD.ViewData The view definition to render the model within.
levelBIM.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 theBIM.Analysis.Modelclass.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 theBIM.Analysis.Surfaceclass.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