Tag Archives: slic3r

Custom Start G-code : Is It Worth Changing 

Custom G-code snippet

When you load your Gcode into your printer, it will carry out exactly the commands it is told. Are the default ones the best for your printer…

Why customize the start g-code: Your 3d printer will do exactly what G-codes you tell it to do. So with a bit of careful programming you can optimize your start G-code with no ooze and custom heating.

Why change the start g-code

My 3d printing days go back to the old version of cura, when the version was a lot higher than it is now….(15.xxx)

Once you loaded up a model…set up how you wanted it to print…what you want it printed with…you pressed slice, and it popped out a file that contained the start commands and the stop commands.

Loading this onto an SD card and putting it into your 3d printer, it would happily heat up sensibly, move to the start position sensibly and then start printing.

As slicers have progressed it appears that less thought is put into the start code, almost having it as an afterthought.

Most slicers now place the print nozzle at the printing height before moving onto the bed, or heat both the bed and nozzle up at the same time.

I did try briefly in the past to add custom G-code but it normally just ignored it.

But i revisited it recently after trying out prusaslicer and it trying to crash my machine into one of my bed screws at the start….

What can be done

Once you start looking into what you can change in G-code you will be amazed and perhaps a little afraid to have a go.

But once you start and find that you can control your printer at its lowest level you feel in control.

The start code for most slicers now consists of heat the bed, heat the nozzle, zero the axes, move to the initial layer height, go to the first position and start printing.

Some, as i said above , even switch both bed and nozzle on at the same time, trying to overload your power supply for the length of time they are both on.

The old cura was a lot more gentle with the printer.

Zeroing the axes, moving the printhead up 10mm,heating the bed, heating the nozzle and moving to the start position all in one smooth movement.

This code had the advantage of missing any screwheads in the corners of the bed.

If you looked into it you could sit down manually and write your own g-code for your model using the special strings available and then process it through your favorite slicer.

But why would you- the slicer can do the heavy lifting, you just want to treat your printer with respect at the start and prevent damaging your nozzle as it moves to the start position for printing.

My safe routine

So instead of the standard start G-code trying to break my nozzle off i decided to create a similar routine to the original cura.

But even better, as i got fed up of the ‘snotty nose’ initial ooze and pulling off the filament at startup to reduce the risk of it not sticking i decided to have a look at this as well.

Using the prusaslicer, the startup process i decided on is :

  •  Heat the bed
  • Heat the nozzle to a ‘safe’ temp (160C)
  • Start with no fan
  • Zero the Axes
  • Move z axis up 10mm
  • Move the printhead over the bed
  • Go to the first layer height
  • Heat the nozzle the rest of the way
  • And  start printing.

My first few attempts didn’t end up doing what i wanted, but i persevered and found that using the special placeholders over rode the standard coding.

I used the Marlin g-code command reference to find what i wanted to do.

There are commands to start the heating process and then you can go off and do other things while it is still heating (M104- nozzle heating), or you can start the heating and wait till it is finished to carry on( M109 nozzle heating and wait).

And there is a host of other commands.

My Custom Start G-code

So my list of G-codes for the prusaslicer ended up as :

M190 S[first_layer_bed_temperature]; heat the bed and wait
M109 S160 ; heat the nozzle to a non drip temp
G21; set the system to metric
G90 ; with absolute positioning
M82; set the extruder to absolute
M107; start with the fan off
G28 X0 Y0 ; zero the x and y axes
G28 Z0 ; zero the z axis
G1 Z10.0 F2400.00 ; move the gantry up 10mm to clear any obstructions
G92 E0; zero the extruder
G1 X15.0 Y15.0 ; move the nozzle over the bed
G1 Z[first_layer_height] ; move the nozzle down to the start height
M109 S[first_layer_temperature] ; get the nozzle up to temperature
M117 let's Print…; put on the screen a messageCustom G-code snippet

Did it do what i wanted

The standard heating of the bed first before loading the power supply with anything else did work, i maybe will try starting the bed running and then zero the axes and all the other setup before going back to wait for the bed to finish. – i will update if it seems to work well and not drop the power supply volts on my anet A8 clone.

