Merge pull request #7178 from sliptonic/bug/misc

[Path]  Several small bug fixes
This commit is contained in:
sliptonic
2022-07-13 17:34:21 -05:00
committed by GitHub
7 changed files with 248 additions and 258 deletions

View File

@@ -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") {

File diff suppressed because one or more lines are too long

View File

@@ -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<Base::Vector3d> pts{};
gx(id, &next, pts, 2);
#endif
}
private:

View File

@@ -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",

View File

@@ -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):

View File

@@ -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"
)

View File

@@ -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