IFCFile
- class compas_ifc.file.IFCFile(model, filepath=None, schema='IFC4', use_occ=False, load_geometries=True, verbose=True, extensions=None)
Bases:
object
The IFCFile class is a wrapper around an ifcopenshell file object. It provides low-level access to the IFC data.
- Attributes:
- filepathstr, optional
The path to the IFC file.
- model
compas_ifc.model.Model
The model object.
- use_occbool
Whether to use OCC for geometry processing.
load_geometries
boolLoad all the geometries of the IFC file using a fast multithreaded iterator.
- verbosebool
Whether to print verbose output.
- extensionsdict, optional
A dictionary of custom extensions to be used with the IFC file.
- schema
ifcopenshell.schema.Schema
The IFC schema object.
- schema_namestr
The name of the IFC schema.
- classeslist[
compas_ifc.entities.base.Base
] A list of all the classes for this schema version.
- default_project
compas_ifc.entities.generated.IFC4.IfcProject
The default project in this file. Will be created if it does not exist.
- default_units
compas_ifc.entities.generated.IFC4.IfcUnitAssignment
The default units in this file. Will be created if it does not exist.
- default_owner_history
compas_ifc.entities.generated.IFC4.IfcOwnerHistory
The default owner history in this file. Will be created if it does not exist.
- default_context
compas_ifc.entities.generated.IFC4.IfcContext
The default context in this file. Will be created if it does not exist.
- default_body_context
compas_ifc.entities.generated.IFC4.IfcContext
The default body context in this file. Will be created if it does not exist.
Methods
Construct the IFCFile object.
Create an entity in this model.
Create the correct relationship between two entities based on their types.
Create corresponding IfcValue from a Python value.
Check if the IFC classes are generated and generate them if not.
Export a subset of the IFC file to a new IFC file.
Get the size of the IFC file in MB.
Convert an ifcopenshell entity to a compas_ifc entity.
Get all entities with a given name.
Get all entities of a given type.
Get an entity by its global ID.
Get an entity by its file ID.
Get the preloaded geometry of an entity.
Get the preloaded style of an entity.
Load all the geometries of the IFC file using a fast multithreaded iterator.
Remove an entity from this model.
Save the IFC file to a given path.
Search for IFC classes by name