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):