ObjectDefinition

class compas_ifc.entities.ObjectDefinition(entity, model)

Bases: Root

Base class for all object definitions. An object definition is a definition of a thing that is or may be part of a spatial structure.

Attributes:
parentcompas_ifc.entities.ObjectDefinition

The parent of this element in spatial hierarchy.

childrenList[compas_ifc.entities.ObjectDefinition]

The children of this element in spatial hierarchy.

Methods

__init__

decomposes

Return the relation that decomposes this element.

is_decomposed_by

Return the relation that this element is decomposed by.

print_spatial_hierarchy

Print the spatial hierarchy of this element.

traverse

Traverse children of this element.

traverse_ancestor

Traverse ancestors of this element.

traverse_branch

Traverse the spatial branch of this element.

Inherited Methods

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.