diff --git a/src/Mod/Path/App/PathSegmentWalker.cpp b/src/Mod/Path/App/PathSegmentWalker.cpp index 545ca246e7..32dd2e729d 100644 --- a/src/Mod/Path/App/PathSegmentWalker.cpp +++ b/src/Mod/Path/App/PathSegmentWalker.cpp @@ -342,9 +342,10 @@ void PathSegmentWalker::walk(PathSegmentVisitor &cb, const Base::Vector3d &start lrot = nrot; - } else if ((name=="G38.2")||(name=="38.3")||(name=="G38.4")||(name=="G38.5")){ + } else if ((name=="G38.2")||(name=="G38.3")||(name=="G38.4")||(name=="G38.5")){ // Straight probe cb.g38(i, last, next); + last = next; } else if(name=="G17") { pz = &Base::Vector3d::z; } else if(name=="G18") { diff --git a/src/Mod/Path/Gui/Resources/panels/PathEdit.ui b/src/Mod/Path/Gui/Resources/panels/PathEdit.ui index da0e10b89a..63f59c94e1 100644 --- a/src/Mod/Path/Gui/Resources/panels/PathEdit.ui +++ b/src/Mod/Path/Gui/Resources/panels/PathEdit.ui @@ -65,30 +65,28 @@ - - - - - - Qt::Horizontal - - - - 334 - 20 - - - - - - - - Edit - - - - - + + + + + Qt::Horizontal + + + + 334 + 20 + + + + + + + + Edit + + + + @@ -223,7 +221,7 @@ - <html><head/><body><p><span style=" font-style:italic;">Work Coordinate Systems</span> also called <span style=" font-style:italic;">Work Offsets</span>, <span style=" font-style:italic;">Fixture Offsets</span>, or <span style=" font-style:italic;">Fixtures </span>are useful for building efficient production jobs where the same part is done many times on the machine.</p><p>FreeCAD has no knowledge of where a particular coordinate system exists within the machine coordinate system so adding additional coordinate systems to your job will have no visual change within your job. It will, however, change your gcode output. The exact way in which the output is affected is controlled by the 'order by' setting.</p></body></html> + <html><head/><body><p><span style=" font-style:italic;">Work Coordinate Systems</span> also called <span style=" font-style:italic;">Work Offsets</span>, <span style=" font-style:italic;">Fixture Offsets</span>, or <span style=" font-style:italic;">Fixtures </span>are useful for building efficient production jobs where the same part is done many times on the machine.</p><p>FreeCAD has no knowledge of where a particular coordinate system exists within the machine coordinate system so adding additional coordinate systems to your job will have no visual change within your job. It will, however, change your gcode output. The exact way in which the output is affected is controlled by the 'order by' setting.</p></body></html> QListView::Adjust @@ -242,7 +240,7 @@ - G53 + G54 Unchecked @@ -250,7 +248,7 @@ - G54 + G55 Unchecked @@ -258,7 +256,7 @@ - G55 + G56 Unchecked @@ -266,7 +264,7 @@ - G56 + G57 Unchecked @@ -274,7 +272,7 @@ - G57 + G58 Unchecked @@ -282,7 +280,7 @@ - G58 + G59 Unchecked @@ -290,7 +288,7 @@ - G59 + G59.1 Unchecked @@ -298,7 +296,7 @@ - G59.1 + G59.2 Unchecked @@ -306,7 +304,7 @@ - G59.2 + G59.3 Unchecked @@ -314,7 +312,7 @@ - G59.3 + G59.4 Unchecked @@ -322,7 +320,7 @@ - G59.4 + G59.5 Unchecked @@ -330,7 +328,7 @@ - G59.5 + G59.6 Unchecked @@ -338,7 +336,7 @@ - G59.6 + G59.7 Unchecked @@ -346,7 +344,7 @@ - G59.7 + G59.8 Unchecked @@ -354,15 +352,7 @@ - G59.8 - - - Unchecked - - - - - G59.9 + G59.9 Unchecked @@ -376,7 +366,7 @@ <html><head/><body><p>If multiple coordinate systems are in use, setting this to TRUE will cause the gcode to be written to multiple output files as controlled by the 'order by' property. For example, if ordering by Fixture, the first output file will be for the first fixture and separate file for the second.</p><p><br/></p><p><br/></p></body></html> - <html><head/><body><p>If True, post-processing will create multiple output files based on the <span style=" font-style:italic;">order by</span> setting.</p><p><br/></p><p>For example, if <span style=" font-style:italic;">order by</span> is set to Tool, the first output file will contain the first tool change and all operations, in all coordinate systems, that can be done with that tool before the next tool change is called.</p><p><br/></p><p>If <span style=" font-style:italic;">order by</span> is set to <span style=" font-style:italic;">operation</span> and <span style=" font-style:italic;">split output</span> is true, each operation will be written to a separate file.</p></body></html> + <html><head/><body><p>If True, post-processing will create multiple output files based on the <span style=" font-style:italic;">order by</span> setting.</p><p><br/></p><p>For example, if <span style=" font-style:italic;">order by</span> is set to Tool, the first output file will contain the first tool change and all operations, in all coordinate systems, that can be done with that tool before the next tool change is called.</p><p><br/></p><p>If <span style=" font-style:italic;">order by</span> is set to <span style=" font-style:italic;">operation</span> and <span style=" font-style:italic;">split output</span> is true, each operation will be written to a separate file.</p></body></html> Split Output @@ -386,7 +376,7 @@ - + Qt::Vertical @@ -399,7 +389,7 @@ - + @@ -417,7 +407,7 @@ 0 0 548 - 941 + 929 @@ -434,50 +424,48 @@ 0 - - - - - - - 0 - 0 - - - - 2 - - - - Create Box - - - - - Create Cylinder - - - - - Extend Model's Bound Box - - - - - Use Existing Solid - - - - - - + + + + + + 0 + 0 + + + + 2 + + - Refresh + Create Box - - - - + + + + Create Cylinder + + + + + Extend Model's Bound Box + + + + + Use Existing Solid + + + + + + + + Refresh + + + + @@ -534,7 +522,7 @@ - + @@ -550,7 +538,7 @@ - + @@ -573,10 +561,10 @@ - + - + @@ -609,10 +597,10 @@ - + - + @@ -631,7 +619,7 @@ - + Set Origin @@ -652,7 +640,7 @@ - + @@ -901,45 +889,43 @@ - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - -180.000000000000000 - - - 360.000000000000000 - - - 90.000000000000000 - - - - - - - Compound - - - true - - - - - + + + 0 + + + 0 + + + 0 + + + 0 + + + + + -180.000000000000000 + + + 360.000000000000000 + + + 90.000000000000000 + + + + + + + Compound + + + true + + + + @@ -1234,37 +1220,35 @@ - - - - - - false - - - Edit - - - - - - - Add - - - - - - - false - - - Remove - - - - - + + + + + false + + + Edit + + + + + + + Add + + + + + + + false + + + Remove + + + + @@ -1361,7 +1345,7 @@ - + QFormLayout::AllNonFixedFieldsGrow @@ -1380,86 +1364,84 @@ - - - - - - QAbstractItemView::InternalMove + + + + + QAbstractItemView::InternalMove + + + + + + + + 1 - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - ... - - - - :/icons/button_up.svg:/icons/button_up.svg - - - - - - - ... - - - - :/icons/button_down.svg:/icons/button_down.svg - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - + + 1 + + + 1 + + + 1 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + ... + + + + :/icons/button_up.svg:/icons/button_up.svg + + + + + + + ... + + + + :/icons/button_down.svg:/icons/button_down.svg + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + - + diff --git a/src/Mod/Path/Gui/ViewProviderPath.cpp b/src/Mod/Path/Gui/ViewProviderPath.cpp index 870e937702..dbb449b4d1 100644 --- a/src/Mod/Path/Gui/ViewProviderPath.cpp +++ b/src/Mod/Path/Gui/ViewProviderPath.cpp @@ -549,6 +549,7 @@ public: virtual void g38(int id, const Base::Vector3d &last, const Base::Vector3d &next) { +#if 0 Base::Vector3d p1(next.x,next.y,last.z); points.push_back(p1); colorindex.push_back(0); @@ -561,6 +562,11 @@ public: colorindex.push_back(0); pushCommand(id); +#else + (void)last; + const std::deque pts{}; + gx(id, &next, pts, 2); +#endif } private: diff --git a/src/Mod/Path/PathScripts/PathFixture.py b/src/Mod/Path/PathScripts/PathFixture.py index cfa67d4c47..4a847306ff 100644 --- a/src/Mod/Path/PathScripts/PathFixture.py +++ b/src/Mod/Path/PathScripts/PathFixture.py @@ -38,7 +38,6 @@ class Fixture: QT_TRANSLATE_NOOP("App::Property", "Fixture Offset Number"), ) obj.Fixture = [ - "G53", "G54", "G55", "G56", @@ -68,7 +67,6 @@ class Fixture: def execute(self, obj): fixlist = [ - "G53", "G54", "G55", "G56", diff --git a/src/Mod/Path/PathScripts/PathGuiInit.py b/src/Mod/Path/PathScripts/PathGuiInit.py index fca0052a5a..3ad0db2b42 100644 --- a/src/Mod/Path/PathScripts/PathGuiInit.py +++ b/src/Mod/Path/PathScripts/PathGuiInit.py @@ -85,10 +85,12 @@ def Startup(): import camotics r = subprocess.run( - ["camotics", "--version"], capture_output=True, text=True + ["camotics", "--version"], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, ).stderr.strip() - v = parse(r) + v = parse(r.decode("utf-8")) if v >= Version("1.2.2"): from PathScripts import PathCamoticsGui except (FileNotFoundError, ModuleNotFoundError): diff --git a/src/Mod/Path/PathScripts/PathJobGui.py b/src/Mod/Path/PathScripts/PathJobGui.py index 8ea9cb60ab..8727f17ec4 100644 --- a/src/Mod/Path/PathScripts/PathJobGui.py +++ b/src/Mod/Path/PathScripts/PathJobGui.py @@ -768,7 +768,7 @@ class TaskPanel: ] try: self.obj.SplitOutput = self.form.splitOutput.isChecked() - self.obj.OrderOutputBy = str(self.form.orderBy.currentText()) + self.obj.OrderOutputBy = str(self.form.orderBy.currentData()) flist = [] for i in range(self.form.wcslist.count()): @@ -778,7 +778,8 @@ class TaskPanel: ): flist.append(self.form.wcslist.item(i).text()) self.obj.Fixtures = flist - except Exception: + except Exception as e: + PathLog.debug(e) FreeCAD.Console.PrintWarning( "The Job was created without fixture support. Please delete and recreate the job\r\n" ) diff --git a/src/Mod/Path/PathScripts/PathSurface.py b/src/Mod/Path/PathScripts/PathSurface.py index 7b1daa0088..33cf4d92f7 100644 --- a/src/Mod/Path/PathScripts/PathSurface.py +++ b/src/Mod/Path/PathScripts/PathSurface.py @@ -2103,7 +2103,7 @@ class ObjectSurface(PathOp.ObjectOp): hlim = bb.XMax # Compute max radius of stock, as it rotates, and rotational clearance & safe heights - self.bbRadius = math.sqrt(hlim ** 2 + vlim ** 2) + self.bbRadius = math.sqrt(hlim**2 + vlim**2) self.clearHeight = self.bbRadius + JOB.SetupSheet.ClearanceHeightOffset.Value self.safeHeight = self.bbRadius + JOB.SetupSheet.ClearanceHeightOffset.Value