@thatopen/fragments
Enumerations
| Enumeration | Description |
|---|---|
| CurrentLod | Enum representing the current level of detail (LOD) for a mesh. |
| EditRequestType | Types of edit requests. |
| ItemConfigClass | Enum representing the configuration class for an item in a Fragments model. |
| SnappingClass | Enum representing the snapping class for a raycast operation. |
Classes
| Class | Description |
|---|---|
| Editor | The Editor class provides functionality for editing and managing Fragments models. It handles operations like editing model elements, saving changes and managing edit history. |
| FragmentsModel | The 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. |
| FragmentsModels | The 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. |
| GeometryEngine | The 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. |
| IfcImporter | An objet to convert IFC files into fragments. |
| SingleThreadedFragmentsModel | The 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
| Interface | Description |
|---|---|
| Attributes | Interface representing the attributes of a model item. |
| BaseCreateRequest | Base interface for all create edit requests. |
| BaseEditRequest | Base interface for all edit requests. |
| BaseUpdateRequest | Base interface for all update edit requests. |
| CreateGlobalTransformRequest | Interface for create global transform edit requests. |
| CreateItemRequest | Interface for create item edit requests. |
| CreateLocalTransformRequest | Interface for create local transform edit requests. |
| CreateMaterialRequest | Interface for create material edit requests. |
| CreateRelationRequest | Interface for create relation edit requests. |
| CreateRepresentationRequest | Interface for create representation edit requests. |
| CreateSampleRequest | Interface for create sample edit requests. |
| DeleteGlobalTransformRequest | Interface for delete global transform edit requests. |
| DeleteItemRequest | Interface for delete item edit requests. |
| DeleteLocalTransformRequest | Interface for delete local transform edit requests. |
| DeleteMaterialRequest | Interface for delete material edit requests. |
| DeleteRelationRequest | Interface for delete relation edit requests. |
| DeleteRepresentationRequest | Interface for delete representation edit requests. |
| DeleteSampleRequest | Interface for delete sample edit requests. |
| ItemAttribute | Interface representing the attributes of an item in a Fragments model. |
| ItemData | Interface representing the data of an item in a Fragments model. |
| ItemsDataConfig | Interface representing the configuration for item data in a Fragments model. |
| MappedInformationResult | Interface representing the result of an information query for a specific item type. |
| MappedResultInput | Interface representing the input for a result query in a Fragments model. |
| MappedSelectionInput | Interface representing the input for a selection query in a Fragments model. |
| ModelIdMap | Interface representing a map of model IDs to their corresponding local IDs. |
| RaycastData | Interface representing the data for a raycast operation. |
| RaycastResult | Interface representing the result of a raycast operation. |
| RectangleRaycastData | Interface representing the data for a rectangle raycast operation. |
| RectangleRaycastResult | Interface representing the result of a rectangle raycast operation. |
| RelsModifyChange | Interface representing a change event when relations are modified in a model item. |
| SpatialTreeItem | Interface representing an item in a spatial tree. |
| UpdateGlobalTransformRequest | Interface for update global transform edit requests. |
| UpdateItemRequest | Interface for update item edit requests. |
| UpdateLocalTransformRequest | Interface for update local transform edit requests. |
| UpdateMaterialRequest | Interface for update material edit requests. |
| UpdateMaxLocalIdRequest | Interface for update max local id edit requests. |
| UpdateMetadataRequest | Interface for update metadata edit requests. |
| UpdateRelationRequest | Interface for update relation edit requests. |
| UpdateRepresentationRequest | Interface for update representation edit requests. |
| UpdateSampleRequest | Interface for update sample edit requests. |
| UpdateSpatialStructureRequest | Interface for update spatial structure edit requests. |
| VirtualModelConfig | Interface representing the configuration for a virtual model. |
| VirtualPropertiesConfig | Interface representing the configuration for virtual properties in a Fragments model. |
Type Aliases
| Type alias | Description |
|---|---|
| AttributeData | Represents attribute data for a model item. |
| AttrsChange | Union type representing all possible attribute change types. |
| BIMMaterial | Union type representing all possible material types. |
| BIMMesh | Union type representing all possible mesh types. |
| CreateRequest | Type for create edit requests. |
| DataBuffer | Union type representing all possible data buffer types. |
| DeleteRequest | Type for delete edit requests. |
| EditRequest | Type for all edit requests. |
| ElementData | Container of all the data of an element of a fragments model. |
| Identifier | Type representing a unique identifier for a model item. This can be either a string or a number. |
| InformationResultType | Type representing the result of an information query for a specific item type. |
| ItemInformationType | Union type representing all possible item information types. |
| ItemSelectionType | Union type representing all possible item selection types. |
| MaterialDefinition | Interface representing the definition of a material. |
| MeshData | Interface representing the data of a mesh. |
| NewElementData | Data defining a new element of a fragments model. |
| RawCircleExtrusion | Data defining a circle extrusion geometry (e.g. reinforcement bars). |
| RawGlobalTransformData | Data defining a global transform of a mesh. |
| RawItemData | Data defining a fragments item. It can be anything, from a property to property set or a physical element like a wall or a beam. |
| RawMaterial | Data defining a fragments material. |
| RawMetadataData | Data defining metadata of the fragments model. |
| RawRelationData | Data defining a fragments relation. |
| RawRepresentation | Data defining a representation of a geometry. |
| RawSample | Data defining a sample (instance) of a mesh. |
| RawShell | Data defining a shell geometry (e.g. a brep). |
| RawTransformData | Data defining a transform (local or global) of a mesh. |
| RelsChange | Union type representing all possible relation change types. |
| ResultInputType | Union type representing all possible result input types. |
| SelectionInputType | Union type representing all possible selection input types. |
| UpdateRequest | Type for update edit requests. |
Variables
| Variable | Description |
|---|---|
| EditRequestTypeNames | Names of the edit request types (e.g. to display in a history UI). |
| ifcCategoryMap | A 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. |
| limitOf2Bytes | The maximum value for a 2-byte unsigned integer. |
Functions
| Function | Description |
|---|---|
| getObject | Recursively 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. |