G-Code Generation
Basic Anatomy
TO generate a sample g-coded file from scratch for testing motion only on D3D :
- Home Axes -
- G28 X0 Y0 - just x and y
- Start moving -
- G1 X50 Y50
- G1 X150 Y50
- G1 X50 Y50
- G1 X150 Y50
This just moves the x axis back and forth
When it comes to extruding - read on.
G Code Generation for 3D Printing
- G code generation for 3D printing is nontrivial because you also have to specify how much filament to extrude
I found that manually writing gcode for the suggested "burn in test" print was nontrivial. A few example lines of gcode taken from test-cube.gcode look like this:
G1 X110.200 Y110.200 E2.00144
G1 X93.000 Y110.200 E2.32498
G1 X93.000 Y93.000 E2.64853
It's all straightforward until you get to E -- this is a measure of how much filament to extrude in mm. But it is additive -- so the file starts at 0 and increases continuously until the end of the file. Slicer programs like CURA do the work of calculating the E value for each movement.
I found I could calculate a value (length of axis movement times layer height times layer width) -- but doing so for the entirety of the file seemed like more work than it was worth. Is there a trick I'm missing?
I also attempted making a file in FreeCAD but had trouble getting a 3D shape with width from my sketch -- my FreeCAD skills are like 1/10.
So anyway, then I googled it: https://www.thingiverse.com/thing:2779287 and thought this should work just fine.
The initial test on my printer shows me that my print area is less than the full 8-inch square bed. Photo attached shows my print area limits.
The front limit (right side of photo) is due to the X-axis motor hitting up against the front frame. The right limit (top side of photo) is less clear -- my extruder refuses to move any further along the X-axis but I don't visually see anything obstructing its motion. The distance left on the axis is about 1 inch.
Which means -- at this point, I don't think this printer has the capacity to complete the burn-in test at any speed, let alone a 16-motor production print.