From f7d2b4495e103411586374b8641212a353484148 Mon Sep 17 00:00:00 2001 From: sliptonic Date: Wed, 4 Jan 2023 17:53:51 -0600 Subject: [PATCH 1/2] fix bug with collision --- src/Mod/Path/Path/Op/Gui/Selection.py | 2 +- src/Mod/Path/Path/Op/ThreadMilling.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Mod/Path/Path/Op/Gui/Selection.py b/src/Mod/Path/Path/Op/Gui/Selection.py index 059cf0d9c3..e36e0b387d 100644 --- a/src/Mod/Path/Path/Op/Gui/Selection.py +++ b/src/Mod/Path/Path/Op/Gui/Selection.py @@ -29,7 +29,7 @@ import Path import Path.Base.Drillable as Drillable import math -Path.Log.setLevel(Path.Log.Level.DEBUG, Path.Log.thisModule()) +Path.Log.setLevel(Path.Log.Level.INFO, Path.Log.thisModule()) Path.Log.trackModule(Path.Log.thisModule()) diff --git a/src/Mod/Path/Path/Op/ThreadMilling.py b/src/Mod/Path/Path/Op/ThreadMilling.py index 41babae7c5..53cb6b3bfd 100644 --- a/src/Mod/Path/Path/Op/ThreadMilling.py +++ b/src/Mod/Path/Path/Op/ThreadMilling.py @@ -207,7 +207,7 @@ def threadPasses(count, radii, internal, majorDia, minorDia, toolDia, toolCrest) def elevatorRadius(obj, center, internal, tool): """elevatorLocation(obj, center, internal, tool) ... return suitable location for the tool elevator""" - + Path.Log.track(center, internal, tool.Diameter) if internal: dy = float(obj.MinorDiameter - tool.Diameter) / 2 - 1 if dy < 0: @@ -377,7 +377,8 @@ class ObjectThreadMilling(PathCircularHoleBase.ObjectOp): "ThreadFit", "Thread", QT_TRANSLATE_NOOP( - "App::Property", "Set how many passes are used to cut the thread" + "App::Property", + "Override to control how loose or tight the threads are milled", ), ) obj.addProperty( @@ -446,7 +447,9 @@ class ObjectThreadMilling(PathCircularHoleBase.ObjectOp): float(self.tool.Diameter), float(self.tool.Crest), ): - if not start is None and not _isThreadInternal(obj) and not obj.LeadInOut: + if not start is None and not _isThreadInternal( + obj + ): # and not obj.LeadInOut: # external thread without lead in/out have to go up and over # in other words we need a move to clearance and not take any # shortcuts when moving to the elevator position From 5b41bab220e8fa163b8553bd88b79d80920e3b15 Mon Sep 17 00:00:00 2001 From: sliptonic Date: Mon, 9 Jan 2023 10:46:55 -0600 Subject: [PATCH 2/2] Remove check for internal as well --- src/Mod/Path/Path/Op/ThreadMilling.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Path/Path/Op/ThreadMilling.py b/src/Mod/Path/Path/Op/ThreadMilling.py index 53cb6b3bfd..7be49f75ac 100644 --- a/src/Mod/Path/Path/Op/ThreadMilling.py +++ b/src/Mod/Path/Path/Op/ThreadMilling.py @@ -447,9 +447,9 @@ class ObjectThreadMilling(PathCircularHoleBase.ObjectOp): float(self.tool.Diameter), float(self.tool.Crest), ): - if not start is None and not _isThreadInternal( - obj - ): # and not obj.LeadInOut: + if not start is None: + # and not _isThreadInternal(obj): + # and not obj.LeadInOut: # external thread without lead in/out have to go up and over # in other words we need a move to clearance and not take any # shortcuts when moving to the elevator position