Path: Clean up comments and simplify one code block

This commit is contained in:
Russell Johnson
2020-11-21 23:08:32 -06:00
parent 693db4e4b6
commit 43cd864f8f
2 changed files with 6 additions and 19 deletions

View File

@@ -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
@@ -50,9 +44,6 @@ __author__ = "sliptonic (Brad Collette)"
__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
@@ -339,7 +330,8 @@ class ObjectOp(PathOp.ObjectOp):
'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})

View File

@@ -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 *
@@ -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
@@ -43,6 +36,8 @@ __title__ = "Path Drilling Operation"
__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())
@@ -198,8 +193,8 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
# 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'