Setting the nozzle to a safe temp of 160C does get the filament soft but not oozing, this is for pla but may also work for ABS – as yet untried.

Moving the printhead up to miss everything – that worked well.

And again moving the nozzle over the bed – i had to adjust it a bit as the home position is off the bed rather than the corner of the bed.

Moving the nozzle back down shows me whether it will collide with the bed – it shouldn’t if the bed is leveled correctly.

And finishing the heating before printing, again works well with no ooze as the nozzle is so close to the bed.

I did try printing the skirt while heating the nozzle up, but as the filament was not liquid enough to be extruded then it failed while trying to feed the filament…not a good move.

And yes with the two special placeholders it prevented the slicer from putting its code over the top and messing things up.

Will this work with other slicers – yes

You may have to change the placeholder text

Cura has {material_print_temperature_layer_0} as the first layer nozzle temp

And {material_bed_temperature} for the bed temperature.

So those will need changing in the routine above.

But everything else is standard G-code.

In Simplify3d they call it custom scripting – but as i don’t own a copy then….the support area is your best bet i’m afraid.

here is a list of prusa and slic3r placeholders

and the cura ones are here

Advanced start G-code

What else could be added

Bed leveling – once i have my other machine up and running again i will be adding this and seeing if it really does help.

Linear advance – i want to investigate this as it does improve your overall printing.

Within prusaslicer and slic3r there is a section on conditional programming, so you can have your slicer make decisions on your G-code.

So if you always want your second layer temperature to drop a few degrees you can add this to your custom start code rather than setting it up in the slicer.

But be warned that the slic3r and prusaslicer conditional code uses different commands – so once you start getting into that level then it is best to stay with one slicer.

But with the conditional coding you can setup temperature towers for a specific model – changing the nozzle temp at certain heights.

You could run a speed test to see where you start to skip steps in the x and y  axes.

Thee is a host of things you could investigate, but start with the custom G-code to control your machine how you want it to startup and move forward from there.

I hope that this has given you the confidence to have a go at changing your start code – even if it is only changing the message on the lcd (M117)…it just makes the printer yours…..

Most stop codes are ok, they will move the print nozzle up a bit or home the x axis and switch off the heaters. But again you could customize this – but make sure you don’t knock off your model…

Prusaslicer vs Cura : Is it worth moving

3d printer in action

I have now been operating 3d printers for a few years and have got used to creating models – or downloading- slicing and printing. But have recently become more and more frustrated with the Cura interface – so started looking elsewhere.

Knowing that Prusa did their own slicer – originally a slic3r variant (which i have tried..recently)- they have now taken a version and gone their own way.

So is it easier to use, better, more workable, faster, more accurate that cura…let’s find out shall we….

Why a 3d slicer is necessary for 3d printing: A slicer is necessary for 3d printing due to the fact that a 3d printer needs coordinates to send the print head to for it to lay down the molten filament to create the model in 3d from your cad model.

When i started my journey in 3d printing Josef Prusa was making the Prusa i3 mk2, which i eyed enviously at the time.

Not willing to spend that much i settled on a prusa clone from china, which came bundled with cura – the slicing software.

https://upload.wikimedia.org/wikipedia/commons/9/9a/Ultimaker_cura.png
The cura logo

We are talking version 15.xx of cura…the very basic one – but still a very good introduction to slicers…

Following the development of the Cura slicer and their versioning was interesting…now on version 4.xx…this all makes sense.

But version 15 had enough for me to start creating models on my printers.

It was absolutely fantastic.

But i am now looking at the newer versions of cura and seeing all of the parameters you can change under the expert settings and thinking – do i spend more time with the slicer than creating the model or actually printing it.

So I started looking around at other slicers to see what they could offer…

I have looked at Kisslicer – i now use their cal model as a test.

I looked at slic3r, and found that prusa have taken a version and gone in their own direction.

I do like slic3r and may come back to it, but it seems a little less advanced now that the prusaslicer.

I did look briefly at simplify3d – but with a slicer costing more that the printer and the slow updates, reported all over the web then i will give this a miss at the moment.

So i thought i would concentrate on the Prusa slicer.

prusa slicer logo

