importIFC Namespace Reference

IFC file format importer. More...

Functions

def export (exportList, filename, colors=None, preferences=None)
 
def getPreferences ()
 
def insert (srcfile, docname, skip=[], only=[], root=None, preferences=None)
 
def open (filename, skip=[], only=[], root=None)
 

Variables

bool DEBUG = False
 
 pyopen = open
 
tuple structuralifcobjects
 
dictionary typesmap
 
bool ZOOMOUT = True
 

Detailed Description

IFC file format importer.

This module provides tools to import IFC files.

Function Documentation

◆ export()

def importIFC.export (   exportList,
  filename,
  colors = None,
  preferences = None 
)
Export the selected objects to IFC format.

The export code is now in a separate module; this call is retained
in this module for compatibility purposes with older scripts.

References exportIFC.export().

◆ getPreferences()

def importIFC.getPreferences ( )
Retrieve the IFC preferences available in import and export.

MERGE_MODE_ARCH:
    0 = parametric arch objects
    1 = non-parametric arch objects
    2 = Part shapes
    3 = One compound per storey

Referenced by importIFCmulticore.insert(), and insert().

◆ insert()

def importIFC.insert (   srcfile,
  docname,
  skip = [],
  only = [],
  root = None,
  preferences = None 
)
Import the contents of an IFC file in the current active document.

TODO: change the default argument to `None`, instead of `[]`.
This is better because lists are mutable.

Parameters
----------
skip: list
    By default empty list `[]`.
    Can contain a list of ids of objects to be skipped.

only: list
    By default, empty list `[]`.
    Restrict the import to certain object ids; it will also
    get their children.

root: object
    It is used to import only the derivates of a certain element type,
    for example, `'ifcProduct'

References importIFCHelper.buildRelAdditions(), importIFCHelper.buildRelGroups(), importIFCHelper.buildRelMattable(), importIFCHelper.buildRelProductColors(), importIFCHelper.buildRelProductRepresentation(), importIFCHelper.buildRelProductsAnnotations(), importIFCHelper.buildRelSubtractions(), importIFCHelper.createAnnotation(), importIFCHelper.createFromProperties(), importIFCHelper.decode(), importIFCHelper.dms2dd(), importIFCHelper.getIfcProperties(), importIFCHelper.getIfcPropertySets(), getPreferences(), importIFCHelper.getProfileCenterPoint(), importIFCHelper.getRotation(), importIFCHelper.getScaling(), importIFCmulticore.insert(), importIFCHelper.isRectangle(), and DraftVecUtils.tup().

Referenced by open().

◆ open()

def importIFC.open (   filename,
  skip = [],
  only = [],
  root = None 
)
Open an IFC file inside a new document.

TODO: change the default argument to `None`, instead of `[]`.
This is better because lists are mutable.

Most of the work is done in the `insert` function.

References importIFCHelper.decode(), and insert().

Variable Documentation

◆ DEBUG

bool importIFC.DEBUG = False

◆ pyopen

importIFC.pyopen = open

◆ structuralifcobjects

tuple importIFC.structuralifcobjects
Initial value:
1= (
2 "IfcStructuralCurveMember",
3 "IfcStructuralSurfaceMember",
4 "IfcStructuralPointConnection",
5 "IfcStructuralCurveConnection",
6 "IfcStructuralSurfaceConnection",
7 "IfcStructuralAction",
8 "IfcStructuralPointAction",
9 "IfcStructuralLinearAction",
10 "IfcStructuralLinearActionVarying",
11 "IfcStructuralPlanarAction"
12)

◆ typesmap

dictionary importIFC.typesmap

◆ ZOOMOUT

bool importIFC.ZOOMOUT = True