svenhb / GRBL-Plotter

A GCode sender (not only for lasers or plotters) for up to two GRBL controller. SVG, DXF, HPGL import. 6 axis DRO.
https://grbl-plotter.de/
GNU General Public License v3.0
674 stars 176 forks source link

3d Printing svg files with filament per vector #297

Closed kneo1 closed 1 year ago

kneo1 commented 2 years ago

Hi. I am experimenting with 3d printing an svg file. One line per vector and only 1 "slice" or level. Simple lines to be printed directly by the 3d printer head. I am using the "Command extension" with "Add distance related command 1" I use "B" letter save gcode and then search/replace B to E in notepad.

About the "Factor" option, what should it be for extruding through a 0.4mm nozzle? With the default "1" it extrudes way too much. I have tried 0.05 and it extrudes much more reasonably. 1 mm extruded at the nozzle of 0.4mm equals 0.05224489795918367346938775510204 mm on E axis at 1.75mm I believe the "Factor" only takes 2 decimal points.

For the filament retract I use "Pen up/down translation" with "Z" and "Individual" in "Z" heigh set/engrave to 2 and 0 in "Individual" "Pen Up/Down" G91;G1 E-4 F2000;G90 / G91;G1 E4 F2000;G90 for filament retraction on Z up movement. I switch to relative (G91) to retract since there is no way to know the absolute positioning on E axis.

With these options printing the SVG on 3d printer kind of works but extrude ratio is way off, too much filament. About the "Command extention" "Add distance related command 1" the "Absolute value" checkbox does not seem to work? Makes little difference in gcode if any, idk.

Extruder calculations: 1.75mm filament area is 2.4052818754046854481979613403234 sq mm 0.4mm nozzle area is 0.12566370614359172953850573533118 sq mm Ratio: 19.140625

So 1 (one) length of 1.75mm filament will be 19.140625 long 0.4mm filament 1 mm length of 0.4mm filament equals 1/19.140625 of the 1.75mm filament or 0.05224489795918367346938775510204 mm

The extrusion of the filament speed must match the XY speed of the extruder nozzle for the filament to remain relatively uniform 0.4mm If the XY movement is slower that the extrusion rate then more filament will be deposited and the filament will be squished between the nozzle and the table.

svenhb commented 2 years ago

I will add the 'E' axis.

I believe the "Factor" only takes 2 decimal points.

Do you think it must be that accurate (0.05224489795918367346938775510204)? I will extend to perhaps 6 decimals

About the "Command extention" "Add distance related command 1" the "Absolute value" checkbox does not seem to work? Makes little difference in gcode if any,

The distance will be given in absolute or relative values - important if you start the code and forgot to zero your E axis. Whtih absolute values it first turns back to zero....

The extrusion of the filament speed must match the XY speed

I think it is not possible to control via grbl or any other CNC controller: only axis given in one command line can run simultan. with the given one feedrate.

kneo1 commented 2 years ago

The pi number in the calculator gave all those numbers, I guess 6 numbers will be plenty. Does the "Absolute value" apply per figure/vector? If I uncheck the "Absolute" it gives me some like this: ( Use case: example_laser.ini ) ( SVG import by GRBL-Plotter 1.6.6.6 ) ( Source: C:\Users...Spring AI.svg ) (

) ( G-Code lines: 28491 ) ( Pen Down/Up : 449 times ) ( Duration ca.: 17.7 min. ) ( Conv. time : 00:00:00.3777949 ) (
) F1000 (Setup - GCode-Header) G90 G00 Z2.000 M3 S100 G04 P1 (
) G00 X16.854 Y120.544
G01 Z0.000 F1000 (PD) G91 (PD) G1 E4 F2000 (PD) G90 (PD) G01 X16.894 Y120.728 B0.009 F800 G01 X16.949 Y120.896 B0.009
G01 X17.015 Y121.051 B0.008
G01 X17.091 Y121.197 B0.008
G01 X17.176 Y121.334 B0.008
G01 X17.267 Y121.467 B0.008
G01 X17.364 Y121.597 B0.008
G01 X17.463 Y121.726 B0.008
G01 X17.565 Y121.858 B0.008
G01 X17.665 Y121.994 B0.008
G01 X17.764 Y122.137 B0.009
G01 X17.886 Y122.340 B0.012
G01 X17.935 Y122.457 B0.006
G01 X17.973 Y122.584 B0.007
G01 X17.992 Y122.709 B0.006
G01 X17.971 Y122.864 B0.008
G01 X17.912 Y122.925 B0.004
G01 X17.799 Y122.963 B0.006
G01 X17.684 Y122.961 B0.006
G01 X17.569 Y122.925 B0.006
G01 X17.455 Y122.859 B0.007
G01 X17.342 Y122.769 B0.007
G01 X17.231 Y122.661 B0.008
G01 X17.124 Y122.539 B0.008
G01 X17.021 Y122.410 B0.008
G01 X16.923 Y122.278 B0.008
G01 X16.831 Y122.149 B0.008
G01 X16.746 Y122.028 B0.007 Which wont extrude anything that is a repeating number since E is already at that number, because its in G90. Right? B=E axis ofcourse. Is (PD) pen down? Is that where the G90 comes from? Should be G91 if "Absolute value" is not checked, right?

svenhb commented 2 years ago

E is already at that number, because its in G90. Right?

Yes thats right, perhaps this option is not thought through 😉

kneo1 commented 2 years ago

It looks like that (PD) is from the custom code one can write on the Pen up or down action. So I put G91 at the end and the relative mode stays on.

svenhb commented 2 years ago

(PU/PD) are just internal markers, to be able to show the pen-up/-down path even if there is no pen-up/-down translation is given in the setup.

So I put G91 at the end and the relative mode stays on.

Yes... but the X and Y values are still given in absolute coordinates - would give chaos...

Will try to fix that