If i was starting now – what would i advise people to start with – i reckon i would go with Prusaslicer or slic3r rather than cura.

Why…i think just a little less confusing and has more features easily accessible.

That being said, i have only worked with it for just over a week  -and have had a few issues.

This is the reason for this post.…to prevent others from having these issues and to set it up right from the start.

Why look at prusaslicer

Looking at what you can do with Cura, and i know that a lot of the features are now available in there.

I found that creating curved tops was always a problem.

example of stair casing in slicer

As you go up the curve, unless you had chosen a fine layer height then you started to get a coarse stepping at the top.

The other part is that when making things like the x and y belt tensioners – i had a couple snap due to the amount of infill i added, but didn’t want to add it al the way through the model.

Finding that slic3r had adaptive slicing and you could create a layer stack, not just a hard step for the layer change made me smile.

And as i say after finding that the prusaslicer had this option along with the variable fill – i had to give it a go…

First go with Prusaslicer

After using Kisslicer and the introduction wizard to setup the printer, i found the Prusaslicer a bit awkward.

I am sure it is supposed to have a wizard that starts when you first install it, so maybe i have installed and deleted it in the past, but nothing came up.

prusa slicer first view

I do like the fact that you get the four tabs open on startup, with slic3r you have to open them yourself.

I didn’t bother creating a new printer for my anet clone and used an i3 mk2 as a printer.

On slic3r when you add a model it appears in the center.

Ok, but i want to print it front left corner, and until i found that tick box in the file -preferences it would always snap back to the center…..

The Prusaslicer comes with that box unticked, but it is under configuration preferences if you want the model to stay in the center….

First impressions

Looking at it’s simpler interface from the ( to me ) now cluttered cura one, i felt that it was laid out better – similar to the old cura.

But with four individual panels it feels lighter and has more breathing space.

Loading up the Kisslicer model it appears in the center of the plater (their name for the bed).

But is easily dragged to the front corner (where i usually create my models).

The graphical interface is pretty good – with all the features having a mouse over tip to tell you what they do.

I like the feature of setting a face down on the print bed.

And the fact that it is very easy to cut the model into pieces.

Right clicking when you have selected the model brings up another menu with a host more features.

More Features menu

One of the features i was looking at was to add more infill in places where the model maybe more stressed and not everywhere.

Well this is accessed in the right click on the model menu.

If you add a modifier you then have a selection you can modify within the shape you pick.

These are box, cylinder,sphere and slab.

You can easily resize the modifier and placing it manually in the graphical window can be hilarious, or a pain.

add different infill prusaslicer

But help is at hand in the right hand pane with XYZ coordinates.

Clicking on each shows the arrow in the direction of movement.

I was a bit confused with these as they don’t seem to follow convention.

The Y axis going up and down, the x axis left to right and the z axis front to back.

So the x axis is the one in the right direction, the other two are hopefully just wrongly labeled.

But in the right hand pane if you now right click on the little gear you can add the modifier – in this case infill and set it to what you want – i went up to 60%.

And then reslice.

Using the lower slices view in the left pane you can drag the layers slider down to see the effect of adding more infill and make sure it is what you want.

I think this feature is fantastic – with the only problem, even in the more settings the only one i wanted to use was not there – temperature.

I will dig more to see if it is an easy way to create a temperature tower, but i can see that characterizing the printer can be accomplished using most of these parameters.

One more thing about the slider – don’t click on the little plus symbol unless you are ready to change filament.

I must have clicked on it accidentally as the first model i sliced to test it printed all the way up and stopped on the last layer and unloaded the filament- not an expected result…..

So i looked at the G-code in craftware, i thought the listing said M500 ( store settings in eeprom), but i was mistaken and it was M600 (filament change).

But where….

When you click on the little plus on the slider you get a color change created.

There is no callout for this, there is no obvious deletion (especially when it is the final layer), but setting the slider to the layer does give you the option to click on the little x and delete the color change ( about three hours later and an internet search…..) – this has been the only thing i have struggled with so far….

Another excellent feature – especially for any rounded top figures you want to print is adaptive layer editing.

Rounded tops more accurately

Early slicers allowed you to slice at a layer height, and only one layer height.

