Arch: Automatic wall height - fixes #980

+ Walls can now be capped by roofs, by subtracting a roof from them
+ Walls and Structs with height = 0 take height from their parent floor
+ Changing the placement of a floor changes all the placements of its children
This commit is contained in:
Yorik van Havre
2014-01-14 16:16:04 -02:00
parent e14a9e49d9
commit e352e169da
6 changed files with 72 additions and 48 deletions

View File

@@ -546,7 +546,9 @@ class _Structure(ArchComponent.Component):
import Part, DraftGeomUtils
# getting default values
height = width = length = 1
length = 1
width = 1
height = 1
if hasattr(obj,"Length"):
if obj.Length:
length = obj.Length
@@ -556,6 +558,11 @@ class _Structure(ArchComponent.Component):
if hasattr(obj,"Height"):
if obj.Height:
height = obj.Height
else:
for p in obj.InList:
if Draft.getType(p) == "Floor":
if p.Height:
height = p.Height
# creating base shape
pl = obj.Placement