IFCWriter

class compas_ifc.writer.IFCWriter(model)

Bases: object

A class for writing IFC files.

Parameters:
modelcompas_ifc.model.Model

The model to which the writer belongs.

Attributes:
modelcompas_ifc.model.Model

The model to which the writer belongs.

fileifcopenshell.file

The IFC file to which the model is being written to.

default_contextifcopenshell.entity_instance

The default context of the model. Created if it does not exist.

default_body_contextifcopenshell.entity_instance

The default body context of the model. Created if it does not exist.

default_projectifcopenshell.entity_instance

The default project of the model. Created if it does not exist.

default_siteifcopenshell.entity_instance

The default site of the model. Created if it does not exist.

default_buildingifcopenshell.entity_instance

The default building of the model. Created if it does not exist.

default_building_storeyifcopenshell.entity_instance

The default building storey of the model. Created if it does not exist.

Methods

__init__

create_guid

create_new_relation

Writes a new parental relation to the ifc file.

export

Exports the given entities to the ifc file.

reset

Resets the writer to start with a new ifc file.

save

Writes the model as ifc file to the given filepath.

trim_existing_relation

writes a existing parental relation to the ifc file, trimming the non existing children.

write_entity

Writes the given entity recursively with all its referencing attributes to the ifc file.

write_entity_placement

Writes the placement of the given entity to the ifc file.

write_entity_pset

write_entity_representation

Writes the representations of the given entity to the ifc file.

write_relation

Writes the relation of the given entity to the ifc file.