Now this is ok, with large layer heights giving you shorter print times and lower layer heights longer print times.

Or looked at another way – large layer heights a coarse finish and low layer heights a fine finish.

So what if you have a lot of straight sides that could be finished with the larger layer height and a rounded top that really needs the lower layer height.

In the past you would have to suffer extremely long print times just to get the finer finish at the top.

But more and more slicers are now adding a feature to allow you to have adaptable layer heights.

Not every printer can handle this, so it is worth testing yours – i can’t see why not as they are dumb machines that do what they are told ( well most of the time….).

At the top menu the last item on the right is the variable layer stack – this is only available when in model view (this confused me as i would have thought it would be in sliced view).

adaptive layering - more rounded

Once you click on the layers menu then you get a view to the right of the model of the layers.

Using the mouse ( left and right buttons) to increase and reduce layer heights at the different heights of the model you can reduce the stair stepping at the top of the rounded parts – zooming in can show what effect this has – as can seeing the change in color on screen.

And printing it out it does really reduce the large steps if you choose a fast print time for straight sides.

How easy is it

It has been relatively easy to transition over to the prusaslicer.

There have been a few hiccups, as you would expect – the layer change was the worst one so far.

But the added features and simple interface allows you to start to explore the features instantly.

I did set it to expert control settings as soon as i jumped into it, but maybe the advanced would have been better.

I did click on the simple and would find these too limiting, but anyone starting out would have the very basics to adjust and hopefully the model would be passable.

Overall impressions

I think i am a convert.

I will still use cura 15.xx as a fast chuck it on there and see , but maybe with time even that will stop.

Would i put all my eggs in one basket, i will still look at the different slicers to find what advantages and disadvantages there are.

But most people who want to print models don’t want a steep learning curve, they want the model printed now……

There are a lot who seeing the page for setting the parameters of the printer in terms of speed and acceleration and jerk who would have skipped back to cura.

I did wonder where i would find those and whether they could be used to tune the printer a bit more.

On the Anet a8 i found them under the control ->motion menu and noted those down.

It does work without you setting those up as it will rely on the printer not exceeding its operating parameters coded in to prevent damage.

I will be doing more work on this slicer and hopefully will be creating a series of tutorials showing what it can do.

I will go back to cura version 4.x and see if the same features are in there – if they are ten maybe i will create tutorials on both….

But i hope you will explore the features of prusaslicer and maybe the forerunner slic3r if you are starting to get a bit overwhelmed with the number of elements you can change within cura…

What are your views – what do you think of Cura, prusaslicer or slic3r – let me know in the comments below

Thanks for reading

Phil

 What is 3d Printing Workflow

3d printing workflow

 What is 3d printing workflow

How do you get from the concept to something in your hand with an fdm printer….

What is 3d printing workflow: 3d printing workflow is the method of taking a concept of what you want and turning it into a finished model that does what it is intended to do. 

Let’s break down the workflow into it’s what is actually happening – and this happens for each print you do, whether you follow these exact steps deliberately or just merge them in your head.

3d printing workflow

There are multiple steps within the workflow and these are broken down as :

  • Concept : what you want to create – be it a broken piece or a new design
  • 3d cad: design the article in 3d cad to suit the concept- taking into account 3d print design rules
  • Stl translation: translate the 3d cad file into a mesh file that is necessary for the slicer
  • Sliced: taking the mesh file and creating a layer file for the 3d pritner to be able to print
  • Gcode check: always worth examining the gcode to see if it will look anything like what you want.
  • Print: always a nervous time for the first layer but the exciting time to see the model grow
  • Post processing: removal of supports, stringing, if necessary holes enlargement painting.
  • Done: sit back and look at what you have created…..

let’s look at these in a little more detail.

Model concept

Something breaks, you find that you need a hanger for something,

board game piecesyou have an idea that will revolutionize the beer drinking world, a missing piece from a board game….

All of these will spark off a need to build something.

So you buy a 3d printer.

It may happen the other way around – that you get a 3d printer and print a few models, get disappointed with some of the results and put it into the corner.

But sooner or later you find something that sparks that ‘i have something that will make that…’

You now have something in your head you want to bring into reality.

The first thing to do is to sketch it down with pencil and paper.

Look at it, can you imagine it doing what you need it to do.

Does it look like what you imagined.

Turn the paper, redraw it from a different angle.

Happy, well we can now commit to drawing it in a computer

3d cad programs

To some, now is the scary bit.

3d cad drawing

But 3d cad programs have come a long way to helping the user.

Some of them have basic building blocks – square, cone, ball, and a few others .

With these simple shapes you can build up hugely complex models.

Or if you are more of an organic person there is software that starts out with a ball and you can pinch, extend, add blobs and mould to get the final model.

If you are used to cad programs at work – there will be similar ones – freecad, fusion 360, openscad or similar.

So you can create your model in the cloud or offline to the level of detail you want and the measurements you take.

You may need to come back to this later after actually printing it and adjust it slightly to make it fit – it is normal in industry to go through a few iterations or designs before the final model is accepted and this is what 3d printing excels at.

Stl file translation

To get the cad model into a form that your 3d printer knows what to do with takes a two stage process.

The above model from the cad program needs saving in a format that can be passed through a slicer – don’t worry this is explained below…

But slicers need models in a certain format.

So the cad programs can export the model as a mesh.

Think of the surface of the model, the skin being made up of triangles.

So a curve looked at through a magnifier would consist of loads of triangles rather than this smooth curve.

And all these triangles need to be the right way round for the model to be watertight – yep it means what it says – another word for it is manifold.

The model needs to have no gaps or meshes the wrong way round or the next process gets confused.

You can use a lot of the cad programs to see the meshes to check them or there are specific programs to check the model – like netfabb

The exported file is in the form of a stl file – yep those are the ones you download from places like thingiverse.

These are the files sent onto the final processing before getting to the physical model.

They are processed in programs called slicers….

3d Model slicers

To get the mesh models to print on a 3d printer you need to simplify what the outside or the surfaces are like.

The 3d printer is really a 2d printer that can be raised in height, so

3d printer slicer softwarealmost a 2.5d printer building it one layer at a time.

It can’t turn the extruder upside down to print things underneath, so it needs a process that formats the surfaces into layers.

Or slices…..

Hence the term slicer  – they convert your model into a number of slices that can be built up.

Understanding what slicer software can do, what you can change and what they have hidden is one of the keys to getting good 3d prints.

There are a few slicers out there, not all very user friendly and i hope in the future they will be built into the printer itself to make them easier to use…

We will see…

But in the meantime it can be one of the stumbling blocks for a 3d printing.

If we take one of the most common slicers, cura, and look at what you can adjust – currently ( april 2020) there are over 200 parameters in expert mode with everything turned on that you can adjust….

I don’t want to think of the number of permutations of changes you can make, but it will be in the billions.

This is one reason for quick and dirty prints, i keep an old version of cura ( all the old versions are still available) with it’s simple interface ( makes it a lot quicker to setup and get the file for printing as well)

I am also looking at another slicer with interest called slic3r, which prusa used to copy and add their own mods to, but they have now gone in their own direction and i will explore that one as well in the future.

But getting a slicer that works well with your printer makes your job here a lot easier.

This is the point where you are combining your cad with the material and the printer parameters.

You setup the materials, the rate of flow for the material, the layer height, the speed of the printer, and a few other settings.

Then you press slice, and it takes the model and creates a stack of 2d layers for the printer to understand.

This is the reason you get that characteristic ridged surface on the 3d printed model.

One thing i really would advise you to do is to check your gcode file ( this is the output of the slicer to be passed onto the 3d printer).

If you open the gcode in a program, you are not printing blind.

You can see what the printer will do, where it will start layers, where it will travel between printing parts, what it thinks is an inside surface and an outside face.

In small areas whether it will fill in the details or it will miss parts.

All of these can be sorted in the computer, within the limitations of the technology.

And there will be less failed prints and frustration…..

It is quicker and easier to make changes to the slicer now rather than waiting for the printer to finish…

Once the file has been checked and looks ok on the computer it is finally time to get it out into the world…

3d Printing

These have been around for a while now, they are getting better and easier to use.

The printer is in effect a 3 dimensional robot which lays down

3d printed cloth vase
cloth vase
by Sashko- thingiverse

