Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arcs to milling post processor #38

Open
AndyEveritt opened this issue Sep 16, 2020 · 1 comment
Open

Add arcs to milling post processor #38

AndyEveritt opened this issue Sep 16, 2020 · 1 comment

Comments

@AndyEveritt
Copy link
Owner

This will likely need some changes the the ASMBL parser too

@Antoine505
Copy link

Antoine505 commented Feb 27, 2021

Hi Andy,
I'm a big fan of your work in Post-Processor.
As a newbie in the Post-Processor world, I still want to help you.
I found this into other PP for CNC with fusion and I would like to share it :

properties = {
jobUseArcs: true, // Produce G2/G3 for arcs
};

propertyDefinitions = {
jobUseArcs: {
title: "Job: Use Arcs", description: "Use G2/G3 g-codes fo circular movements", group: 1,
type: "boolean", default_mm: true, default_in: true
},
};

Firmware3dPrinterLike.prototype.circular = function (clockwise, cx, cy, cz, x, y, z, feed) {
if (!properties.jobUseArcs) {
linearize(tolerance);
return;
}
// Marlin supports arcs only on XY plane
var start = getCurrentPosition();
if (isFullCircle()) {
if (isHelical()) {
linearize(tolerance);
return;
}
switch (getCircularPlane()) {
case PLANE_XY:
writeBlock(gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), fOutput.format(feed));
break;
default:
linearize(tolerance);
}
} else {
switch (getCircularPlane()) {
case PLANE_XY:
writeBlock(gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), fOutput.format(feed));
break;
default:
linearize(tolerance);
}
}
}

--> It works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants