Making better use of Flush-into object in Bambu Studio

Inspired by this video from the 3d printing professor a few months ago, https://youtu.be/AsokgzDYBBY?si=zLJKxqVY-BaAQAoV I am embarking on a Proof of concept to see if I can completely eliminate wasted purge from my multi colour prints.

Possibly built on top of potential purge length reductions such as these, Printables

The problems with ‘purge-to’ objects that I think need addressing are:

  1. Keeping a list/pipeline of worthwhile objects to ‘purge-to’ that do not have critical colouring requirements
  2. Selecting ‘purge-to’ objects with the right layer/infill sizes to match the purge requirements of individual multi-colour objects
  3. Avoiding ‘purge-to’ objects introducing extra unnecessary colour changes of their own. ** Update - from testing looks like this isn’t an issue after all**
  4. Solve the purge-to not working on 3+ colours on the same layer issue identified in the 3dpp video. ** Update - from testing looks like this issue has now been resolved **

I have raised some of this as a suggestion on makerworld enhancements. Also I am hoping the v2 BL printers introduce something like automated nozzle swapping to eliminate a fair bit of the purge, or even bigger build plates which would mean more room for purge-to objects.

Have made a start on developing some python scripts to analyse the layer by colour extrusions from the GCODE generated by Bambu Studio.

The main objective of the scripts is
a) To automatically select appropriate purge-to objects to go with each multi colour print.
b) If appropriate re-scale purge-to objects slightly so that their layer/filament usage profile better matches the multi colour object purge requirements.

Will probably handle the list/pipeline stuff just with multi plate file and folder naming and moving completed prints around.

I have made a start on the scripts and have successfully managed to process the G0,G1,G2 and G3s to different types of extrusion lengths - and I am getting figures fairly close to those shown by BS.

My ultimate short term target is to be able to create a plate of these models that is completely waste purge free - with all of the colour swap purging going into random multi coloured tree decoration globes and dummy xmas present boxes.

Update 30/9
Good progress made on analysis of gcode, gcode.3mf and project 3mf files.

Think the best way to hold the queue of potential purge-to objects is in a few multi plate project 3mf files, with associated gcode.3mf files for analysis.

Can the use the ‘printable’ attributes in 3dmodel.model to keep track of which objects have already been printed, plus also potentially the opposite way around in a version of the file to be imported into the multi colour plate.

Managed to also patch the gcode in gcode.3mf files - so should if required be able to resolve the 3+ colours purge to object issue with post processing

Also managed to set the extruder values in model_settings.config in project 3mf’s to the correct colours automatically based on the stl naming - which will be very useful for other projects too.
Will create a separate standalone macro for this.

Also found some slightly odd behaviour in BS re F360 generated multi colour 3mf files. If you File/import the 3mf’s then the individual parts come is as coloured in the correct colour groups - but not the correct colours. However the alignment of the parts is lost. If instead you import the parts via the add button all colouring defaults to 1 - but you do get the objects correctly aligned if you specify multi part object.

Update 30/9. Upon further testing good news - the having to pre-colour purge-to objects issue I expected to have doesn’t seem to be a problem.
Also 3rd colour on a layer seems to work ok now in Bambu Studio - not sure if it has been fixed or was never a problem.
So focus is now purely of selecting and managing purge-to objects.
Have also added the option into my plans to re-scale them slightly if necessary to get the more expensive layers in the purge-to objects to align better with where the purge is needed.

Attached photos are a fairly extreme example - with auto calculated purge lengths - but by adding additional objects it is possible to get the purge ratio down from the about 150% 30g in this example to less than 0.5g. Or less than 2%.

The slicer still seems to need a tiny 2mm prime tower in order for the purge-to logic to work - so still might look to remove that with some post processing.


