IFC file format exporter. More...
Functions | |
def | buildAddress (obj, ifcfile) |
def | checkRectangle (edges) |
def | createAxis (ifcfile, obj, preferences) |
def | createCurve (ifcfile, wire, scaling=1.0) |
def | createProduct (ifcfile, obj, ifctype, uid, history, name, description, placement, representation, preferences) |
def | export (exportList, filename, colors=None, preferences=None) |
def | exportIFC2X3Attributes (obj, kwargs, scale=0.001) |
def | exportIfcAttributes (obj, kwargs, scale=0.001) |
def | getAxisContext (ifcfile) |
def | getBrepFlag (obj, preferences) |
def | getEdgesAngle (edge1, edge2) |
def | getIfcTypeFromObj (obj) |
def | getPreferences () |
def | getProfile (ifcfile, p) |
def | getPropertyData (key, value, preferences) |
def | getRepresentation (ifcfile, context, obj, forcebrep=False, subtraction=False, tessellation=1, colors=None, preferences=None, forceclone=False, skipshape=False) |
def | getText (field, obj) |
def | getUID (obj, preferences) |
def | isStandardCase (obj, ifctype) |
def | writeJson (filename, ifcfile) |
Variables | |
string | ifctemplate |
pyopen = open | |
dictionary | translationtable |
IFC file format exporter.
This module provides tools to export IFC files.
def exportIFC.buildAddress | ( | obj, | |
ifcfile | |||
) |
Referenced by createProduct().
def exportIFC.checkRectangle | ( | edges | ) |
checkRectangle(edges=[]): This function checks whether the given form is a rectangle or not. It will return True when edges form a rectangular shape or return False when edges do not form a rectangular shape.
References getEdgesAngle().
Referenced by getProfile().
def exportIFC.createAxis | ( | ifcfile, | |
obj, | |||
preferences | |||
) |
Creates an axis for a given wall, if applicable
References createCurve(), and getAxisContext().
Referenced by getRepresentation().
def exportIFC.createCurve | ( | ifcfile, | |
wire, | |||
scaling = 1.0 |
|||
) |
References DraftVecUtils.angle(), and DraftVecUtils.equals().
Referenced by createAxis(), export(), getProfile(), and getRepresentation().
def exportIFC.createProduct | ( | ifcfile, | |
obj, | |||
ifctype, | |||
uid, | |||
history, | |||
name, | |||
description, | |||
placement, | |||
representation, | |||
preferences | |||
) |
creates a product in the given IFC file
References buildAddress(), exportIFC2X3Attributes(), and exportIfcAttributes().
Referenced by export().
def exportIFC.export | ( | exportList, | |
filename, | |||
colors = None , |
|||
preferences = None |
|||
) |
Export the selected objects to IFC format. Parameters ---------- colors: It defaults to `None`. It is an optional dictionary of `objName:shapeColorTuple` or `objName:diffuseColorList` elements to be used in non-GUI mode if you want to be able to export colors.
References exportIFCStructuralTools.associates(), createCurve(), createProduct(), exportIFCStructuralTools.createStructuralGroup(), exportIFCStructuralTools.createStructuralMember(), getBrepFlag(), getIfcTypeFromObj(), exportIFCHelper.getObjectsOfIfcType(), getPreferences(), getPropertyData(), getRepresentation(), getText(), getUID(), isStandardCase(), pyopen, exportIFCStructuralTools.setup(), writeJson(), and exportIFCHelper.writeUnits().
Referenced by importIFC.export().
def exportIFC.exportIFC2X3Attributes | ( | obj, | |
kwargs, | |||
scale = 0.001 |
|||
) |
References getIfcTypeFromObj().
Referenced by createProduct().
def exportIFC.exportIfcAttributes | ( | obj, | |
kwargs, | |||
scale = 0.001 |
|||
) |
References getIfcTypeFromObj().
Referenced by createProduct().
def exportIFC.getAxisContext | ( | ifcfile | ) |
gets or creates an axis context
Referenced by createAxis().
def exportIFC.getBrepFlag | ( | obj, | |
preferences | |||
) |
returns True if the object must be exported as BREP
Referenced by export().
def exportIFC.getEdgesAngle | ( | edge1, | |
edge2 | |||
) |
getEdgesAngle(edge1, edge2): returns a angle between two edges.
References draftgeoutils.general.vec().
Referenced by checkRectangle().
def exportIFC.getIfcTypeFromObj | ( | obj | ) |
Referenced by export(), exportIFC2X3Attributes(), and exportIfcAttributes().
def exportIFC.getPreferences | ( | ) |
Retrieve the IFC preferences available in import and export.
Referenced by export().
def exportIFC.getProfile | ( | ifcfile, | |
p | |||
) |
returns an IFC profile definition from a shape
References checkRectangle(), createCurve(), and draftgeoutils.general.vec().
Referenced by getRepresentation().
def exportIFC.getPropertyData | ( | key, | |
value, | |||
preferences | |||
) |
Referenced by export().
def exportIFC.getRepresentation | ( | ifcfile, | |
context, | |||
obj, | |||
forcebrep = False , |
|||
subtraction = False , |
|||
tessellation = 1 , |
|||
colors = None , |
|||
preferences = None , |
|||
forceclone = False , |
|||
skipshape = False |
|||
) |
returns an IfcShapeRepresentation object or None. forceclone can be False (does nothing), "store" or True (stores the object as clone base) or a Vector (creates a clone)
References DraftVecUtils.angle(), createAxis(), createCurve(), getProfile(), DraftVecUtils.isNull(), DraftVecUtils.neg(), ArchComponent.Component.rebase(), and importDAE.triangulate().
Referenced by export().
def exportIFC.getText | ( | field, | |
obj | |||
) |
Returns the value of a text property of an object
Referenced by export().
def exportIFC.getUID | ( | obj, | |
preferences | |||
) |
gets or creates an UUID for an object
Referenced by export().
def exportIFC.isStandardCase | ( | obj, | |
ifctype | |||
) |
Referenced by export().
def exportIFC.writeJson | ( | filename, | |
ifcfile | |||
) |
string exportIFC.ifctemplate |
exportIFC.pyopen = open |
Referenced by export(), and writeJson().
dictionary exportIFC.translationtable |