CauldronDevelopmentLLC / CAMotics

Open-Source Simulation & Computer Aided Machining - A 3-axis CNC GCode simulator
Other
611 stars 142 forks source link

Simulation wave artifact. #287

Open jcoffland opened 5 years ago

jcoffland commented 5 years ago

Simulating with a conical tool at a resolution slightly less than the step over of a path which scans back and forth can lead to a wave pattern artifact in the cut workpiece.

Example TPL:

rapid({z: 5});
rapid(0, 0);

feed(400);
speed(10000);
tool(1);
cut({z: -6});

var step = 1;
var off = workpiece().offset;
var dim = workpiece().dims;

for (var i = 0; i <= dim.y / step; i++) {
  cut({y: i * step + off.y});
  cut({x: (i % 2) ? 0 : (dim.x + off.x + 5)});
}

rapid({z: 5});

With a 10° 10mm dia. conical tool and 50x50mm workpiece, this produces:

wave_artifact-path

When simulated at 0.9mm grid resolution, just less than the 1mm step over, you get this false wave pattern:

wave_artifact-0 9mm

Simulating at 0.2mm yields a much better simulation without the false wave:

wave_artifact-0 2mm

The wire views of each simulation show that the waves appear where the simulation grid is offset most from the path.

wave_artifact-0 9mm-wire

They don't appear in the 0.2mm simulation because the grid is small enough:

wave_artifact-0 2mm-wire

Camotics simulation file for reference:

{
  "units": "metric",
  "resolution-mode": "manual",
  "resolution": 0.9,
  "tools": {
    "1": {
      "units": "metric",
      "shape": "conical",
      "length": 57.150262,
      "diameter": 10,
      "description": ""
    }
  },
  "workpiece": {
    "automatic": false,
    "margin": 5,
    "bounds": {"min": [5, 5, -10], "max": [55, 55, 0]}
  },
  "files": ["wave_artifact.tpl"]
}