Skip to main content

@thatopen/fragments

Enumerations

EnumerationDescription
CurrentLodEnum representing the current level of detail (LOD) for a mesh.
EditRequestTypeTypes of edit requests.
ItemConfigClassEnum representing the configuration class for an item in a Fragments model.
SnappingClassEnum representing the snapping class for a raycast operation.

Classes

ClassDescription
EditorThe Editor class provides functionality for editing and managing Fragments models. It handles operations like editing model elements, saving changes and managing edit history.
FragmentsModelThe main class for managing a 3D model loaded from a fragments file. Handles geometry, materials, visibility, highlighting, sections, and more. This class orchestrates multiple specialized managers to handle different aspects of the model like mesh management, item data, raycasting, etc. It maintains the overall state and provides the main interface for interacting with the model. The model data is loaded and processed asynchronously across multiple threads.
FragmentsModelsThe main class for managing multiple 3D models loaded from fragments files. Handles loading, disposing, updating, raycasting, highlighting and coordinating multiple FragmentsModel instances. This class acts as the main entry point for working with fragments models.
GeometryEngineThe geometry engine is responsible for generating geometry using web-ifc. It provides a high-level API to generate common BIM shapes like extrusions, sweeps, walls, and profiles.
IfcImporterAn objet to convert IFC files into fragments.
SingleThreadedFragmentsModelThe main class for managing a 3D model loaded from a fragments file in a single thread. It's designed for easy data querying in the backend, so all the 3D visualization logic is not present.

Interfaces

InterfaceDescription
AttributesInterface representing the attributes of a model item.
BaseCreateRequestBase interface for all create edit requests.
BaseEditRequestBase interface for all edit requests.
BaseUpdateRequestBase interface for all update edit requests.
CreateGlobalTransformRequestInterface for create global transform edit requests.
CreateItemRequestInterface for create item edit requests.
CreateLocalTransformRequestInterface for create local transform edit requests.
CreateMaterialRequestInterface for create material edit requests.
CreateRelationRequestInterface for create relation edit requests.
CreateRepresentationRequestInterface for create representation edit requests.
CreateSampleRequestInterface for create sample edit requests.
DeleteGlobalTransformRequestInterface for delete global transform edit requests.
DeleteItemRequestInterface for delete item edit requests.
DeleteLocalTransformRequestInterface for delete local transform edit requests.
DeleteMaterialRequestInterface for delete material edit requests.
DeleteRelationRequestInterface for delete relation edit requests.
DeleteRepresentationRequestInterface for delete representation edit requests.
DeleteSampleRequestInterface for delete sample edit requests.
ItemAttributeInterface representing the attributes of an item in a Fragments model.
ItemDataInterface representing the data of an item in a Fragments model.
ItemsDataConfigInterface representing the configuration for item data in a Fragments model.
MappedInformationResultInterface representing the result of an information query for a specific item type.
MappedResultInputInterface representing the input for a result query in a Fragments model.
MappedSelectionInputInterface representing the input for a selection query in a Fragments model.
ModelIdMapInterface representing a map of model IDs to their corresponding local IDs.
RaycastDataInterface representing the data for a raycast operation.
RaycastResultInterface representing the result of a raycast operation.
RectangleRaycastDataInterface representing the data for a rectangle raycast operation.
RectangleRaycastResultInterface representing the result of a rectangle raycast operation.
RelsModifyChangeInterface representing a change event when relations are modified in a model item.
SpatialTreeItemInterface representing an item in a spatial tree.
UpdateGlobalTransformRequestInterface for update global transform edit requests.
UpdateItemRequestInterface for update item edit requests.
UpdateLocalTransformRequestInterface for update local transform edit requests.
UpdateMaterialRequestInterface for update material edit requests.
UpdateMaxLocalIdRequestInterface for update max local id edit requests.
UpdateMetadataRequestInterface for update metadata edit requests.
UpdateRelationRequestInterface for update relation edit requests.
UpdateRepresentationRequestInterface for update representation edit requests.
UpdateSampleRequestInterface for update sample edit requests.
UpdateSpatialStructureRequestInterface for update spatial structure edit requests.
VirtualModelConfigInterface representing the configuration for a virtual model.
VirtualPropertiesConfigInterface representing the configuration for virtual properties in a Fragments model.

Type Aliases

Type aliasDescription
AttributeDataRepresents attribute data for a model item.
AttrsChangeUnion type representing all possible attribute change types.
BIMMaterialUnion type representing all possible material types.
BIMMeshUnion type representing all possible mesh types.
CreateRequestType for create edit requests.
DataBufferUnion type representing all possible data buffer types.
DeleteRequestType for delete edit requests.
EditRequestType for all edit requests.
ElementDataContainer of all the data of an element of a fragments model.
IdentifierType representing a unique identifier for a model item. This can be either a string or a number.
InformationResultTypeType representing the result of an information query for a specific item type.
ItemInformationTypeUnion type representing all possible item information types.
ItemSelectionTypeUnion type representing all possible item selection types.
MaterialDefinitionInterface representing the definition of a material.
MeshDataInterface representing the data of a mesh.
NewElementDataData defining a new element of a fragments model.
RawCircleExtrusionData defining a circle extrusion geometry (e.g. reinforcement bars).
RawGlobalTransformDataData defining a global transform of a mesh.
RawItemDataData defining a fragments item. It can be anything, from a property to property set or a physical element like a wall or a beam.
RawMaterialData defining a fragments material.
RawMetadataDataData defining metadata of the fragments model.
RawRelationDataData defining a fragments relation.
RawRepresentationData defining a representation of a geometry.
RawSampleData defining a sample (instance) of a mesh.
RawShellData defining a shell geometry (e.g. a brep).
RawTransformDataData defining a transform (local or global) of a mesh.
RelsChangeUnion type representing all possible relation change types.
ResultInputTypeUnion type representing all possible result input types.
SelectionInputTypeUnion type representing all possible selection input types.
UpdateRequestType for update edit requests.

Variables

VariableDescription
EditRequestTypeNamesNames of the edit request types (e.g. to display in a history UI).
ifcCategoryMapA map that associates each unique integer identifier (IFC Entity ID) with its corresponding category name. This map is used to map IFC entities to their respective categories for easier identification and processing.
limitOf2BytesThe maximum value for a 2-byte unsigned integer.

Functions

FunctionDescription
getObjectRecursively converts a Flatbuffers object into a plain JavaScript object. This function traverses the prototype chain of the Flatbuffers object and extracts all properties and their values, handling both primitive values and nested objects/arrays.