Update: 2/10
Made some very good progress with scripts - managed to:

  1. Write script to easily extract 3mfs

  2. Script to analyse client multi coloured object Gcode, then match it against generated Gcode for candidate purge-to objects

  3. Iterate through the purge-to objects in order of amount of purge they can handle, until overall purge amount <1g

  4. Create a version of the 3mf purge-to project files with just the selected objects marked as printable - so that it can be easily imported

  5. Example of purge-to objects file - with just selected objects marked as printable attached.

  6. Waste free plate example attached - needs quite a lot of purge-to objects due to the 3 colours on the same layer, plus the fact that the purge-to objects don’t have much infill to purge-to

  7. Finally also created a script that takes a plate of cloned objects and automatically resizes them all to different scales - in case some sizes are better for infill - might have to refine the purge-to object selection algorithm so that it doesn’t alway select the biggest objects. Also functional objects that for example have a top flat surface the same height of the most complicated multi coloured layers may end up being better purge-to targets.

10 Likes

Some experiments with flush-to objects selection algorithms.

Firstly -
V0 - with no flush to objects - total waste 30g, total print time 2h5m - which is over 300% of 1 object
V1 - Simple selection of Flush-To objects in flush impact order - total waste 0.36g, print time 12h12m
V2 - More refined - Select least expensive objects that can take >20% of remaining - total waste 1g, print time 5h3m
Probably need an algorithm like V2 - but selects slightly less but relevant objects


V2 looks bad I suppose - but it does reduce the waste down by a factor of 30 - plus 1 multi colour object takes 2 hrs, adding another 12 ‘useful’ objects only adds 3 hrs.

All objects in this test have 15% infill, 2 walls and three top and bottom layers.

The ultimate aim is to find the perfect ‘purge-to’ object(s) - that take all of the purge for the least additional print time.

3 Likes

Made a lot of progress in the last few weeks while offline from printer - have developed the following python scripts.

  1. 3mf extractor - to easily expand out the project and gcode 3mf zip files into their internal structures - using a macOS finder ‘quick action’

  2. Purge-to object selector - a pyQt6 application that analyses the G-code of the multi coloured object, then goes through a queue of plates of potential purge-to objects analysing their gcode - selecting the ones that most efficiently match the purging requirements of the multi-coloured object. It then creates a modified versions of the purge-to project 3mf files with just the selected objects in - so that they can be easily imported into the multi-colour print.

  3. post merge 3mf modifier - which is needed to bring in the correct slicing attributes of the ‘purge-to’ objects when they differ from the main multi-colour object - such as different infill densities, patterns etc, wall thicknesses etc.

Also as a bi-product of developing this script I have finally solved the issue of how to automatically select the correct virtual extruders for each of the different coloured objects when importing multi colour models from Fusion 360.

  1. Gcode modifier - to optionally remove the prime tower from the final generated Gcode - if you remove it in the settings then ‘purge-to’ doesn’t seem to work. The good thing about this script is that it will be fairly easy to modify it to do other G-code post processing - such as restarting prints a few layers up after failures etc.

  2. Prime-to shape auto re-scaler - which takes 3mf’s with multiple cloned instances of objects and rescales them to many different sizes - to help with selecting the perfect size to maximise ‘purge-to’ benefit.

Next stage is to start running some actual tests now that I am back home and have access to my printers again.

Might use some of the results presentation methods used in the ‘Teaching Tech’ YouTube video just released - to publish my initial results.

Once I am happy will publish some of the scripts on GitHub.

4 Likes

Ready now to start some test prints tomorrow.

With no refinements - 115g of purge on a 120g model - so near to 1:1 purge:model ratio.
With purge to infill (pti), plus reducing purge multiplier to 50% (pm5) - down by 48% to 60.4g of purge
With purge to object + pti + pm5 - down by a total of 96% to 4.8g - Getting to lower than this not easy with only a 180mm3 build plate.



As there is still 1.58m/4.8g of purge - not sure if it would be ok to remote prime tower - so will probably try that on a different model. - but potential for up to another 6.7m/20g saving - or about another 20g - which doesn’t seem to be included by BS in ‘flush’ totals.
1449971C-E1C2-4DAF-BD19-3B74E3AE1015_4_5005_c

3 Likes

