From 38e4182440194ee86a78d1a00978dbd26e78257c Mon Sep 17 00:00:00 2001 From: sliptonic Date: Mon, 11 Jul 2022 16:05:55 -0500 Subject: [PATCH] G38 fixes for probe visualization per mlampert --- src/Mod/Path/App/PathSegmentWalker.cpp | 3 ++- src/Mod/Path/Gui/ViewProviderPath.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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/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: