From 4a6b08035ff03579aa0729cb9302fe79e34e0145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kurlbaum?= Date: Wed, 3 May 2023 11:12:09 +0200 Subject: [PATCH] =?UTF-8?q?hinzuf=C3=BCgen=20eine=20z-offset=20f=C3=BCr=20?= =?UTF-8?q?ein=20LaserPad=20(verschieben=20der=20Ebenen-H=C3=B6he)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freecad/LaserCladdingWorkbench/pad.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/freecad/LaserCladdingWorkbench/pad.py b/freecad/LaserCladdingWorkbench/pad.py index 61e385b..111e724 100644 --- a/freecad/LaserCladdingWorkbench/pad.py +++ b/freecad/LaserCladdingWorkbench/pad.py @@ -37,6 +37,9 @@ class LaserPad: obj.addProperty("App::PropertyFloat", "hatch_contour_offset", "Parameters", "Contour Offset") obj.hatch_contour_offset = 2.3 + obj.addProperty("App::PropertyFloat", "z_offset", "Parameters", "Height (Z) Offset") + obj.z_offset = 0 + obj.addProperty("App::PropertyLinkGlobal","ref_body","Reference","body") obj.ref_body = face[0] @@ -94,6 +97,7 @@ class LaserPad: LaserPath(contours_comp) contours_comp.Shape = p contours_comp.ViewObject.LineColor = (0.5, 0.8, 0.9) + contours_comp.Placement.Base.z = obj.z_offset print("Creating Hatch Part") hatches_comp = obj.newObject("Part::Feature", "Hatchlines") @@ -104,6 +108,7 @@ class LaserPad: LaserPath(hatches_comp) hatches_comp.Shape = p hatches_comp.ViewObject.LineColor = (0.9, 0.2, 0.2) + hatches_comp.Placement.Base.z = obj.z_offset print("Group: ", obj.Group) def onChanged(self, fp, prop):