Came up with an interesting design for usage of purge waste - a table.
The legs consist of 2 parts dovetailed together and should be quite strong when they are overlapped.
Haven’t segmented up the top yet - but hope to include the prime blocks in it somewhere if I find I need to keep them.
Good news too is that with this design I am able to get total purge down to 1g - which I am happy to regarded to zero waste.



Good news too is that first single colour Test print of Azura at the 1:1250 scale needed to fit on the A1 worked out - so my other thread. So all ready now to kick of a 16hr multi colour print tomorrow.

3 Likes

Test prints proceeding nicely

NB/ I let BS auto ‘re-layout’ the A1 print for the X1C - as the A1 version was overlapping the X1C filament cutter area.

You do still get a tiny bit of off bed purge with each colour - will weigh it at the end - but a lot less than when you don’t use purge-to

Also in parallel - started my Xmas decoration purge free print - BS slicer says 2g of total purge - when compared to 42g if I print the object without any ‘purge-to’ objects. NB/. This test print doesn’t have any of the other optimisations - like purge to infill, and still has 100% extrusion multiplier - so will probably be able to reduce the number of purge-to objects required if these settings work ok on the other print.


2 Likes

For completeness - if I do specify Flush to infill and reduce the flush multiplier down to 50% then the total predicted flush goes down to 20g - so less ‘purge-to’ objects are required to catch it and bring the flush down to <1g


I don’t see that it matters too much though if you allow for plenty of purge - as long as you have got plenty of ‘purge-to’ objects you want to print - and that they all fit on the bed ok.

3 Likes

update - xmas pudding print finished - got a few failures I think because they probably need brims or might need to clean my build plate (or could be due to purge-to process).

You still do get tiny wisps of purge, then it goes to the tiny prime tower, then to the purge-to objects, before finally doing the multi coloured prints.

Weight of the wisps from 81 colour changes <1g - too little for my scales, plus prime tower is 4g - so might try removing it on another test. Overall though I call this a success.

As well as the xmas puddings I have got quite a few useful other decorative parts plus some more parts of my ‘3d printed table’.

Other print - of cruise Ship print 91% complete and looking good too so far. - about 1hr to go - so might leave that for now and pick it up in the morning.




3 Likes

Ship came out pretty well - unfortunately 3 minor faults - with centre pools mainly - so will have to reprint.

Pretty pleased with purge test though - about 6g of waste (for BS not quite correct as it says 1.47g) - so wonder if the length of those wisps can be reduced. Not bad though for 243 colour changes.

Purge-to table leg pile growing nicely - although my algorithm has chosen quite a lot more female than male segments which I have just piled up without interlocking (which is why it looks a bit uneven in the photo). Easy to fix by just removing the plate of female parts out of my ‘purge-to’ queue.




3 Likes

Update after 3rd test print. 200% scale Xmas pudding tree decorations came out really well. Normal purge was 6g - so about 3 times what was predicted. There was also another 5g due to the brown filament running out and remaining on old roll having to be purged out. Prime Tower 7g.

I think that maybe 15% infill is too much for these models - and also not really sure whether the around 25g of filament saving is worth the effort for this type of print - probably more relevant for prints with more colours where having multiple copies of the same multi coloured object not really needed.

Also having less heavy off bed purges does cause a few of the ‘wisps’ to be dragged onto the prime tower - see photo.

Still running a reprint of ship model with faults corrected.

Will post both models on Makerworld/Facebook with and without ‘purge-to’ objects as next stage to see whether there is enough interest in ‘purge-free’ models to warrant further work in this area.






3 Likes

Purge-to table coming on - more than 1 leg now complete - think it should look quite interesting.

Tried to create a rendered version in F360 - only coloured in about a quarter of the render - but shows the general effect quite well I think.


4 Likes

Internal design of the purge-table done, plus found a better way of simulating likely look - using a F360 Wood appearance - with a photo of the current purge leg imported into the appearance as its texture photo.



For many of the parts it will be possible to alter the height so that top surfaces line up better with the layers with colour changes. This will also mean that the height and width of the table will be easy to alter or grow as more purge-to blocks get created.

