Arch IFC import and export, new lines and comments
This commit is contained in:
@@ -107,9 +107,7 @@ END-ISO-10303-21;
|
||||
|
||||
|
||||
# ************************************************************************************************
|
||||
# ********** duplicate methods ****************
|
||||
# TODO get rid of this duplicate
|
||||
|
||||
# ********** get the prefs, available in import and export ****************
|
||||
def getPreferences():
|
||||
|
||||
"""retrieves IFC preferences"""
|
||||
@@ -135,9 +133,9 @@ def getPreferences():
|
||||
|
||||
return preferences
|
||||
|
||||
|
||||
# ************************************************************************************************
|
||||
# ********** export IFC ****************
|
||||
|
||||
def export(exportList,filename,colors=None,preferences=None):
|
||||
|
||||
"""export(exportList,filename,colors=None,preferences=None) -- exports FreeCAD contents to an IFC file.
|
||||
|
||||
@@ -38,6 +38,7 @@ def getObjectsOfIfcType(objects, ifcType):
|
||||
results.append(object)
|
||||
return results
|
||||
|
||||
|
||||
class SIUnitCreator:
|
||||
def __init__(self, file, text, type):
|
||||
self.prefixes = ["EXA", "PETA", "TERA", "GIGA", "MEGA", "KILO", "HECTO",
|
||||
@@ -63,6 +64,7 @@ class SIUnitCreator:
|
||||
return unitName
|
||||
return None
|
||||
|
||||
|
||||
class ContextCreator:
|
||||
def __init__(self, file, objects):
|
||||
self.file = file
|
||||
@@ -171,8 +173,6 @@ class ContextCreator:
|
||||
return json.loads(self.project_object.IfcData['complex_attributes'])["RepresentationContexts"]
|
||||
|
||||
|
||||
|
||||
|
||||
class recycler:
|
||||
|
||||
"the compression engine - a mechanism to reuse ifc entities if needed"
|
||||
|
||||
@@ -138,8 +138,7 @@ structuralifcobjects = (
|
||||
|
||||
|
||||
# ************************************************************************************************
|
||||
# ********** duplicate methods, they are in importIFC and exportIFC ****************
|
||||
# TODO get rid of this duplicate
|
||||
# ********** get the prefs, available in import and export ****************
|
||||
def getPreferences():
|
||||
|
||||
"""retrieves IFC preferences"""
|
||||
|
||||
@@ -32,7 +32,6 @@ import ArchIFC
|
||||
|
||||
# ************************************************************************************************
|
||||
# ********** some helper, used in import and export, or should stay together
|
||||
|
||||
def decode(filename,utf=False):
|
||||
|
||||
"turns unicodes into strings"
|
||||
@@ -243,8 +242,6 @@ def buildRelMattable(ifcfile):
|
||||
# color relation tables
|
||||
# products can have a color and materials can have a color and products can have a material
|
||||
# colors for material assigned to a product and product color can be different
|
||||
|
||||
|
||||
def buildRelColors(ifcfile, prodrepr):
|
||||
"""build the colors relation table and"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user