Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Introduced experimental option to fully disable solid infill against walls when ensure vertical thickness is turned off #3235

Merged
merged 19 commits into from
Jan 18, 2024

Conversation

igiannakas
Copy link
Contributor

@igiannakas igiannakas commented Dec 22, 2023

Introduced experimental option to fully disable solid infill printed against sloping walls even when ensure vertical thickness is turned off.

Fixes #3224
Fixes #3016
Fixes #1887

Ensure vertical thickness ON:
We can see solid infill against the walls even on pretty much flat surfaces. This is the most conservative option.
image

Ensure vertical thickness OFF:
Solid infill greatly reduced in mostly flat areas.
image

However it is present on sharp sloping surfaces like the below. So this resulted in the total volume of infill to be increased as also increasing the print time. This is because of the more infill applied to high degree sloping surfaces compared to the new ensure vertical thickness algorithm.
image

With the Further reduce solid infill on walls option ON:
Sloping surfaces infill completely eliminated. Print time is lower now compared to the ensure vertical thickness on and with ensure vertical thickness off as is material use.
image

This PR respects the need for solid infill where features are printed over bridges so we dont end up with unsupported features when printing external wall features that require internal bridging:
image
image

It also doesnt affect the treatment of the first layer over an external bridge:
Before:
image
After:
image

Implementation details:
Turns out the discover horizontal shells function that was used when ensure vertical thickness was off allowed for significantly reduced wall solid infill when the infill density was set to 0. This was because it was assumed by the developers that the user would only want to print the hollow object.

With this PR we are piggy backing on that code and enabling the calculation of a reduced solid wall infill even when infill density is >0.

image
image

…l when ensure vertical thickness is turned off.
@igiannakas
Copy link
Contributor Author

Pushed a minor parameter update to make this option somewhat safe for sloped top surfaces where the perimeters were close to overhanging.

Slight increase in print time but still very effective.

image

@Eldenroot
Copy link
Contributor

Wow, thank you!

@igiannakas
Copy link
Contributor Author

Wow, thank you!

The code change is pretty simple but I am debating a few things:

  1. Do we keep this as a separate option or replace the behaviour when the ensure vertical shell thickness is de-selected? Its pretty "safe" with the latest code submission and the legacy algorithm doesn't always behave as expected.
  2. Is the name correctly reflecting what we are trying to do?
  3. Is this even worth while?

The way it is with this PR now, is we have a spectrum of 3 options -

  1. ensure ticked - the most conservative option, the shells are always the right thickness
  2. unticked -> middle of the road, reduces solid infill in most cases
  3. further reduce infill -> the most aggressive in reduction, always reduces solid infill

@Eldenroot
Copy link
Contributor

It depends... there are many "conservative" users who does not like new things or prefer the old behaviour. For example arachne vs classic perimeter generator :) there are and there will be always two camps of these users.

Maybe we should use new "enhanced" code as a default option and behaviour BUT provide an "option" - switch to the old mode.

@ShryuKt
Copy link

ShryuKt commented Dec 23, 2023

Thanks for this PR, I've been waiting for it for a moment ^_^.
I haven't fully tested it but it looks good to me.

Just a small thing, it might be better not to add an option but rather to modify the "Ensure vertical shell thickness" option as a drop-down menu (with 3 options like Active, inactive and aggressive)

@HakunMatat4
Copy link

It depends... there are many "conservative" users who does not like new things or prefer the old behaviour. For example arachne vs classic perimeter generator :) there are and there will be always two camps of these users.

Maybe we should use new "enhanced" code as a default option and behaviour BUT provide an "option" - switch to the old mode.

Yup, I agree with that in parts.
This awesome PR also covers a ticket I opened, to cover both "camps" I think this should not be added enabled by default.

Ensure vertical shell thickness was added back and enabled by default, that is wrong, many users won't even bother to change stuff, but those like us who do, the last thing you want is a feature added back messing things around.
I had it disabled only to find out printing time and filament was out of chart because of it.

This is a somewhat advanced/enhancement feature which users like us can very well enable/disabled it.
Unless of course, setting it enabled by default won't harm ordinary users.

@igiannakas
Copy link
Contributor Author

The only problem with the drop down is that it may break I think the printer profiles. But not 100% sure so I’ll wait for softfever to chime in with a review

@igiannakas
Copy link
Contributor Author

igiannakas commented Dec 23, 2023

It depends... there are many "conservative" users who does not like new things or prefer the old behaviour. For example arachne vs classic perimeter generator :) there are and there will be always two camps of these users.
Maybe we should use new "enhanced" code as a default option and behaviour BUT provide an "option" - switch to the old mode.

