Arch: Fixed SectionPlane outside objects bug in ArchSectionPlane - Fixes #4549

This commit is contained in:
Yorik van Havre
2021-03-01 16:49:31 +01:00
parent 3e48fef002
commit 19e4113de4

View File

@@ -211,11 +211,11 @@ def getCutShapes(objs,cutplane,onlySolids,clip,joinArch,showHidden,groupSshapesB
cutface,cutvolume,invcutvolume = ArchCommands.getCutVolume(cutplane,shapes,clip)
shapes = []
if cutvolume:
for o, shapeList in objectShapes:
tmpSshapes = []
for sh in shapeList:
for sol in sh.Solids:
for o, shapeList in objectShapes:
tmpSshapes = []
for sh in shapeList:
for sol in sh.Solids:
if cutvolume:
if sol.Volume < 0:
sol.reverse()
c = sol.cut(cutvolume)
@@ -235,6 +235,8 @@ def getCutShapes(objs,cutplane,onlySolids,clip,joinArch,showHidden,groupSshapesB
if showHidden:
c = sol.cut(invcutvolume)
hshapes.append(c)
else:
shapes.extend(sol.Solids)
if len(tmpSshapes) > 0:
sshapes.extend(tmpSshapes)