Model
- class compas_ifc.model.Model(filepath=None, entity_types=None, use_occ=False, schema=None, load_geometries=True)
Bases:
object
Class representing an entire IFC model.
- Parameters:
- filepathstr
The path to the IFC file.
- entity_typesdict
A dictionary mapping IFC entity types to corresponding compas_ifc.entities classes. This can be used to customize the classes used to represent IFC entities.
- Attributes:
- reader
IFCReader
The reader used to read the content of an IFC file.
- writer
IFCWriter
The writer used to write the content of an IFC file.
- schemastr
The schema of the IFC file.
- projectsList[
Project
] The projects contained in the model. Typically there is exactly one.
- project
Project
The project of the model.
- sitesList[
Site
] The sites contained in the model. In a correctly formed hierarchical model, sites are part of a project. If that is not the case, they are also accessible here.
- buildingsList[
Building
] The buildings contained in the model. In a correctly formed hierarchical model, buildings are part of a site. If that is not the case, they are also accessible here.
- building_storeysList[
BuildingStorey
] The building storeys contained in the model.
- elementsList[
BuildingElement
] All the building elements contained in the model. In a correctly formed hierarchical model, building elements are part of a building, building storey, or space. If that is not the case, they are also accessible here.
- reader
Methods
Create an entity and add it to the model.
Get all entities in the model.
Get all entities with a specific name.
Get all entities of a specific ifc type in the model.
Get an entity by its global id.
Get an entity by its id in the IFC file.
Insert a geometry into the model.
Print the spatial hierarchy of the model.
Print a summary of the model.