As I am keen to print out the whole table - may have to switch around the process - and look for suitable multi colour object to print alongside these parts - in order to get a nice pattern of ‘purge-to’ lines.

3 Likes

Interesting to a this tweet from CNC kitchen about purge waste - thought I would try a few experiments with the model he was using ( link)

  1. Start position of part of the model he printed - waste 1kg print time 3d 23h

  2. Introducing a few purge-to objects, make the prime tower a bit small, 1h increase in print time, waste down to 64g.


3 Likes

Ready for another test - quite pleased with this design for the
makerworld xmas decoration competition.

At 100% scale it doesn’t use that much purge - but still think it is worth saving the waste.

Might be more interesting when I try it scaled up to 200%



2 Likes

Didn’t bother with purge-to objects on 200% version - but got a 75% saving on the 100% version.
On makerworld in xmas competition.

Also encountered some strangle slicer behaviours with Brims on Purge-to objects.
If the purge-to objects initial colour is different to the first layer colour on the main multi colour object then brims keep disappearing off of the purge-to objects.





4 Likes

Further investigation of controlled ‘purge-to’ within parts of a decorative object.

Simple version of xmas present model - purge:model ratio. 215%

Increasing copies from 1 to 14 - only 3 times the print time, purge:model ratio down to 18%

Introducing ‘purge-to’ into middle of object - print time up by another 10% - (which I don’t really understand) - but purge ratio down to 0.4%

4 Likes

amazing work ! looking forward to your updates and hope you will share your work in the end

Firstly - decided to change from using purge to flush in this thread from now on - to be more consistent with field names in Bambu Studio.

Next up - just tried the new Beta Bambu Studio - 1.8.0.62 - and noticed a couple of nice changes.

First change - not really flush related - better handling of black objects

Current BS

Beta 1.8.0.62 - blacks now shaded show you can see the detail a lot better

Next up - more relevant to this thread - glad to see that there is a new totals column in the BS Preview screen showing the prime tower usage separately - rather than including it in the model (not flush) total in previous versions.

Current version
B2D65961-00C7-4A6C-BB4F-1170002B9E48_4_5005_c

Beta 1.8.0.62
FC71BCAB-202C-479E-9FD8-75662623E8BC_4_5005_c

3 Likes

Further updates - firstly been doing quite a lot of single colour printing - concentrating much more on print quality than I have done before - mainly creating support free spheres and balls - the reason to mention this is that this has led me to needing to do some 100% infill printing which I have never done before - and 100% infill models are really good flush-into targets - especially parts like the internal double ended screw used to hold the two parts of my spheres together.


Model on makerworld here Eight Ball

Preparing for a test of my gcode post processor to remove the prime tower - some slightly interesting results

Starting point - no flush-into objects - starting point terrible - 36g flush and 10g prime for an 8g model - so waste:model ratio 575%

Test model (black and white rectangles) with 12 flush-into cylinders - flush down by 75% - but quite high at 8g

Adding just one more cylinder though - pushes flush down to <1g

Final screenshot showing what happens if you turn off the prime tower - flush-into no longer works - and flush goes right back up to the starting point

Prime tower removed - now to run an actual test
639C6344-402C-4E09-9AAA-4D2EEE96A338_4_5005_c

Will probably only let it run a few layers to avoid waste - main objective is to a) Check that the printer accepts a patched gcode.3mf file ok over wifi, b) check that movements are ok and c) to see what effect it has on the quality of the flush-into objects.

Test result - success -

went up into infill layers - and printer seemed ok with not having prime tower. Lines went down ok into flush-into objects and colour changes worked ok. Bottom layers of flush-into object put down far more plastic than is needed to flush out the old colour - number of objects determined really by size of infill layers.

Next step - try it on next proper multi colour print.
NB/ This method of removing the prime tower is only relevant when there is sufficient wasted flush to warrant the use of flush-into objects - whose quality probably isn’t as important as the main multi colour object - so can be used from priming as well as flushing.

3 Likes

This is about the best use of purge-to I have seen. I NEED this table model! Is this going to be available anywhere for either pay or free?