5axis maker post processer need help

5axis maker post processer need help

stephen.brindle
Advocate Advocate
700 Views
6 Replies
Message 1 of 7

5axis maker post processer need help

stephen.brindle
Advocate
Advocate

hi is there anyway to use centre of tool rather than tip off tool in fusion for mach3 5axix maker as setting up angles ( manually )I have to do +-2.3 on a 16mm ball nose to get back to tip of tool from edge of ball nose see pictures IMG_3923.jpegIMG_3922.jpeg

0 Likes
701 Views
6 Replies
Replies (6)
Message 2 of 7

GeorgeRoberts
Autodesk
Autodesk

Are you using the standard 5axis maker post? 
You could add something into the post to shift each Toolpath point up its tool axis vector by the tool radius, which should give you the centre of the ball.

if you share your post, I can give an example how you’d do it

-

George Roberts

Manufacturing Product manager
If you'd like to provide feedback and discuss how you would like things to be in the future, Email Me and we can arrange a virtual meeting!
0 Likes
Message 3 of 7

stephen.brindle
Advocate
Advocate

hi yes I am using the 5axismaker from the fusion library 

I was told by Autodesk to change false on line 1090 

line 252 to 0 0 

313 set to 1 instead of 0 don't no if this is write 

I do manual head change rotating the a and c axis then I reset my tool 

but as I use bullnose cutters and fusion does tooltip  that's why on a 45 degree its hard to do tool tip as per photo  

this is why I was looking at tool centre

I don't no if mach3 uses tcp or if it is on in the post thanks for your help Steve hi don't no how to insert the 5 axis maker I have 

0 Likes
Message 4 of 7

GeorgeRoberts
Autodesk
Autodesk

This is quite an involved process and would be good to work with one of our partners on if you're not comfortable making the modifications to the post processor. 

 

However, ere is an example showing how you can move the toolpath points to the center of the ball (I have not tested this, so it might need minor tweaks / additional changes). First you need to create a function that will shift the point by a given distance along a vector. Here is a sample that does that which you could add to your post:


// Assuming the point is an array of three numbers [x, y, z]
// and the vector is an array of three numbers [vx, vy, vz]
// and the distance is a positive number
function movePointByDistance(point, vector, distance) {
  // Calculate the magnitude of the vector
  let magnitude = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1] + vector[2] * vector[2]);
  // If the magnitude is zero, return the original point
  if (magnitude === 0) {
    return point;
  }
  // Normalize the vector by dividing each component by the magnitude
  let normalized = [vector[0] / magnitude, vector[1] / magnitude, vector[2] / magnitude];
  // Multiply each component of the normalized vector by the distance
  let scaled = [normalized[0] * distance, normalized[1] * distance, normalized[2] * distance];
  // Add the scaled components to the point coordinates
  point[0] += scaled[0];
  point[1] += scaled[1];
  point[2] += scaled[2];
  
  if (points != '') {
    points += ','
  } 
  points += valFormat.format(point[0]) + ',' + valFormat.format(point[1]) + ',' +  valFormat.format(point[2])    
}

 

This function will allow you to pass a (point, direction, distance) to move by. We will use this to move the points where needed.

 

Next, you will need to change where coordinates are output. In the onLinear and onRapid, you will see this lines:

  var x = xOutput.format(_x);
  var y = yOutput.format(_y);
  var z = zOutput.format(_z);

 

We can move these points by changing them to this (you can do it with a check on the ball tool, like my example):

  var x = xOutput.format(tool.type == TOOL_MILLING_END_BALL ? movePointByDistance(_x, currentSection.workPlane.forward, tool.diameter / 2) : _x);
  var y = yOutput.format(tool.type == TOOL_MILLING_END_BALL ? movePointByDistance(_y, currentSection.workPlane.forward, tool.diameter / 2) : _y);
  var z = zOutput.format(tool.type == TOOL_MILLING_END_BALL ? movePointByDistance(_z, currentSection.workPlane.forward, tool.diameter / 2) : _z);

Then, you will also need to adjust the points for initial positioning. To do that, I would add something like this 

function writeInitialPositioning(position, isRequired, codes1, codes2) {
  if (tool.type == TOOL_MILLING_END_BALL) {
    position = new Vector(
      movePointByDistance(position.x, currentSection.workPlane.forward, tool.diameter / 2),
      movePointByDistance(position.y, currentSection.workPlane.forward, tool.diameter / 2),
      movePointByDistance(position.z, currentSection.workPlane.forward, tool.diameter / 2),
    );
  }

 

Finally, you can move the points in onCircular like this

function onCircular(clockwise, cx, cy, cz, x, y, z, feed) {
  
  if (tool.type == TOOL_MILLING_END_BALL) {
    cx = movePointByDistance(cx, currentSection.workPlane.forward, tool.diameter / 2);
    cy = movePointByDistance(cy, currentSection.workPlane.forward, tool.diameter / 2);
    cz = movePointByDistance(cz, currentSection.workPlane.forward, tool.diameter / 2);
    x = movePointByDistance(x, currentSection.workPlane.forward, tool.diameter / 2);
    y = movePointByDistance(y, currentSection.workPlane.forward, tool.diameter / 2);
    z = movePointByDistance(z, currentSection.workPlane.forward, tool.diameter / 2);
  }

 

Hope this helps!

-

George Roberts

Manufacturing Product manager
If you'd like to provide feedback and discuss how you would like things to be in the future, Email Me and we can arrange a virtual meeting!
0 Likes
Message 5 of 7

stephen.brindle
Advocate
Advocate
5 axis maker post 3+2 centre of tool

hi thanks for getting back to us I really appreciate it , looks like you are just down the road in Birmingham uk ,here is my number if you would rather ask questions over the phone xxx-xxxxxxxx this is a hobby machine not a company so I can not afford your partners I am afraid .

this site wont let me insert the post so you can have a look is there any chance you could down load it and tell me where I have to put this script or which to change just so I no I am correct in what I am doing 

what I need it to do is (centre off ball cutter any size)

I touch off the square block in the photo on all sides and top (and reset the datum every time )I manually rotate the head to a set degrees 

I have a b/c axis for the 3+2 

thanks again for your help Steve IMG_3923.jpegIMG_3922.jpeg

0 Likes
Message 6 of 7

stephen.brindle
Advocate
Advocate
5 axis maker post 3+2 centre of tool

hi thanks for getting back to us I really appreciate it , looks like you are just down the road in Birmingham uk ,here is my number if you would rather ask questions over the phone xxx-xxxxxxxx this is a hobby machine not a company so I can not afford your partners I am afraid .

this site wont let me insert the post so you can have a look is there any chance you could down load it and tell me where I have to put this script or which to change just so I no I am correct in what I am doing 

what I need it to do is (centre off ball cutter any size)

I touch off the square block in the photo on all sides and top (and reset the datum every time )I manually rotate the head to a set degrees 

I have a b/c axis for the 3+2 

thanks again for your help Steve 

0 Likes
Message 7 of 7

stephen.brindle
Advocate
Advocate

hi could you tell me where to put the code thanks steve

0 Likes