Yup, I agree with that in parts. This awesome PR also covers a ticket I opened, to cover both "camps" I think this should not be added enabled by default.

Ensure vertical shell thickness was added back and enabled by default, that is wrong, many users won't even bother to change stuff, but those like us who do, the last thing you want is a feature added back messing things around. I had it disabled only to find out printing time and filament was out of chart because of it.

This is a somewhat advanced/enhancement feature which users like us can very well enable/disabled it. Unless of course, setting it enabled by default won't harm ordinary users.

I wouldn’t change the default behaviour of ensure vertical shell thickness being on to be honest. Not sure if that’s what you’re thinking here, but it’s the safest option hence the default. Users can mess it up in so many ways (1-2 perimeters with very sloped surfaces for example) that it would be best to keep it turned on

@SoftFever SoftFever added this to the 1.9.0 beta milestone Dec 24, 2023
@igiannakas
Copy link
Contributor Author

igiannakas commented Dec 24, 2023

Found a bug with ensure vertical thickness off, not related to this PR:

When ensure vertical thickness was off, the bridges over the letters were way too short, not expanding enough to allow good bridging. This resulted in the bridges collapsing and filling the letters with loose filament.

image

This did not happen with ensure vertical thickness on:
image

This was because the process external surfaces was called before the discover horizontal shells (the ensure vertical thickness disabled function) but after the discover vertical shells (that is the ensure vertical thickness enabled function).

Reordered the function so its after the discover horizontal shells. Results as below - beautiful bridging:
image

@Eldenroot
Copy link
Contributor

Good catch!

@liftbag
Copy link

liftbag commented Dec 25, 2023

I find the function of further reducing solid infill on walls very interesting. However, there are cases where I cannot use it, because it prevails over the ability to generate a consistent number of top shell layers where the top surfaces are slightly inclined rather than flat.
Fortunately the parameter can be assigned to modifiers, but I wonder if it is possible to introduce a mediation in the algorithm, for example establishing from which angle the number of top shell layers should prevail.

Screenshot 2023-12-25 alle 13 06 15 Screenshot 2023-12-25 alle 13 07 22

In this example, 7 top shell layers are set, but further reduce solid infill on walls is enabled.
IMG_9478-edited

@igiannakas
Copy link
Contributor Author

igiannakas commented Dec 25, 2023

Is this with the latest build?

@igiannakas
Copy link
Contributor Author

Also could you please attach your 3mf project file?

@liftbag
Copy link

liftbag commented Dec 25, 2023

Also could you please attach your 3mf project file?

Yes, I'm on build #397.

Here the 3mf file.

Hiby dock_base.3mf.zip

@igiannakas
Copy link
Contributor Author

Also could you please attach your 3mf project file?

Yes, I'm on build #397.

Here the 3mf file.

Hiby dock_base.3mf.zip

There is an interaction between this option and the single wall top perimeter. Set the top surface threshold to 200% or greater and the sloped surface now has partial supporting infill.

But in general a model like that with sloped surfaces really does need the ensure vertical shell thickness option turned on to print best - that is what this option is for :)

@igiannakas
Copy link
Contributor Author

There is an alternative way to implement this - prusa3d/PrusaSlicer#11950

Basically disable the combining of holes in the new ensure vertical shell thickness algorithm while retaining the combine surfaces. This removes most of the side wall infill but retains the top layers better. I'll open another PR tomorrow with this approach implemented and we just need to pick one of the two.

@Eldenroot
Copy link
Contributor

Eldenroot commented Dec 25, 2023

