IFC file format exporter. More...
Functions | |
def | buildAddress (obj, ifcfile) |
def | checkRectangle (edges) |
def | createCurve (ifcfile, wire) |
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 | 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) |
def | getText (field, obj) |
def | getUID (obj, preferences) |
def | isStandardCase (obj, ifctype) |
Variables | |
string | ifctemplate |
pyopen = open | |
dictionary | translationtable |
Detailed Description
IFC file format exporter.
This module provides tools to export IFC files.
Function Documentation
◆ buildAddress()
def exportIFC.buildAddress | ( | obj, | |
ifcfile | |||
) |
Referenced by createProduct().
◆ checkRectangle()
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().
◆ createCurve()
def exportIFC.createCurve | ( | ifcfile, | |
wire | |||
) |
References DraftVecUtils.angle(), and DraftVecUtils.equals().
Referenced by export(), getProfile(), and getRepresentation().
◆ createProduct()
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().
◆ export()
def exportIFC.export | ( | exportList, | |
filename, | |||
colors = None , |
|||
preferences = None |
|||
) |
export(exportList,filename,colors=None,preferences=None) -- exports FreeCAD contents to an IFC file. colors 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(), and exportIFCHelper.writeUnits().
Referenced by importIFC.export().
◆ exportIFC2X3Attributes()
def exportIFC.exportIFC2X3Attributes | ( | obj, | |
kwargs, | |||
scale = 0.001 |
|||
) |
References getIfcTypeFromObj().
Referenced by createProduct().
◆ exportIfcAttributes()
def exportIFC.exportIfcAttributes | ( | obj, | |
kwargs, | |||
scale = 0.001 |
|||
) |
References getIfcTypeFromObj().
Referenced by createProduct().
◆ getBrepFlag()
def exportIFC.getBrepFlag | ( | obj, | |
preferences | |||
) |
returns True if the object must be exported as BREP
Referenced by export().
◆ getEdgesAngle()
def exportIFC.getEdgesAngle | ( | edge1, | |
edge2 | |||
) |
getEdgesAngle(edge1, edge2): returns a angle between two edges.
Referenced by checkRectangle().
◆ getIfcTypeFromObj()
def exportIFC.getIfcTypeFromObj | ( | obj | ) |
Referenced by export(), exportIFC2X3Attributes(), and exportIfcAttributes().
◆ getPreferences()
def exportIFC.getPreferences | ( | ) |
retrieves IFC preferences
Referenced by export().
◆ getProfile()
def exportIFC.getProfile | ( | ifcfile, | |
p | |||
) |
returns an IFC profile definition from a shape
References checkRectangle(), and createCurve().
Referenced by getRepresentation().
◆ getPropertyData()
def exportIFC.getPropertyData | ( | key, | |
value, | |||
preferences | |||
) |
Referenced by export().
◆ getRepresentation()
def exportIFC.getRepresentation | ( | ifcfile, | |
context, | |||
obj, | |||
forcebrep = False , |
|||
subtraction = False , |
|||
tessellation = 1 , |
|||
colors = None , |
|||
preferences = None , |
|||
forceclone = 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(), createCurve(), getProfile(), DraftVecUtils.isNull(), DraftVecUtils.neg(), ArchComponent.Component.rebase(), and importDAE.triangulate().
Referenced by export().
◆ getText()
def exportIFC.getText | ( | field, | |
obj | |||
) |
Returns the value of a text property of an object
Referenced by export().
◆ getUID()
def exportIFC.getUID | ( | obj, | |
preferences | |||
) |
gets or creates an UUID for an object
Referenced by export().
◆ isStandardCase()
def exportIFC.isStandardCase | ( | obj, | |
ifctype | |||
) |
Referenced by export().
Variable Documentation
◆ ifctemplate
string exportIFC.ifctemplate |
◆ pyopen
exportIFC.pyopen = open |
Referenced by export().
◆ translationtable
dictionary exportIFC.translationtable |