IFCReader

class compas_ifc.reader.IFCReader(model, entity_types=None, use_occ=True)

Bases: object

A class for reading IFC files.

Parameters:
modelcompas_ifc.model.Model

The model to which the reader belongs.

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:
modelcompas_ifc.model.Model

The model to which the reader belongs.

entity_typesdict

A dictionary mapping IFC entity types to corresponding compas_ifc.entities classes.

projectsList[Project]

The projects contained in the model. Typically there is exactly one.

projectProject

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.

Methods

__init__

file_size

Returns the size of the IFC file in bytes.

get_all_entities

Returns all the entities in the model.

get_entities_by_name

Returns all the entities with the given name.

get_entities_by_type

Returns all the entities of the given type.

get_entity

Returns the compas_ifc entity corresponding to the given ifcopenshell entity.

get_entity_by_global_id

Returns the entity with the given global id.

get_entity_by_id

Returns the entity with the given id.

get_preloaded_geometry

get_preloaded_style

load_geometries

Load all the geometries of the IFC file using a fast multithreaded iterator.

open