Good catch, anyway quite difficult to say which way is the better one :( I like both approaches

@igiannakas
Copy link
Contributor Author

Good catch, anyway quite difficult to say which way is the better one :( I like both approaches

I’ve opened an alternative PR on this based on the work that vovodroid did for prusa slicer. Waiting for the build to finish in order to upload screenshots.

Then we can test both and decide on which one

@igiannakas
Copy link
Contributor Author

Latest parameters:

image

image

image

This should be a good balance between infill and sloped surfaces.

@igiannakas igiannakas marked this pull request as ready for review January 8, 2024 15:17
@igiannakas
Copy link
Contributor Author

@SoftFever ready for review. Will also do a bit more parameter testing specifically this statement to see whether we can go even less with the filtering to make it more conservative.

                        // Orca: Also use the same strategy if the user has selected to reduce
                        // the amount of solid infill on walls. However reduce the margin to 20% overhang
                        // as we want to generate infill on sloped vertical surfaces but still keep a small amount of
                        // filtering. This is an arbitrary value to make this option safe
                        // by ensuring that top surfaces, especially slanted ones dont go **completely** unsupported
                        // especially when using single perimeter top layers.
                        float margin = region_config.reduce_wall_solid_infill? float(neighbor_layerm->flow(frExternalPerimeter).scaled_width()) * 0.2f : float(neighbor_layerm->flow(frExternalPerimeter).scaled_width());

@ShryuKt
Copy link

ShryuKt commented Jan 8, 2024

This last build looks good to me.
A little bit too much solid infill for my taste, but no problem on the top layers.

Like you I would prefer to always use this option but it seems that it is not possible, so best of both world I guess ^_^

@igiannakas
Copy link
Contributor Author

So I've done some more testing with the above parameters. The currently submitted PR is where I'd say I'm happy to leave it for my personal preference. Any less and the slanted top surfaces become risky, any more and the reduction is not as significant as it can be.

@SoftFever ready for your review and feedback

@igiannakas igiannakas changed the title ENH: Introduced experimental option to fully disable solid infill against walls when ensure vertical thickness is turned off [Feature] Introduced experimental option to fully disable solid infill against walls when ensure vertical thickness is turned off Jan 12, 2024
@Panacaguy
Copy link

@igiannakas Just curious if your proposed implementation would help for my use case. I print RC airplanes with single wall and some non-zero level of infill. These extra walls trying to enforce top/bottom thickness are driving the weight up ~10 or more percent depending on the file. To me, having an option to specify an angle threshold to determine where it does or does not ensure the vertical wall thickness would be ideal, but maybe that opens up too much potential trouble for the casual user to get into trouble, or maybe it would be too difficult to implement in the code. Anyway, I'd love to hear your take on if your proposed fix will reduce or eliminate extra material on sloped surfaces of ~35-45 degrees on up, specifically, single wall prints with ~5% infill.

This... (achieved using height range modifiers)
image
Not this... (note, ensure vertical wall thickness not enabled)
image

@igiannakas
Copy link
Contributor Author

@igiannakas Just curious if your proposed implementation would help for my use case. I print RC airplanes with single wall and some non-zero level of infill. These extra walls trying to enforce top/bottom thickness are driving the weight up ~10 or more percent depending on the file. To me, having an option to specify an angle threshold to determine where it does or does not ensure the vertical wall thickness would be ideal, but maybe that opens up too much potential trouble for the casual user to get into trouble, or maybe it would be too difficult to implement in the code. Anyway, I'd love to hear your take on if your proposed fix will reduce or eliminate extra material on sloped surfaces of ~35-45 degrees on up, specifically, single wall prints with ~5% infill.

This... (achieved using height range modifiers) image Not this... (note, ensure vertical wall thickness not enabled) image

Download the build above and let me know what you think. Enable the reduce solid infill and the further reduce option and see the results

@Panacaguy
Copy link

Panacaguy commented Jan 17, 2024 via email

@igiannakas
Copy link
Contributor Author

Create a git hub account then download it from the bottom of the page here: https://github.com/SoftFever/OrcaSlicer/actions/runs/7552665935

you can download the portable version which won’t mess with your current install.

@Panacaguy
Copy link

Download the build above and let me know what you think. Enable the reduce solid infill and the further reduce option and see the results

Works great! That will save me a lot of time (and weight) on my airplanes. Thanks a bunch!

@igiannakas
Copy link
Contributor Author

Download the build above and let me know what you think. Enable the reduce solid infill and the further reduce option and see the results

Works great! That will save me a lot of time (and weight) on my airplanes. Thanks a bunch!

Welcome 😀

@HakunMatat4
Copy link

@igiannakas I am running this version that fixes the chaotic printing by layer order, finally: https://github.com/SoftFever/OrcaSlicer/actions/runs/7529929480?pr=3685
Are your changes merged to it, how does it work???

Atm, OrcaSlicer is incapable of printing by layer following the object list creating tons of headache, personally I judge that higher issue but I wanna keep your PR too haha
Please, tell me something positive.

@igiannakas
Copy link
Contributor Author

@igiannakas I am running this version that fixes the chaotic printing by layer order, finally: https://github.com/SoftFever/OrcaSlicer/actions/runs/7529929480?pr=3685 Are your changes merged to it, how does it work???

Atm, OrcaSlicer is incapable of printing by layer following the object list creating tons of headache, personally I judge that higher issue but I wanna keep your PR too haha Please, tell me something positive.

I've sent you a DM with a build that contains both, till they are reviewed and merged.

Copy link
Owner

@SoftFever SoftFever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Thank you so much for your expceptional contribution!

@SoftFever SoftFever merged commit 0b6968c into SoftFever:main Jan 18, 2024
12 checks passed
@igiannakas
Copy link
Contributor Author

Welcome 🙏🏻🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants