OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

ENH: Introduced experimental option to fully disable solid infill against walls when ensure vertical thickness is turned off

Open igiannakas opened this issue 1 year ago • 23 comments

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

Aiming to address: https://github.com/SoftFever/OrcaSlicer/issues/3224

also possibly this: https://github.com/SoftFever/OrcaSlicer/issues/3016

and this:

https://github.com/SoftFever/OrcaSlicer/issues/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

igiannakas avatar Dec 22 '23 11:12 igiannakas

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

igiannakas avatar Dec 22 '23 13:12 igiannakas

Wow, thank you!

Eldenroot avatar Dec 22 '23 15:12 Eldenroot

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

igiannakas avatar Dec 22 '23 15:12 igiannakas

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.

Eldenroot avatar Dec 22 '23 15:12 Eldenroot

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)

ShryuKt avatar Dec 23 '23 07:12 ShryuKt

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.

HakunMatat4 avatar Dec 23 '23 08:12 HakunMatat4

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 avatar Dec 23 '23 09:12 igiannakas

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

igiannakas avatar Dec 23 '23 09:12 igiannakas

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

igiannakas avatar Dec 24 '23 19:12 igiannakas

Good catch!

Eldenroot avatar Dec 24 '23 19:12 Eldenroot

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

liftbag avatar Dec 25 '23 12:12 liftbag

Is this with the latest build?

igiannakas avatar Dec 25 '23 12:12 igiannakas

Also could you please attach your 3mf project file?

igiannakas avatar Dec 25 '23 12:12 igiannakas

Also could you please attach your 3mf project file?

Yes, I'm on build #397.

Here the 3mf file.

Hiby dock_base.3mf.zip

liftbag avatar Dec 25 '23 13:12 liftbag

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 avatar Dec 25 '23 21:12 igiannakas

There is an alternative way to implement this - https://github.com/prusa3d/PrusaSlicer/pull/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.

igiannakas avatar Dec 25 '23 22:12 igiannakas

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

Eldenroot avatar Dec 25 '23 22:12 Eldenroot

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 avatar Dec 25 '23 23:12 igiannakas

So I've found a major deficiency with the other approach. It stops top solid infill from being generated when the top surface is perfectly flat. That is a no-go. So reopening this one and tweaking the parameters a bit to cover edge cases like the above. Also we will have to accept that for some very slanted surface models, this option is just not suitable and should be disabled.

igiannakas avatar Jan 08 '24 14:01 igiannakas

Latest parameters:

image

image

image

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

igiannakas avatar Jan 08 '24 15:01 igiannakas

@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());

igiannakas avatar Jan 08 '24 15:01 igiannakas

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 ^_^

ShryuKt avatar Jan 08 '24 17:01 ShryuKt

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 avatar Jan 08 '24 23:01 igiannakas

@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

Panacaguy avatar Jan 13 '24 18:01 Panacaguy

@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

igiannakas avatar Jan 13 '24 19:01 igiannakas

I'm not very familiar with Github. I don't know how to do that. I assume it means I would need to compile it once downloaded too? Would it mess with my current install? Sorry if these are dumb questions.v

On Sat, Jan 13, 2024 at 12:01 PM Ioannis Giannakas @.***> wrote:

@igiannakas https://github.com/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: image] https://private-user-images.githubusercontent.com/16466491/296506516-01b2ceac-9c90-4ccf-beab-308236786a94.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDUxNzI2ODIsIm5iZiI6MTcwNTE3MjM4MiwicGF0aCI6Ii8xNjQ2NjQ5MS8yOTY1MDY1MTYtMDFiMmNlYWMtOWM5MC00Y2NmLWJlYWItMzA4MjM2Nzg2YTk0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTEzVDE4NTk0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4MjM2Y2FmZWUxZmZjZDc0YTI4Y2FhNGZlNWE4ODVmMTllZjQ3MmNmYjBlOWJkZDM4NDFkYWZkNmZlMGY1ZTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.eGa5zlJeEZPq6r3xrjIOLJlgD_N5PLh0tPS305sQYW0 Not this... (note, ensure vertical wall thickness not enabled) [image: image] https://private-user-images.githubusercontent.com/16466491/296506767-3bee85b3-ddaf-4d96-929b-d1013b974568.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDUxNzI2ODIsIm5iZiI6MTcwNTE3MjM4MiwicGF0aCI6Ii8xNjQ2NjQ5MS8yOTY1MDY3NjctM2JlZTg1YjMtZGRhZi00ZDk2LTkyOWItZDEwMTNiOTc0NTY4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTEzVDE4NTk0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViMzgxNDBjM2RkMTFlZWFlMzFlY2FmOTZjYTM0ZmFkNGU1ZjMxOGQxZmFmYjA3Mzk4NWI3ZDI5N2VkMDIwMzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.MOpjJeUNtcKvDkFKlhNoopQXyiSqWau9yokUYs6Za_I

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

— Reply to this email directly, view it on GitHub https://github.com/SoftFever/OrcaSlicer/pull/3235#issuecomment-1890716358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5UEO42XGE56JAYFGFA7ITYOLKWZAVCNFSM6AAAAABA7WPNEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQG4YTMMZVHA . You are receiving this because you commented.Message ID: @.***>

Panacaguy avatar Jan 17 '24 03:01 Panacaguy

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.

igiannakas avatar Jan 17 '24 08:01 igiannakas

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!

Panacaguy avatar Jan 18 '24 05:01 Panacaguy

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 😀

igiannakas avatar Jan 18 '24 06:01 igiannakas

@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.

HakunMatat4 avatar Jan 18 '24 06:01 HakunMatat4