Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

adaptive 2d and 2d contour is refusing to output good circular paths

j.cavender
Advocate

adaptive 2d and 2d contour is refusing to output good circular paths

j.cavender
Advocate
Advocate

i cant get this file to output the way i want it to i just want g2 and g3 moves but i get a bunch of g1 ive tried different smoothing and tolerance settings to no avail

 

0 Likes
Reply
Accepted solutions (1)
936 Views
12 Replies
Replies (12)

LibertyMachine
Mentor
Mentor

Hmm....

What are you using for a post?

Mind you, I've got a rather edited Fanuc post here, but what I posted out was nice and concise, no issue with an abundance of G01 moves...


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes

HughesTooling
Consultant
Consultant

This is the toolpath in Fusion, looks pretty good.

Clipboard01.png

 

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes

j.cavender
Advocate
Advocate

using a generic fanuc post with a couple minor tweaks

0 Likes

j.cavender
Advocate
Advocate

here is the code im getting

0 Likes

LibertyMachine
Mentor
Mentor
Accepted solution

yeah....I'm getting a huge amount of code with the generic Fanuc.

hmmm. Sadly, this is outside my ability help with. M y post knowledge is limited

 

 

EDIT: Trial and error with the generic Fanuc versus my heavily modified Fanuc post:

 Find the line that says: 

allowedCircularPlanes = undefined; // allow any circular motion

add this right after it:

allowSpiralMoves = true;

 

Your post is trying to do a spiral, but it can't since your post isn't set to allow it. Just adding taht line to the generic fanuc was all that was needed to severely shrink the posted code


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes

HughesTooling
Consultant
Consultant

I think if you enable spiral moves you need this bit of code added near the top of the onCircular function.

  if (isSpiral()) {
    var startRadius = getCircularStartRadius();
    var endRadius = getCircularRadius();
    var dr = Math.abs(endRadius - startRadius);
	//writeComment("Spiral move");
    if (dr > maximumCircularRadiiDifference) { // maximum limit
      linearize(0.01); // or alternatively use other G-codes for spiral motion
      return;
    }
  }

I think it need to go just after the compensation check.

function onCircular(clockwise, cx, cy, cz, x, y, z, feed) {
  if (pendingRadiusCompensation >= 0) {
    error(localize("Radius compensation cannot be activated/deactivated for a circular move."));
    return;
  }

 

Mark

 

Edit you need to comment out the writeComment line like this.

	//writeComment("Spiral move");

 

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes

LibertyMachine
Mentor
Mentor

Hmm, interesting. The generic Fanuc doesn't have that section of code, but it seems to output code somewhat properly. Adding that bit of java to the generic, the code actually comes out a bit longer but that's just becuase of some comments about spiral moves. It also eliminated a random G01 move halfway through the code. I'll have to incorporate that into my post, thank you Mark!


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes

LibertyMachine
Mentor
Mentor

Turns out my own post had that bit of logic in there already. However, there was a slight modification:

  

//writeComment("Spiral move");
    if (dr > maximumCircularRadiiDifference) { // maximum limit
      linearize(0.01); // or alternatively use other G-codes for spiral motion

Became:

  

	//writeComment("Spiral move");
    if (dr > maximumCircularRadiiDifference) { // maximum limit
      linearize(Spiraltolerance); // or alternatively use other G-codes for spiral motion

 

Also, up at the top of the file, this bit of code:

 

 

capabilities = CAPABILITY_MILLING;
tolerance = spatial(0.002, MM);
Spiraltolerance  = spatial(0.025, MM);

 

In the end, the code it outputs is 58 lines, whereas the edited Fanuc code is 100

 


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
1 Like

HughesTooling
Consultant
Consultant

If you post using the file in this thread using dump.cps you get this. The start radius and end radius are quite close so for most a G2\G3 is fine but sometimes an arc doesn't fit and you'd lose some accracy with an arc. You're probably not going the notice in a roughing cut with stock allowances but you might have a problem occasionally with some leads on finish cuts.

Clipboard01.png

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


1 Like

j.cavender
Advocate
Advocate

thanks guys ive got it just about fixed now

0 Likes

HughesTooling
Consultant
Consultant

Make sure you setup using the code in post #9, I experimented a bit and ended up with 0.01 in the code, if you're using inches that will be a problem.

 

capabilities = CAPABILITY_MILLING;
tolerance = spatial(0.002, MM);
Spiraltolerance  = spatial(0.025, MM);

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes

HughesTooling
Consultant
Consultant

@LibertyMachine Thought the code in your post looked familiar.

http://forums.autodesk.com/t5/computer-aided-machining-cam/reducing-amount-of-nc-code-with-adaptive-...

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


1 Like