Arch: added object types to struct ifc import
This commit is contained in:
parent
aec3ab60cb
commit
4dc09efd0d
|
@ -45,9 +45,11 @@ typesmap = { "Site": ["IfcSite"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# which IFC entity (product) is a structural object
|
# which IFC entity (product) is a structural object
|
||||||
structuralifcobjects = ('IfcStructuralSurfaceMember', 'IfcStructuralCurveMember',
|
structuralifcobjects = (
|
||||||
'IfcStructuralPointConnection', 'IfcStructuralSurfaceConnection',
|
"IfcStructuralCurveMember", "IfcStructuralSurfaceMember",
|
||||||
'IfcStructuralAction', 'IfcStructuralPointAction')
|
"IfcStructuralPointConnection", "IfcStructuralSurfaceConnection",
|
||||||
|
"IfcStructuralAction", "IfcStructuralPointAction", "IfcStructuralLinearActionVarying", "IfcStructuralPlanarAction"
|
||||||
|
)
|
||||||
|
|
||||||
# specific name translations
|
# specific name translations
|
||||||
translationtable = { "Foundation":"Footing",
|
translationtable = { "Foundation":"Footing",
|
||||||
|
@ -418,6 +420,9 @@ def insert(filename,docname,skip=[],only=[],root=None):
|
||||||
archobj = True # assume all objects not in structuralifcobjects are architecture
|
archobj = True # assume all objects not in structuralifcobjects are architecture
|
||||||
if ptype in structuralifcobjects:
|
if ptype in structuralifcobjects:
|
||||||
archobj = False
|
archobj = False
|
||||||
|
if DEBUG: print " : structural object :",
|
||||||
|
else:
|
||||||
|
if DEBUG: print " : architecture object :",
|
||||||
if MERGE_MODE_ARCH == 4 and archobj:
|
if MERGE_MODE_ARCH == 4 and archobj:
|
||||||
if DEBUG: print " skipped."
|
if DEBUG: print " skipped."
|
||||||
continue
|
continue
|
||||||
|
@ -479,7 +484,7 @@ def insert(filename,docname,skip=[],only=[],root=None):
|
||||||
#continue
|
#continue
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if DEBUG: print " no brep ",
|
if DEBUG: print " no brep \n",
|
||||||
|
|
||||||
if MERGE_MODE_ARCH == 0 and archobj :
|
if MERGE_MODE_ARCH == 0 and archobj :
|
||||||
|
|
||||||
|
@ -592,6 +597,7 @@ def insert(filename,docname,skip=[],only=[],root=None):
|
||||||
# groups
|
# groups
|
||||||
for host,children in groups.items():
|
for host,children in groups.items():
|
||||||
if ifcfile[host].is_a("IfcStructuralAnalysisModel"):
|
if ifcfile[host].is_a("IfcStructuralAnalysisModel"):
|
||||||
|
# print host, ' --> ', children
|
||||||
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup","AnalysisModel")
|
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup","AnalysisModel")
|
||||||
objects[host] = obj
|
objects[host] = obj
|
||||||
if host in objects.keys():
|
if host in objects.keys():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user