From b08e5dec7cca8bee5f339132578f09be0444c1e1 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sat, 21 Jun 2014 18:57:14 -0300 Subject: [PATCH] Arch: small fix in section planes --- src/Mod/Draft/Draft.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 2fc152d0f..44d890675 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -4306,17 +4306,23 @@ class _Shape2DView(_DraftObject): cuts = [] if obj.ProjectionMode == "Solid": for sh in shapes: - if sh.Volume < 0: - sh.reverse() - #if cutv.BoundBox.isIntersection(sh.BoundBox): - # c = sh.cut(cutv) - #else: - # c = sh.copy() - c = sh.cut(cutv) - if onlysolids: - cuts.extend(c.Solids) + if cutv: + if sh.Volume < 0: + sh.reverse() + #if cutv.BoundBox.isIntersection(sh.BoundBox): + # c = sh.cut(cutv) + #else: + # c = sh.copy() + c = sh.cut(cutv) + if onlysolids: + cuts.extend(c.Solids) + else: + cuts.append(c) else: - cuts.append(c) + if onlysolids: + cuts.extend(sh.Solids) + else: + cuts.append(sh.copy()) comp = Part.makeCompound(cuts) opl = FreeCAD.Placement(obj.Base.Placement) proj = opl.Rotation.multVec(FreeCAD.Vector(0,0,1))