Arch: misc improvements and bugfixes
* Allow mesh-based windows (with non-solid shape) to pass through * Allow precast elements to be clones * Structure elements now display a different icon when thry are clones * Arch clones now get the same placements as their cloned object on create * Fixed the bad export of clones to IFC * Recoded the Site/Building/Floor IFC export to be more flexible
This commit is contained in:
@@ -645,7 +645,7 @@ class Component:
|
||||
print "Arch: unable to cut object ",o.Name, " from ", obj.Name
|
||||
return base
|
||||
|
||||
def applyShape(self,obj,shape,placement):
|
||||
def applyShape(self,obj,shape,placement,allowinvalid=False,allownosolid=False):
|
||||
"checks and cleans the given shape, and apply it to the object"
|
||||
if shape:
|
||||
if not shape.isNull():
|
||||
@@ -662,8 +662,16 @@ class Component:
|
||||
obj.Placement = placement
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(obj.Label + " " + translate("Arch","has no solid")+"\n")
|
||||
if allownosolid:
|
||||
obj.Shape = shape
|
||||
if not placement.isNull():
|
||||
obj.Placement = placement
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(obj.Label + " " + translate("Arch","has an invalid shape")+"\n")
|
||||
if allowinvalid:
|
||||
obj.Shape = shape
|
||||
if not placement.isNull():
|
||||
obj.Placement = placement
|
||||
else:
|
||||
FreeCAD.Console.PrintWarning(obj.Label + " " + translate("Arch","has a null shape")+"\n")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user