Notifications
Clear all

Create G code without Slicing  

  RSS
aheuvel
(@aheuvel)
Member
Create G code without Slicing

Just out of curiosity: what could possilby happen if you just import a model and directly create a G-code without first slicing the file? 

I am trying to understand what happens in every step and from everything I read it feels like creating a G-code is sort of like slicing it. 

Please help this newby out in learning 😀 

Posted : 14/07/2024 6:06 pm
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE: Create G code without Slicing

In general and very simplified way slicing is actually processing the model by converting it to layers with the height of the print layer, so if you have a 0.2mm print layer height then your model is cut into a thin slices of 0.2 height which are stacked one on another.

Then each layer is processed according it many conditions to determine how this  layer can be done by the device by converting it into a list of actions, some of those consist of vectors how to move a print head and how to extrude the filament or set temperature. 

Of course there are additional steps to link moves between layers or inject additional before print/post print or before/after layer custom gcode fragments.

After that everything is converted into a gcode commands.

You could print it differently, but you are limited by the physical constraints the print head has, that's why slicing it makes it easier because it avoids trying to solve hard problem of collision detection. Some printers have a rotating print head and they can literally print left to right ( instead of from bottom to top).

See my GitHub and printables.com for some 3d stuff that you may like.

Posted : 14/07/2024 9:32 pm
aheuvel liked
aheuvel
(@aheuvel)
Member
Topic starter answered:
RE: Create G code without Slicing

Thanks. But not an answer to my question. What would or could happen if you just create a Gcode without slicing a model? 

Posted : 15/07/2024 4:56 am
JoanTabb
(@joantabb)
Veteran Member Moderator
RE: Create G code without Slicing

If you create valid Gcode, you will get a successful result, 
If you create invalid Gcode, you will get unsuccessful results. 
My Hand made gcode is merely used for moving the extruder where I want it for specific purposes. such as placing nuts, magnets or similar into cavities in a print. 

I Would never try to hand code a complex model. 

Your level of success would depend upon your capabilities. 
regards Joan

I try to make safe suggestions,You should understand the context and ensure you are happy that they are safe before attempting to apply my suggestions, what you do, is YOUR responsibility. Location Halifax UK

Posted : 15/07/2024 6:59 am
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE: Create G code without Slicing

You can write guide without slicing, because gcode file is just a text file with guide commands parsed by the firmware.

It's just becomes error prone when you are not doing it in some kind of automatic way,  because the set of the processable commands by firmware depends on the firmware capabilities, and thus you need to know if the given printer understands it, or maybe it needs to be translated to different commands ( as in difference between processing arc moves Vs converting arc to a lot of tiny linear moves)

Additionally software used nowadays also have some extra checks to better plan the moves to avoid for example hitting obstacles.

So if you have a gcode done by hand you just have to remember all of this on your own, such as when to heat the bed, how to purse the filament line on the start, how to move in 3d dimensions and keeping nozzle temperature and trigger filament extraction during  the move to generate extrusion.

The printer itself is just a device with some inputs and outputs, the inputs are usually temperature reported, print head position in x/y/z, filament extruded e, the current drawn by he motors; where the outputs are power to the heat bed, hotend, commands to move the axes.

So in the printer will just do whatever you tell it to do and thus the states are:

Success - command processed and executed, even if it hits something and knocking the model from the bed.

Error - anything else, which usually ends in immediate abort of processing further commands or moving to safe position. The error area is wide - from command not understood, passed parameters out of the acceptable range ( though some printers just my try hard to do stuff and just reach the limit), or safety check triggered ( like initial temperature too low). In case of error sometimes printers do not detect those to be a problem, such as knocking off the printed part from the bed, in other printers if the components are more advanced the certain moves can trigger some reaction such as current drawn by the motor is higher than expected, thus the printer may have hit somethin unexpected ( such as model on the bed) and will return error.

If you are interested in .Ives without slicing then just look for generic CNC devices or how to write a text using a 3d printer and attached felt tip pen to it, which turns a 3d printer into a typical plotter device.

See my GitHub and printables.com for some 3d stuff that you may like.

Posted : 15/07/2024 7:24 am
aheuvel
(@aheuvel)
Member
Topic starter answered:
RE: Create G code without Slicing

Thanks. I am learning so much!

But say I get a model and create a Gcode with PrusaSlicer WITHOUT slicing. What are the odds that something goes wrong? 

Posted : 15/07/2024 10:42 am
3Delight
(@3delight)
Moderator Moderator
RE: Create G code without Slicing

To generate G-Code from within PrusaSlicer you have to slice it. The process is:

Load a model/project into PrusSlicer.

Adjust any settings as needed.

Click on Export G-Code (PrusaSlicer then slices the model into layers and writes the resulting G-Code to a file).

If you are an expert like Joan and others you can hand edit the G-Code file in something like notepad!

So, Slicing is the process of converting a 3D model into separate 2D layers.  The resulting G-Code file is the instructions for the printer telling it how to 'draw' those layers using melted filament.

 

Posted : 15/07/2024 1:36 pm
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE: Create G code without Slicing

I loaded a model and tried to use export gcode, of course it fails because it was not sliced:

So, to answer your question`But say I get a model and create a Gcode with PrusaSlicer WITHOUT slicing. What are the odds that something goes wrong?`
By default it will fail on missing initial parameters for file name output, which are calculated during slicing.

But fi you change the Print Settings > Output options > Output filename format to `derp.gcode` then it will work without an error, but it will slice the model anyway and generated output will be exported as `derp.gcode` filename.

See my GitHub and printables.com for some 3d stuff that you may like.

Posted : 15/07/2024 2:04 pm
Share: