Clash Object constructor. This object is managing a concrete Clash with all its connected clash geometry
List of the related clash elements which bear the actual geometry
Status of the clash
Clash volume
Create the visual objects for the clash Object
Parameters
objectsContainer
ObjectsContainer Container for created elementsobjectFactory
ObjectFactory Object FactoryId of the clash object.
Array of two objects which causes the clash
Clash Filter Type
Utility class to do the actual loading from the server.
Parameters
api
Object Instance of the WebSdk Api wrapper. Used to make the http requestsviewport
Viewport3D Instance of the viewport where the data should be loaded toReference to WebSDK Api wrapper
Reference to the viewport instance to load into
Error handler callback
Cancel flag - set if request has been canceled
Reset all loader states
Load the given project. Only basic project information is loaded. Geometry has to be loaded via LoadModel or LoadTopologyNode
Parameters
projectId
String Id of the project to loadLoad Project Model
Parameters
project
ProjectContent Parent projectmodel
ProjectModel Model to loadlayers
Array<ProjectLayer> Array of layers which shall be loadedLoad a set of layers for all models of the project
Parameters
project
ProjectContent Parent projectlayers
Array<ProjectLayer> Array of layers which shall be loadedLoad content into the navigation map
Parameters
projectId
modelRevisions
visibleLayers
Array<String> Array of layers which shall be loadedvisibleTypes
Array<String> Array of object types which should be shownproject
ProjectContent Parent projectLoad clashes for the given project
Parameters
project
ProjectContent ProjectLoad geometry and all necessary information for a given
Parameters
project
ProjectContent Projectnode
ProjectTopologyNode Topology leaf nodelayers
Array<ProjectLayer> Array of layersloadTemplates
Boolean Load required templates from server on/off (optional, default true
)loadObjectTree
Boolean Load node's obejct tree on/off (optional, default true
)objectsFilter
Boolean Additional filter to remove objects (optional, default undefined
)objectTreeFilter
(optional, default undefined
)This is used to load all data including geometry into an ObjectContent instance. This is used for the preview rendering in the properties panel.
Parameters
objectId
String Object IdrevNr
Number Revision number (optional, default 1
)checkClashVisibilityCallback
Function Callback to calculate the clash elements visibility defined in the clash moduleMakes head request to server to check if models have been modified
Parameters
model
ProjectModel Model to check for modificationMakes head requests to server to check if models have been modified
Parameters
models
Array<ProjectModel> Array of models to check for moficationChecks if models have been modified and reloads all required information if necessary
Parameters
project
ProjectContent Projectmodels
Array<ProjectModel> Array of modelsReload clash elements including the geometry based on the clash filter response
Parameters
project
ProjectContent ProjectfilterId
String Id of the clash filterfilterResponse
Object Response of the clash filter APIReload all project clashes
Parameters
project
ProjectContentReload revision compare elements of the given model
Parameters
project
ProjectContent Projectmodel
ProjectModel ModelCancel the loading process
Pick object using GPU acceleration.
Highlight class constructor.
Creates an instance of the highlight class which encapsulates the highlighting for vertices, faces and edges
Parameters
activeObjColor
{Object} Color of the highlightmaxLineWidth
cursorTexture
{Object} Texture of the vertex highlighting cursorThe Allplan Bimplus renderer provides easy to use loading and rendering of Bimplus project data. It has been tuned to be able to load and display large models. This is also the renderer core used for the Bim Explorer and is also available for external app development.
Checks if a layer is in the set of internal layers
Parameters
id
String Layer IdNavigationMap constructor.
Parameters
settings
api
domElementId
Parameters
viewport
Viewport3D Viewport instanceParse the API response of the object topology
Parameters
Factory class for the various types of objects
Create a VisualObject instance
Parameters
params
Object Creation parametersCreate a ClashObject instance
Parameters
params
Object Creation parametersCreate a RevisionCompareObject instance
Parameters
params
Object Creation parametersContainer to store the actual project objects
Reset the container content
Init all objects for the given viewport
Parameters
viewport
Viewport3D ViewportAdd a VisualObject instance to the container
Parameters
vObj
VisualObject Instance to addRemove a VisualObject instance from the container For performance reasons it is possible to set the deferredRemoval flag. This speeds up the oparation a lot but an after removing all objects a call to deferredRemoveObjects has to be made.
Parameters
obj
VisualObject Object to removeremoveChildlessParent
Boolean Remove also parent if object is the last child (optional, default true
)removeChildren
Boolean Remove all children from the container (optional, default false
)deferredRemoval
Boolean If this flag is set, the obejcts won't be removed from the array but substituted with null (optional, default false
)Removes an array of objects from the container
Parameters
objects
Array<VisualObject> Array of objects to removeremoveChildlessParent
Boolean Remove also parent if object is the last child (optional, default true
)Remove all null values from the objects array - this is the preprocessing step after removeObject with deferredRemoval enabled
Returns the count of VisualObject instances inside the container
Get the Object with the given Id
Parameters
id
String Object IdGet the objects with the given ids
Parameters
Loop through all contained objects and call the given function
Parameters
func
Function Function to execute for each objectskipVirtualObjects
Boolean Flag to ignore virtual objects in the loop (optional, default true
)Get the object at the given index
Parameters
index
NumberGet the root object
Parameters
vObj
VisualObject Source objectsGet the parent object
Parameters
vObj
VisualObject Source objectTraverse the object tree upwards and call the function for every instace
Parameters
obj
VisualObject Start objectfunc
Function Function to executeTraverse the object tree downwards and call the function for every instace
Parameters
obj
VisualObject Start objectfunc
Function Function to executeGet the objects array
Run a callback function on all objects and the corresponding children
Parameters
object
VisualObject Start objectcallback
Function callback functionMeta
Get all objects associated with the object with the given id
Parameters
objectId
String Source object idMeta
Add a ClashObject instance to the container
Parameters
clash
ClashObject Clash to addGet the ClashObject instance with the given id
Parameters
id
String ClashObject idGet the number of ClashObjects
Remvoe a ClashObject instance from the container
Parameters
id
StringRemove all ClashObject instances
Loop through all ClashObjects and run the function
Parameters
func
Function Callback functionAdd a RevisisonCompareObject to the container
Parameters
obj
RevisionCompareObject Object to addRemove all RevisionCompareObject instances
Get the RevisionCompareObject with the given id
Parameters
id
String Object idLoop through all RevisionCompareObjects and run the function
Parameters
func
Function Callback functionRoot class for all project related data
Parameters
viewport
Viewport3D ViewportAdd a ProjectModel instance to the project
Parameters
model
ProjectModel Model to addGet the model with the given id
Parameters
id
String Model idGet all models of the project
Find a specific model based on the filter function
Parameters
func
Function Filter functionRun function for each project model
Parameters
func
Function Function to runGet the topology leaf node with the given id
Parameters
nodeId
String Node idRun function for each topology leaf node
Parameters
func
Function Function to runParst the response from the project API
Parameters
r
Object API responseDispose all clash objects belonging to a certain filter
Parameters
filterId
String Clash filter idDispose all objects of the given layer
Parameters
layerId
String Layer id to disposeDispose geometry of the given layer
Parameters
layerId
String Layer idDispose all clash object
Dispose all revision compare objects
Parse the repsonse of the clash filter API
Parameters
Parse the result of the revision comparision API
Parameters
r
Object ResponseParse the response of the project topology API
Parameters
r
Object ResponseParse the response of the object topology API
Parameters
Parse the response of the geometry template API
Parameters
Unload the the given topology node's geometry for the given discipline and revision
Parameters
Unload all nodes and objects of a given model of the given revision
Parameters
model
ProjectModel Model to unloadrevNr
Numer Revision numberonlyObjects
Boolean unload only the objects without clearing the model dataGet the discipline geometry node for the layer
Parameters
node
ProjectTopologyNode Nodelayer
ProjectLayer LayerParameters
Get the parent project
Get the parent model
Set the parent modal
Parameters
m
ProjectModel ModelChecks if the layer is marked as internal
Converion function to support old data input
Meta
Get the layers discipline nodes
Set the layer to be in background
Parameters
value
Boolean Background true/falseCheck if the layer is currently set to background
Set layer visiblity
Parameters
value
Boolean Visisble true/falseChecks if the layer is visible
Set the layer to be shown in a custom color - if value is no color the object colors are restored
Parameters
value
Object ColorGet the currently set user color
Set the custom opacity for the layer. Pass undefined to reset to object opacity.
Parameters
value
Number Opacity between 0.0 (fullt transparent) and 1.0 (fully opaque)Get the current custom layer opacity
ProjectModel class represents a model inside a project
Parameters
project
ProjectContent Projectid
String Model idtopoId
String Division Topology idname
String Model namelayers
Array<ProjectLayer> array of layers within the modelGet parent project
Add layer to the model
Parameters
layer
ProjectLayer LayerGet the layer with the given id
Parameters
id
String Layer idGet the clash layer of the model
Get the model's revision compare layer
Get the array of layers
Loop through each layer and run given function
Parameters
func
Function Function to executeSet the currently active revision for the model
Parameters
rev
Number RevisionGet the currently active revision
Check if model has revisions
Add a topology leaf node to the model
Parameters
node
ProjectTopologyNodeGet all attached topology leaf nodes
Get the topology leaf node
Parameters
id
String Node idLoop through all attached topology leaf nodes and call the given function
Parameters
func
Function Function to run on each nodeParse the project topology subtree
Parameters
tree
Object SubtreeClear the model data
Set model visibility
Parameters
value
Boolean Visisble true/falseClass Represents a leaf node of the topology tree
Parameters
model
ProjectModel Parent modelid
String Node idname
String Node nameChecks if given layer has geometry loaded or not
Parameters
layer
ProjectLayer LayerSet or reset the geometry loaded flag for the given layer
Parameters
layer
ProjectLayer Layervalue
Boolean Loaded true/false (optional, default true
)Set the node's visiblity
Parameters
value
Boolean Node visisble true/falseChecks if the node is currently visible
Set a given layer's visibility for the current node
Parameters
layer
ProjectLayer Layervalue
Boolean Visisble true/falseChecks if the layer of the node is visisble
Parameters
layer
ProjectLayer Layer to check visibilityGet the node's corresponding geomtry node
Get the node's corresponding discipline node
Parameters
layer
ProjectLayer LayerDispose the layer geometry for the node
Parameters
layer
ProjectLayer Layer for which to dispose the geometryGet the node's parent model
Set layer user color - use null to reset it
Parameters
layer
ProjectLayer Layer for which to set the user colorvalue
Array RGB color arrayGet layer user color - returns null if no user color is set
Parameters
layer
ProjectLayer Layer for which to get the user colorSet layer user opacity - use null to reset it
Parameters
layer
ProjectLayer Layer for which to set the user opycityvalue
Array Opacity value (0..1)Get layer user opacity - returns null if no user opacity is set
Parameters
layer
ProjectLayer Layer for which to get the user opacityThis class represents the Revision comparison object which holds the information of the actual compared objects
Viewport class constructor.
Parameters
p
{object} set of initialization parameters,Normalization factor to scale down the project to an appropriate size to get rid of rendering artifacts
Bounding box of the drawing. {x, y, z} -- center point of the box (camera look at) {w, d, h} -- width, depth and height of the box
Initialize renderer. A part of init() method
Parameters
r
{object} set of render parametersDispose the viewport and all loaded content
Set the Viewport content
Parameters
content
ViewportContent Used contentCheck if multiselection is active (ctrl pressed)
show the boundingbox of a given division
Parameters
divTopoId
{object} division topo node idhide the boundingbox of a given division
Parameters
divTopoId
{object} division topo node idSet visibilty for given divisions and adjust scene viewbox accordingly
Parameters
divTopoId
{object} division topo node idvisible
{Boolean} division visibleallowRecalc
Move the camera to zoom to the given sphere
Parameters
boundingSphere
Object Bounding sphereCalculate the overall bounding box of a list of objects
Parameters
Adjust camera position to fit all objects in the view frustum
Parameters
Create clippingbox around the selected objects or the working objects
Parameters
ignoreSelection
Boolean True : Take the working set objects, false : Take the selection set (optional, default false
)Isolate the objects and put the other ones in the background
Parameters
Add the objects to the working set
Parameters
objects
Array<VisualObject> Objects to move to working setRemove the objects from the working set
Parameters
objects
Array<VisualObject> Objects to remove from the working setAdd the objects to the selected set
Parameters
objects
Array<VisualObject> Objects to move to selected setAdd the objects to the hidden set
Parameters
objects
Array<VisualObject> Objects to move to the hidden setAdd the objects to the colored set and set paint it in the given custom color
Parameters
objects
Array<VisualObject> Objects to move to the colored setcolor
Object ColorDispose the isolated set
Make isolated set from the objects in the working set
Restore selection color based on the objects in the selected set
Hide the objects which are not in the working or selected set
Reset hidden isolate mode
Hides the objects with the given ids
Parameters
Get id of 3D object currently selected in the viewport. Check all three object types: simple object, grouped geometry and clash objects.
Returns String id object id
Get list of all selected object ids
Parameters
id
Returns any
Get object revision.
Parameters
id
Object idReturns any
Highlight object by id. Used in object navigator and in object details view for highlighting object in 3D viewport when respective object selected in the topology or in the grid.
Parameters
id
String Id of the objectmultiselect
Boolean Flag to use multiselect (Ctrl)skipBubbleUp
Boolean Flag to forward selection to parent or notHighlight objects by id. Used in object navigator and in object details view for highlighting object in 3D viewport when respective object selected in the topology or in the grid.
Parameters
ids
Array<String> Ids of the objectsmultiselect
Boolean Flag to use multiselect (Ctrl)skipBubbleUp
Boolean Flag to forward selection to parent or notDispose single pin object. Used in pinListController to remove particular pin object from isolated set.
Parameters
object
{Object} object objectcallback which is called everytime the selection mode has been changed
Parameters
handler
Set selection mode. Set selection mode array according to viewport settings:
Parameters
mode
{String} selection mode nameReturns Viewport3D Viewport3D class
Unset selection mode. Unset particular selection mode and prepare environments to updated mode.
Parameters
mode
{String} mode nameReturns Viewport3D Viewport3D class
Switch isolation mode on
Switch isolation mode off
Create colored object set out of the given objects
Parameters
objects
Array<VisualObject> ObjectsReset selection mode. Reset selection, dispose isolated mesh, remove sectioning and selection, show hidden objects and reset selection mode to default.
Returns Viewport3D Viewport3D class
Check selection mode. Check if selection mode present in the modes array.
Parameters
mode
{String} name of selection modestrict
{Boolean} strict check, if selection mode exactly match to givenReturns boolean
Get the current rotation center
Set the current rotation center
Parameters
c
THREE.Vector3 centerSet camera reset axis. Set axis, which will be used on camera reset. Used to show different model views like front, top, side, perspective.
Parameters
a
{String} axis, i.e. 'x', 'y', 'z'Set section axis. Set axis (x, y, z) which will be used in section view, recreate visible section plane object, update environment variables.
Parameters
a
{String} axis, i.e. 'x', 'y', 'z'Set viewport size. Reset viewport size according to the container size. Used when any viewport size updates are made, f. e. on main window resize or DOM layout change. If width or height are not passed explicitly the innerWidth or height is taken from the viewport's domElement
Parameters
Reset viewport. Dispose model and reset viewport setting to default. Used when new model must be loaded.
Restore viewbox. Restore viewbox size to saved size and reinitialize camera.
Reset camera. Recalculate scene and camera parameters and set them according to default or given model bounding box, make camera fly effect to defined position.
Parameters
fly
{Boolean} if fly effect should be appliedvb
{Object} bounding boxSet controls target (rotation center) to object's center.
Parameters
oid
{String} object idfly
{Boolean} if transition must be done softlyCalculate bounding box of the object. Applied to simple object (one geometry) and complex geometry with cjild / related -- including all children objects.
Parameters
oid
{String} object idToggle disciplines opacity. Make all disciplines transparent or restore initial discipline opacity. Used in isolated mode.
Parameters
restore
{Boolean} if initial discipline opacity must be restoredignoreVisibility
Returns Viewport3D reference to Viewport3D class instance
Toggle object node (visibility). Used in object details view. Make all node children visible / invisible according to parent visibility.
Parameters
node
{Object} object node objectToggle object node (opacity). Used in object details view. Make all node children visible / invisible according to parent visibility.
Parameters
node
{Object} object node objectSet discipline opacity. Check if node exists and set its transparency to given or default value.
Parameters
discipline
{Object} discipline objectopacity
{Number} number 0..1Update status info widow. Show debug information in the debug window if debug mode active.
set function used for text localization
Parameters
locFnc
Define Viewport3D prototype and common properties and methods for all instances.
Measure interactor, used to create dimension lines
Parameters
vp
{Object} ViewportBase class for user interactions with scene
Parameters
vp
{Object} ViewportMeta
Parameters
object
domElement
localElement
Meta
released under MIT License (MIT)
Meta
Calculates the projection of 3D point onto the near plane in NDC coordinates
Parameters
pos
{Object} 3D Pointprojector
{Object} Projectorcamera
{Number} CameraBase class for viewport content
Parameters
viewport
Viewport3D ViewportThis is the class representing an object in the view
Initialize the object
Parameters
viewport
Viewport3D Viewportindex
Number Index of the object inside the ObjectsContainerShallow clone the object
Copy object data from another instance
Parameters
o
VisualObject Source objectAdd a relation the object
Parameters
Check if object has a relation
Parameters
Get all relations with given name
Parameters
name
String Relation nameAdd object as child to this object
Parameters
child
VisualObject Child objectRemove a child object from this object
Parameters
child
VisualObject Child objectAdd object as child geometry to this object
Parameters
child
VisualObject Child geometry objectRemove a child geometry object from this object
Parameters
child
VisualObject Child geometry objectChecks if the object's discipline node is visible
Parameters
viewport
Get the corresponding discipline node
Parameters
viewport
Viewport3D ViewportGet the corresponding discipline node mesh
Parameters
viewport
Viewport3D ViewportGet the corresponding mesh
Parameters
viewport
Viewport3D ViewportGet the mesh geometry
Parameters
viewport
Viewport3D ViewportGet a vertex attribute data array
Parameters
viewport
Viewport3D Viewportattrib
String Attribute nameGet the vertex positions array
Parameters
viewport
Viewport3D ViewportSet the vertex attribute to given values
Parameters
viewport
Viewport3D ViewportattribName
String Attibute namevalues
Array Vertex attribute valuesGet the number of triangles
Get the object's start index
Hide the object
Parameters
viewport
Viewport3D ViewportShow the object
Parameters
viewport
Viewport3D ViewportSet isolation mode on or off for this object
Parameters
viewport
Viewport3D Viewportisolate
Boolean Isolate on or offGet isolatation flag
Parameters
viewport
Viewport3D ViewportSet the force object color flag. If set, object won't be affected by any color changes. Its always drawn in object color.
Parameters
viewport
Viewport3D Viewportforce
Boolean Force object color on/offGet force object color flag
Parameters
viewport
Viewport3D ViewportSet object background flag
Parameters
viewport
Viewport3D Viewportbackground
Boolean Put object to background true/falseGet the object background flag
Parameters
viewport
Viewport3D ViewportReset all object flags
Parameters
viewport
Viewport3D ViewportPaint the object in the given color or reset to original color by passing no color value
Parameters
viewport
Viewport3D Viewportcolor
Object ColorSet the object's color to a custom one
Parameters
viewport
Viewport3D Viewportcolor
Object ColorReset the custom color to the object's original color
Parameters
viewport
Viewport3D ViewportCheck if this objects has own geometry
Get the object's bounding box