I cant find the setting for the feed rate calculation diameter in the post to verify it or change it.
it is set to 25.4mm on the controller but is not an option when posting a program like i have seen in another thread on a similar problem.
is this the section of code where it should be defined?
/** Calculate radius for each rotary axis. */
function getRotaryRadii(startTool, endTool, startABC, endABC) {
var radii = new Vector(0, 0, 0);
var startRadius;
var endRadius;
var axis = new Array(machineConfiguration.getAxisU(), machineConfiguration.getAxisV(), machineConfiguration.getAxisW());
for (var i = 0; i < 3; ++i) {
if (axis[i].isEnabled()) {
var startRadius = getRotaryRadius(axis[i], startTool, startABC);
var endRadius = getRotaryRadius(axis[i], endTool, endABC);
radii.setCoordinate(axis[i].getCoordinate(), Math.max(startRadius, endRadius));
}
}
return radii;
}
/** Calculate the distance of the tool position to the center of a rotary axis. */
function getRotaryRadius(axis, toolPosition, abc) {
if (!axis.isEnabled()) {
return 0;
}
var direction = axis.getEffectiveAxis();
var normal = direction.getNormalized();
// calculate the rotary center based on head/table
var center;
var radius;
if (axis.isHead()) {
var pivot;
if (typeof headOffset === "number") {
pivot = headOffset;
} else {
pivot = tool.getBodyLength();
}
if (axis.getCoordinate() == machineConfiguration.getAxisU().getCoordinate()) { // rider
center = Vector.sum(toolPosition, Vector.product(machineConfiguration.getDirection(abc), pivot));
center = Vector.sum(center, axis.getOffset());
radius = Vector.diff(toolPosition, center).length;
} else { // carrier
var angle = abc.getCoordinate(machineConfiguration.getAxisU().getCoordinate());
radius = Math.abs(pivot * Math.sin(angle));
radius += axis.getOffset().length;
}
} else {
center = axis.getOffset();
var d1 = toolPosition.x - center.x;
var d2 = toolPosition.y - center.y;
var d3 = toolPosition.z - center.z;
var radius = Math.sqrt(
Math.pow((d1 * normal.y) - (d2 * normal.x), 2.0) +
Math.pow((d2 * normal.z) - (d3 * normal.y), 2.0) +
Math.pow((d3 * normal.x) - (d1 * normal.z), 2.0)
);
}
return radius;
}
/** Calculate the linear distance based on the rotation of a rotary axis. */
function getRadialDistance(radius, startABC, endABC) {
// calculate length of radial move
var delta = Math.abs(endABC - startABC);
if (delta > Math.PI) {
delta = 2 * Math.PI - delta;
}
var radialLength = (2 * Math.PI * radius) * (delta / (2 * Math.PI));
return radialLength;
}