Skip to content

Commit

Permalink
Path: Clean up comments and simplify one code block
Browse files Browse the repository at this point in the history
  • Loading branch information
Russ4262 committed Dec 1, 2020
1 parent 693db4e commit 43cd864
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
12 changes: 2 additions & 10 deletions src/Mod/Path/PathScripts/PathCircularHoleBase.py
Expand Up @@ -19,12 +19,6 @@
# * USA *
# * *
# ***************************************************************************
# * *
# * Additional modifications and contributions beginning 2019 *
# * Focus: 4th-axis integration *
# * by Russell Johnson <russ4262@gmail.com> *
# * *
# ***************************************************************************

import FreeCAD
import PathScripts.PathLog as PathLog
Expand All @@ -50,9 +44,6 @@
__url__ = "https://www.freecadweb.org"
__doc__ = "Base class an implementation for operations on circular holes."
__contributors__ = "russ4262 (Russell Johnson)"
__created__ = "2017"
__scriptVersion__ = "2b"
__lastModified__ = "2020-02-13 17:11 CST"


# Qt translation handling
Expand Down Expand Up @@ -339,7 +330,8 @@ def haveLocations(self, obj):
'angle': angle, 'axis': axis, 'trgtDep': obj.FinalDepth.Value,
'stkTop': stock.Shape.BoundBox.ZMax})

# haveLocations are populated from Base Locations tab as (x,y) coordinates
# haveLocations are populated from user-provided (x, y) coordinates
# provided by the user in the Base Locations tab of the Task Editor window
if haveLocations(self, obj):
for location in obj.Locations:
# holes.append({'x': location.x, 'y': location.y, 'r': 0, 'angle': 0.0, 'axis': 'X', 'holeBtm': obj.FinalDepth.Value})
Expand Down
13 changes: 4 additions & 9 deletions src/Mod/Path/PathScripts/PathDrilling.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2020 russ4262 (Russell Johnson) *
# * Copyright (c) 2020 Schildkroet *
# * *
# * This program is free software; you can redistribute it and/or modify *
Expand All @@ -21,12 +20,6 @@
# * USA *
# * *
# ***************************************************************************
# * *
# * Additional modifications and contributions beginning 2019 *
# * Focus: 4th-axis integration *
# * by Russell Johnson <russ4262@gmail.com> *
# * *
# ***************************************************************************

from __future__ import print_function

Expand All @@ -43,6 +36,8 @@
__author__ = "sliptonic (Brad Collette)"
__url__ = "https://www.freecadweb.org"
__doc__ = "Path Drilling operation."
__contributors__ = "russ4262 (Russell Johnson)"


PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
# PathLog.trackModule(PathLog.thisModule())
Expand Down Expand Up @@ -198,8 +193,8 @@ def opSetDefaultValues(self, obj, job):

# Initial setting for EnableRotation is taken from Job SetupSheet
# User may override on per-operation basis as needed.
if hasattr(parentJob.SetupSheet, 'SetupEnableRotation'):
obj.EnableRotation = parentJob.SetupSheet.SetupEnableRotation
if hasattr(job.SetupSheet, 'SetupEnableRotation'):
obj.EnableRotation = job.SetupSheet.SetupEnableRotation
else:
obj.EnableRotation = 'Off'

Expand Down

0 comments on commit 43cd864

Please sign in to comment.