MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.29k stars 19.24k forks source link

spiral drill moves with G2 ends up in triangular like hole (RC8) #5732

Closed RedbullVienna closed 7 years ago

RedbullVienna commented 7 years ago

I tried to mill/drill a hole with G2 codes (I using Marlin RC8) but finally it ended up in a hole with triangular like shape. I simulate the g code with CAMotics and their the hole looks fine. Maybe an issue with the 3d spiral move as it is an hole and not simple a circle with a constant z plane. I used the following sequence (from EstlCam):

G02 Y0.0866 Z-4.5000 I0.0500 J0.0866
G02 X0.1000 Y0.0000 Z-4.6000 I0.0500 J-0.0866
G02 X-0.0500 Y-0.0866 Z-4.7000 I-0.1000 J0.0000
G02 Y0.0866 Z-4.8000 I0.0500 J0.0866
G02 X0.1000 Y0.0000 Z-4.9000 I0.0500 J-0.0866
G02 X-0.0500 Y-0.0866 Z-5.0000 I-0.1000 J0.0000
G02 Y0.0866 Z-5.1000 I0.0500 J0.0866
G02 X0.1000 Y0.0000 Z-5.2000 I0.0500 J-0.0866
G02 X-0.0500 Y-0.0866 Z-5.3000 I-0.1000 J0.0000
G02 Y0.0866 Z-5.4000 I0.0500 J0.0866
G02 X0.1000 Y0.0000 Z-5.5000 I0.0500 J-0.0866
G02 X-0.0500 Y-0.0866 Z-5.6000 I-0.1000 J0.0000
G02 Y0.0866 Z-5.7000 I0.0500 J0.0866
G02 X0.1000 Y0.0000 Z-5.8000 I0.0500 J-0.0866
G02 X-0.0500 Y-0.0866 Z-5.9000 I-0.1000 J0.0000
G02 Y0.0866 Z-6.0000 I0.0500 J0.0866
G02 X0.1000 Y0.0000 Z-6.1000 I0.0500 J-0.0866
G02 X-0.0500 Y-0.0866 Z-6.2000 I-0.1000 J0.0000
G02 Y0.0866 Z-6.3000 I0.0500 J0.0866
G02 X0.1000 Y0.0000 Z-6.4000 I0.0500 J-0.0866
G02 X-0.0500 Y-0.0866 Z-6.5000 I-0.1000 J0.0000
G02 Y0.0866 Z-6.6000 I0.0500 J0.0866
G02 X0.1000 Y0.0000 Z-6.7000 I0.0500 J-0.0866
Blue-Marlin commented 7 years ago

If in sub-mm range

#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

and

// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6

become important.

  /**
   * Plan an arc in 2 dimensions
   *
   * The arc is approximated by generating many small linear segments.
   * The length of each segment is configured in MM_PER_ARC_SEGMENT (Default 1mm)
   * Arcs should only be made relatively large (over 5mm), as larger arcs with
   * larger segments will tend to be more efficient. Your slicer should have
   * options for G2/G3 arc generation. In future these options may be GCode tunable.
   */
RedbullVienna commented 7 years ago

THX for the hint!

I have deactivated the G2/3 usage in my CAM SW to came around that issue.

An automatic dynamic adaptation, e.g. two different values like 0.1mm/1mm for small and big radius, for MM_PER_ARC_SEGMENT made by a nice feature.

As soon as I have understood the dependencies with N_ARC_CORRECTION and MIN_STEPS_PER_SEGMENT I will try to write such code.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.