Welcome! Log In Create A New Profile

Advanced

Script for correcting layers misalignment

Posted by rolago 
Script for correcting layers misalignment
February 11, 2016 02:53AM
My delta printer produces 3d objects with a slight milsalignment along X axis. In order to correct it, I have developed a script for post-processing g-code files.

The script processes g-code files loaded into Repetier and compensate for layers shift, both in X and Y directions.

Recently I ave added a scaling feature, in order to grow/shrink 3d objects in X and Y directions.
The script is named "rolagoproc.pl" . For usage in Repetier Host, you have to declare its pathname in menu Printer Settings -> Advanced as in the following example:

"perl C:\Users\alfa\Desktop\3dpostproc\rolagoproc.pl #out

In this way, the script is executed after each slicing action and operates a filtering on the g-code produced by the slicer (slic3r).

The parameters to be modified into rolagoproc.pl are grouped into two categories:

1) Layers shifting (typical case of slanted 3d objects)
2) Scaling vs X or Y directions

As an example, see the following settings, that fit all right for my 3d-delta printer:

FOR LAYER SHIFTING COMPENSATION:

my $CRX = -0.002; # $CRX growing and negative, makes left shifting
my $CRY = 0.00; # $CRY growing and negative, makes forward shifting

FOR SCALING OBJECT X-Y DIMENSIONS:

my $XSCALE = 1.006; # x scaling factor
my $YSCALE = 0.986; # y scaling factor

The script is available for free download here:
[github.com]

Have a nice day
Agostino
Re: Script for correcting layers misalignment
February 12, 2016 03:13AM
Looks like a useful facility for those running older firmware such as Marlin. RepRapFirmware already has both of these facilities built in.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login