Entity

class compas_ifc.entities.Entity(entity, model)

Bases: object

Class representing a general IFC entity. Each entity corresponds to a line in IFC file.

Parameters:
entityifcopenshell.entity_instance
modelcompas_ifc.model.Model
Attributes:
ifc_typestr

The IFC type of the entity.

declarationifcopenshell.ifcopenshell_wrapper.schema.declaration

The IFC declaration of the entity.

modelcompas_ifc.model.Model

The model the entity belongs to.

attributesDict[str, Union[str, float, int, list, tuple]]

All the attributes of the entity.

psetsDict[str, Dict[str, Union[str, float, int, list, tuple]]]

All the property sets of the entity.

propertiesDict[str, Union[str, float, int, list, tuple]]

All the properties of all property sets compiled into a single dict.

Methods

__init__

attribute

Get the value of a named attribute.

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

print_inheritance

Print the entity inheritance as a nested list.

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_branch