Project

class compas_ifc.entities.Project(entity, model)

Bases: ObjectDefinition

Class representing IFC projects.

Notes

The order of spatial structure elements being included in the concept for builing projects are from high to low level: IfcProject, IfcSite, IfcBuilding, IfcBuildingStorey, and IfcSpace with IfcSite, IfcBuildingStorey and IfcSpace being optional levels. Therefore an spatial structure element can only be part of an element at the same or higher level [2].

This means the minimum spatial structure of a project is:

  • IfcProject * IfcBuilding

Therefore, a project will contain one or more sites, or one or more buildings. If the project defines sites, the buildings will be contained in the sites.

model = Model(filepath)
for project in model.projects:
    if not project.sites:
        for building in project.buildings:
            # ...
    else:
        for site in project.sites:
            for building in site.buildings:
                # ...

References

Attributes:
sitesList[Site]

The sites contained in the project.

buildingsList[Building]

The buildings contained in the project. Note that this list is empty if sites is not empty.

unitsList[Dict]

The SI units used in the project.

contextsList[Dict]

The representation contexts included in the project. Each representation context defines a coordinates system, a “true north” vector, and numerical precision.

framecompas.geometry.Frame or None

The reference frame, defined by the “Model” context, if that context exists.

northcompas.geometry.Vector or None

The north vector with respect to the reference frame.

gps???

Positioning of the reference frame on earth.

Methods

__init__

add_site

Add a site to the project.

Inherited Methods

attribute

Get the value of a named attribute.

decomposes

Return the relation that decomposes this element.

factory

Factory function for creating an compas_ifc entity object from an Ifc entity, the function finds closest matched class from the bottom of inherentance.

has_attribute

Verify that the entity has a specific attributes.

has_property

Verify that this entity has a specific property.

inheritance

Find the ancestors of the current entity up to the root element.

is_a

is_decomposed_by

Return the relation that this element is decomposed by.

print_inheritance

Print the entity inheritance as a nested list.

print_spatial_hierarchy

Print the spatial hierarchy of this element.

property

Get the value of the property with the given name.

pset

Get the property set with the given name.

set_attribute

Set the value of a named attribute.

set_attributes

Set the values of multiple attributes.

set_property

Set the value of the property with a given name.

traverse

Traverse children of this element.

traverse_ancestor

Traverse ancestors of this element.

traverse_branch

Traverse the spatial branch of this element.