Arch: Fixed regression in layers

This commit is contained in:
Yorik van Havre
2020-03-12 11:33:07 -03:00
parent c676a817b8
commit 1fb999be37

View File

@@ -604,6 +604,10 @@ class _Wall(ArchComponent.Component):
shps = []
# Test : if base is Sketch, then fuse all solid; otherwise, makeCompound
sketchBaseToFuse = obj.Base.getLinkedObject().isDerivedFrom("Sketcher::SketchObject")
# but turn this off if we have layers, otherwise layers get merged
if hasattr(obj,"Material") and obj.Material \
and hasattr(obj.Material,"Materials") and obj.Material.Materials:
sketchBaseToFuse = False
for b in bplates:
b.Placement = extdata[2].multiply(b.Placement)
b = b.extrude(extv)
@@ -988,7 +992,7 @@ class _Wall(ArchComponent.Component):
# if not sketch, e.g. Dwire, can have wire which is 3d so not on the placement's working plane - below applied to Sketch not applicable here
#normal = obj.Base.getGlobalPlacement().Rotation.multVec(FreeCAD.Vector(0,0,1)) #normal = obj.Base.Placement.Rotation.multVec(FreeCAD.Vector(0,0,1))
if self.basewires: # and width: # width already tested earlier...
if self.basewires: # and width: # width already tested earlier...
if (len(self.basewires) == 1) and layers:
self.basewires = [self.basewires[0] for l in layers]
layeroffset = 0