Arch: Fixes in IFC importer (spaces didn't import correctly)
This commit is contained in:
parent
2424fc4c7c
commit
1497e8eaa4
|
@ -29,11 +29,11 @@ import FreeCAD,FreeCADGui,ArchComponent,ArchCommands,math,Draft
|
|||
from DraftTools import translate
|
||||
from PyQt4 import QtCore
|
||||
|
||||
def makeSpace(objects=None):
|
||||
def makeSpace(objects=None,name="Space"):
|
||||
"""makeSpace([objects]): Creates a space object from the given objects. Objects can be one
|
||||
document object, in which case it becomes the base shape of the space object, or a list of
|
||||
selection objects as got from getSelectionEx(), or a list of tuples (object, subobjectname)"""
|
||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Space")
|
||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||
_Space(obj)
|
||||
_ViewProviderSpace(obj.ViewObject)
|
||||
if objects:
|
||||
|
@ -44,6 +44,7 @@ def makeSpace(objects=None):
|
|||
objects[0].ViewObject.hide()
|
||||
else:
|
||||
obj.Proxy.addSubobjects(obj,objects)
|
||||
return obj
|
||||
|
||||
def addSpaceBoundaries(space,subobjects):
|
||||
"""addSpaceBoundaries(space,subobjects): adds the given subobjects to the given space"""
|
||||
|
|
|
@ -124,7 +124,6 @@ class _Window(ArchComponent.Component):
|
|||
self.createGeometry(obj)
|
||||
|
||||
def onChanged(self,obj,prop):
|
||||
print prop
|
||||
self.hideSubobjects(obj,prop)
|
||||
if prop in ["Base","WindowParts"]:
|
||||
self.createGeometry(obj)
|
||||
|
|
|
@ -464,8 +464,9 @@ def makeSpace(entity,shape=None,name="Space"):
|
|||
body = FreeCAD.ActiveDocument.addObject("Part::Feature",name+"_body")
|
||||
body.Shape = shape
|
||||
space.Base = body
|
||||
body.ViewObject.hide()
|
||||
if DEBUG: print "made space object ",entity,":",space
|
||||
return site
|
||||
return space
|
||||
except:
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user