From 5f261fb6361b3727bc99cbd98be4c9d20c53a398 Mon Sep 17 00:00:00 2001 From: wood galaxy Date: Tue, 18 Nov 2014 23:43:53 +0100 Subject: [PATCH] make compatible with Part typed object tool make a Part Cut object when object are not Arch typed. the cutVolume is now Red and 75 transparence --- src/Mod/Arch/ArchCutPlane.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Mod/Arch/ArchCutPlane.py b/src/Mod/Arch/ArchCutPlane.py index 92389ef27..6381150ab 100644 --- a/src/Mod/Arch/ArchCutPlane.py +++ b/src/Mod/Arch/ArchCutPlane.py @@ -46,8 +46,16 @@ def cutComponentwithPlane(archObject, cutPlane, sideFace): if cutVolume: obj = FreeCAD.ActiveDocument.addObject("Part::Feature", "CutVolume") obj.Shape = cutVolume + obj.ViewObject.ShapeColor = (1.00,0.00,0.00) + obj.ViewObject.Transparency = 75 # add substraction component to Arch object - return ArchCommands.removeComponents(obj,archObject.Object) + if "Additions" in archObject.Object.PropertiesList: + return ArchCommands.removeComponents(obj,archObject.Object) + else: + cutObj = FreeCAD.ActiveDocument.addObject("Part::Cut", "CutPlane") + cutObj.Base = archObject.Object + cutObj.Tool = obj + return cutObj class _CommandCutPlane: "the Arch CutPlane command definition"