Automate/script actions within Bambu Studio?

Is there any way to automate or script actions within Bambu Studio? The reason I ask is that I’m printing some very organic medical models; such as the following:

Using the “Support for PLA” filament as an interface layer works well in reducing scarring on the supported areas of the model. However, because of the complex shape the interface is printed over many different layers; leading to many filament changes (with the associated increase in time and waste).

I’ve noticed that even a small change in the angle of the model (rotating it by -/+ 1 degree on X (red) and Y (green)) can result in a significant increase or decrease in the number of filament changes.

What I’d like to do is create a script that will rotate a model by a small amount, slice, check the time/filament use/number filament changes, and repeat (over some small range: e.g. -/+ 5 degrees on X and Y), and then choose the best orientation.

Even if this took 10-20 minutes due to the slicing time, it would often pay off in reduced printing time.

What would be even better of course would be a “find the best orientation for this model to reduce filament changes” option, but it could be done with the above scripting; if Bambu Studio has that facility.

Hi.
Your needs seem pretty reasonable, yet I didn’t understand the need to do it within Bambu Studio.
In short, it doesn’t entail the necessary programming features to do that adequately. However, as open-source software, you can try implementing it or “manipulating” it to achieve your goal.
It seems like a straightforward option to code (wherever language you feel comfortable with) a script to run BS in batch, perform multiple slicing tasks, and assess the output.

2 Likes

I was considering writing an external script (totally separate to Bambu Slicer) to load an STL and try to find the orientation that has the fewest layers that transition from nothing to the model; but that would pick up all bottom layers, rather than just what the slicer thinks needs to be supported.

As for doing it inside BS, I have taken a look at the source on GitHub but as it’s a big project I suspect there would be quite a learning curve to working out how to implement an additional feature.

Ok. Now, I understand the need to do it in the slicer.
I am not aware of how you check the transition layers.
Still, assuming you know how to do so, you can eliminate the usage of support material at the base by setting the support/raft base material identically to the central part.
As an outcome, you will only get the interface layers as intended.

image

1 Like

Yes - that’s what I’m doing (the “Support for PLA” material states that it should only be used for interface layers).

Shame there’s no scripting functionality in BS; I expect it could be used for all sorts of plugin development and useful tools.

I also would enjoy that option, yet I believe only a few would be interested.
Here is a summary of what I know and learned that may be helpful:

  1. BS entails macros and postprocessing scripts, which can be helpful. The postprocessing scripts permit you to set a path to a custom script to be called after slicing. The macros entail conditional, comparison, boolean, and other introductory programming commands, which can be used to change the machine’s operation. The macros are limited to the existing variables/placeholders, which officially are only a few. Yet, I can assure you that other variables are public, as I found it by educated guess. And believe many others exist. You can achieve many things with them, but I think they’re inefficient when used for a purpose different from the intended one.

  2. The existing info is generally outdated and limited. Regarding forums, I would advise the GitHub BStudio webpage, where you can find more technical discussions.
    My primary source of info, which I used to learn, was the Slic3r manual and Prusa Slicer documentation. The Slic3r manual is outdated, but it includes the basis of the slicer, which is still valid today and very helpful when you try to “hack” it.

Regarding your issue, I think that there is software that can optimise the print and support. I read about it, but I cannot recall where exactly. I will try to find it and, if successful, share it.

Edit: The software I refer to is Netfabb; I never used it as I thought it was mainly for Fusion, and I use SW for modelling.
After spending less than an hour, I believe the software has the features you’re looking for. Besides including thorough support generation features, further customisation is possible through Lua scripts. As a Professor, I was granted an educational licence; otherwise, it would overpriced for my usage.

1 Like

looking at the specific example, it is basically cylindrical, with a few lumps at one end. Laying it flat,means there are supports needed all along the curved edge. Stand it upright, and it looks as if you will need no supports on the ‘tube’. Probably, you will need only a few supports on the lumpy bit. You could engineer in your own supports, which will need less clean up. I think you could try that without using the interface material, print the supports in the same material as the object. Designed supports, as mentioned here https://www.youtube.com/watch?v=WYQbxIVLz6Y

Designed supports are certainly a consideration; though likely quite time-consuming with these organic models.

I did try one where I split it up into a few parts that could all be printed vertically (each part having a flat area on the build plate). That works quite well, though I need to improve the joint lines when they’re glued together. I am using the textured PEI plate, so probably the smooth PEI plate would give better results for this application.

Well, if you are prepared to split up the models, then for the one you show, you could most likely split it in half lengthwise, and the two halves would possibly need no supports. I have found for many PLA’s that MEC, or acetone, acts as good enough solvent adhesive. Apply it with a small syringe, if you know where to get one… ABS can be more tricky to print, but would allow you to use acetone vapour smoothing of the surface, and is easily solvent weldable. As usual, perfection is hard work, but you do not need many designed supports, if used in the correct places, and if the printer is tuned to the filament.

1 Like

You know what… I hadn’t thought about splitting in half lengthwise. Definitely worth a try; thanks!