material when commanded.

So the gcode file the slicer creates is the one that needs to be loaded into the printer for it to replicate the original model.

This can be done with a computer interface ( making sure the computer doesn’t go to sleep as printing times can be quite long ) or it can be transferred to a sd card ( always my preference)

I do smile when i read in forums that the print got to 90% and the computer decided to carry out an update to windows…..

One way around this is to put your internet connection on a metered connection and windows will always ask to update itself……

So you heat the hotend, insert the material you want the model in, select the file for the model and wait…..

The heat bed heats up, the hotend stabilises…and the nozzle moves towards the bed…..

And with its familiar dance across the print bed it starts to lay down material.

And questions start to arise in your head from memories past.

Will it stick to the build plate, did i level the bed enough, when was the last time i cleaned the bed, will i have another power cut…..

But fortunately in this case you have learned that to have the nozzle a little too close to the bed is better than too far away…

And you can cope with the little bit of squish to trim off after.

I always watch the first layer to gauge whether the model will stick.

And yes sometimes it does go wrong, but if you are there for the first layer then you can abort the print, clean the bed and start again.

Maybe even leveling the bed a little before stopping the print….

I do normally pop back to see how the model is going – i am fascinated with seeing it ‘grow’ from the print bed.

As the nozzle and the bed do their dance to create material in the right place to form what has been programmed.

And looking at the screen and seeing 100% with the nozzle lifted away and silent always puts a smile on my face.

And with a sigh i take the scraper and starting at a cornertry to remove the print from the bed.

And move forward to the next and final stage of the 3d printing workflow…

Post processing

Getting the model off the bed is not always an easy job…

I have seen numerous glass plates with chips out of them where the model has stuck and pulled a piece of glass form the plate.

Or in my case with the paper tape on the metal bed, i have ripped up the tape to remove the model from the bed, only to not be able to remove the tape from the model.

But with the model removed you can now hold it up, turn it  around – start to examine it .

Does it look like what you originally conceived, has your mind vision been translated into physical reality.

If it is something to replace a broken part, now is the moment of truth….

Does it fit…..

A lot of time you do need to fettle (technical term for filing, cutting and adjusting the size) things like hole sizes, depending on whether you left enough tolerance for the print.

This is where you will learn what your printer is capable of at the moment and can go through adjustments in the cad program and forward in the workflow ( so reducing the amount of material extruded ) to get a piece you know the size of.

Do you want a smooth finish, does it need a little more curvature.

All these post processing procedures can be now carried out on your model.

Smoother finishes can be material off or filling in the layer lines.

Then spraying with a finish.

More curvature can be change the cad file, or in the case of pla…

Place in a up of hot water – leave for a few seconds – remove and gently adjust  -hold until cool.

But now to have something that a little time ago was just a thought in your head, or a broken article that now has a new lease of life.

With a file that can be shared with everyone around the world to make.

For me it is one of the more magical moments.

I have made a few pieces for childrens doors, and the looks you get when they see it for the first time is really priceless.

Making lithophane lamps, which portray their favourite characters when lit up.

Or giving to grandparents an image of the grandkids when lit from behind.

Finally…

There are endless possibilities to create and repair things with a 3d printer.

Once you have got bitten with the bug you may never stop.

And you may not stop at one printer.

This is mainly due to the time it takes to create the prints….

So one becomes two….two become three…..you know how it is…..

But this workflow is something you get used to.

It looks a lot, but  lot of the time you will download the model in stl format, so shortening the workflow.

It relly is worth checking the model for manifold, and then after creating the gcode to reduce the disappointment.

And keeping your printer in good working condition, rather than waiting for something to break before repairing it.

You can’t cover everything and they will go wrong or need parts replaced.

So keeping spares in stock reduces the frustration of not being able to print now….

But i hope this has shown you a little of the workflow of 3d printing and has inspired you to give it a go…..

What ….no 3d printer….are you going to let a little thing like that stop you…..

Nowadays you can design the 3d model and order one online from 3d printing shops.

The model appears in a few days through the post.

You can then see how close you are to your vision.

So no excuses and it might make you take up the hobby…..

Thanks for reading

phil