Ultimaker / CuraEngine

Powerful, fast and robust engine for converting 3D models into g-code instructions for 3D printers. It is part of the larger open source project Cura.
https://ultimaker.com/en/products/cura-software
GNU Affero General Public License v3.0
1.67k stars 880 forks source link

Better tree support for pointy overhangs: Cradle Generation #1880

Open ThomasRahm opened 1 year ago

ThomasRahm commented 1 year ago

Tree Support Cradle Generation

One issue of tree supports is that pointy overhangs are more prone to failing. This PR tries to solve this by surrounding the model with lines orthogonal to the model outline. The model is not densely surrounded with support, as this would make the support impossible to remove without damaging the model.

Example Cradle

It works great in my tests, but i do have some stringing issues with my printer, which may cause the result to be better than with a well tuned printer.

One of my issues is that the the cradle currently has more settings than i think it should.
I am very open to further feedback, as currently this feature has way to many settings.
The settings are currently added using a dummy plugin found here

Settings:

Enforce Initial Layer Diameter Enlarge tips so that the branch could reach Initial layer Diameter. This should improve the tree supports ability to support areas very close to the buildplate. Enabling support skin or using support roof is strongly recommended. Disabled: ![Enforce Initial Layer Diameter Off](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Enforce%2520Initial%2520Layer%2520Diameter%2520Off.png) Enabled: ![Enforce Initial Layer Diameter On](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Enforce%2520Initial%2520Layer%2520Diameter%2520On.png)
Cradle Height The height of the cradle to support pointy overhangs. The cradle will stop generating if the pointy part of the model connects with another part of the model that either rests on the buildplate or already has its own cradle. Set to 0 to disable. Small Cradle Height: ![Small Cradle Height](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Small%2520Cradle%2520Height.png) Large Cradle Height: ![Large Cradle Height](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Large%2520Cradle%2520Height.png)
Minimum Cradle Height If a cradle smaller than this would generate, it just doesn't.
Cradle Lines Amount of lines that should be generated around the model. Low Amount Of Cradle Lines: ![Low Amount Of Cradle Lines](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Small%2520Cradle%2520Line%2520Count.png) Large Amount Of Cradle Lines: ![Large Amount Of Cradle Lines](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Large%2520Cradle%2520Line%2520Count.png)
Cradle Length Length of the lines that generate around the model. Small Cradle Length: ![Small Cradle Length](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Short%2520Cradle%2520Length.png) Large Cradle Length: ![Large Cradle Length](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Long%2520Cradle%2520Length.png)
Cradle Line Width Width of the lines that generate around the model. I would just hard-code this to line width. Small Cradle Line Width: ![Small Cradle Line Width](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Small%2520Cradle%2520Line%2520Width.png) Large Cradle Line Width: ![Large Cradle Line Width](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Large%2520Cradle%2520Line%2520Width.png)
Cradle Threshold Maximum area a pointy overhang may have for the cradle to generate.

Cradle Base Support Area Diameter Size of the tips below an pointy overhang overhang. Also the size of tips below lines if `Large Cradle Line Tips` is active and the roof base if `Cradle Roof Type` is `Large Cradle and Base` Small Cradle Tip Size: ![Small Cradle Line Width](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Small%2520Cradle%2520Tips.png) Large Cradle Tip Size: ![Large Cradle Line Width](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Large%2520Cradle%2520Tips.png)
Cradle XY Distance Distance of the cradle lines from the model, dependent on the height of cradle lines below it (Cradle XY distance) Visualisation: ![Visualisation](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Cradle%2520XY%2520Distance.png)
Cradle Z Distance Distance between cradle lines and the support that supports them. Makes cradle lines easier to fold over.
Large Cradle Line Tips Generate large tips below the cradle lines. Tree Support Large Cradle Line Tips Off: ![Tree Support Large Cradle Line Tips Off](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Large%2520Cradle%2520Line%2520Tips%2520off.png) Tree Support Large Cradle Line Tips On: ![Tree Support Large Cradle Line Tips On](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Large%2520Cradle%2520Line%2520Tips%2520on.png)
Cradle Roof Type How the cradle behaves if roof is enabled. Regular Support ![Regular Support](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Cradle%2520Roof%2520Regular.png) Cradle: ![Cradle](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Cradle%2520Roof%2520Cradle.png) Cradle and Base: ![Cradle and Base](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Cradle%2520Roof%2520Cradle%2520and%2520Base.png) Large Cradle and Base: ![Large Cradle and Base](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Large%2520Cradle%2520and%2520Base.png)
Support Skin Height Height of Support Skin generated to support cradle/interface/model parts that would fall inside of a support area. What i call Support Skin is just a support area with high density zig-zag infill. Small Support Skin Height: ![Small Support Skin Height](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Low%2520Skin%2520Height.png) Large Support Skin Height: ![Large Support Skin Height](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Large%2520Skin%2520Height.png)
Support Skin Line Distance Distance between the lines for said high density support infill. Small Support Skin Line Distance: ![Small Support Skin Line Distance](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Small%2520Skin%2520Line%2520Distance.png) Large Support Skin Line Distance: ![Large Support Skin Line Distance](https://gist.githubusercontent.com/ThomasRahm/4085f269c710a517ee1d9fcfe11976f8/raw/Large%2520Skin%2520Line%2520Distance.png)
Support Skin for Tips Threshold Generate support skin for any tips that have at least this diameter.

Idea behind it

The support structure connects to the model from multiple sides, holding it in tension. These connections are thin (one or two layers). This occurs not only at the beginning of a pointy overhang (where the model itself may not be stable yet), but also further up (configurable with the cradle XY distances and heights).
When removing the support these connection points are twisted off (basically by just folding over the cradle lines). The benefit to holding the model in tension over just surrounding it with material is that it should reduce the chances of the model tipping over slightly (which could enable the nozzle to crash into the model, and rip it of) To improve ease of removal these lines do not touch the model, put are printed closer than the tolerances allow (distance of 0.1mm or 0.15mm).
If soluble support it could be possible to reduce the distance to 0mm and make it much thicker than a few layers. I cant test this though.

Currently known limitations:

Things that should be done

ThomasRahm commented 1 year ago
  1. I added another setting: Tree Support Support Skin for Tips Threshold: Generate support skin for any tips that have at least this diameter.

  2. I got my new direct drive hot-end working: The pointy overhang support feature needs a pretty well tuned xy distance/minimum xy distance distance to work. Most people will not have been tuning that parameter, so it is definitely an advanced feature. With my new hot-end i had success with minimum xy distance set to 0.2mm. It should be where a tolerances test with this distance would not fuse up in a way that it is too hard to separate, but also not too easy.

This brings me to a question: Should how close the cradle can get to the model be independent of xy distance ? It would not be too hard to do (as long as z distance stays the same as i would just offset the collision), but it would be yet another setting.

jellespijker commented 6 months ago

Hi Thomas,

Do you need help resolving the merge conflicts?

ThomasRahm commented 6 months ago

No, thank you. I am currently pretty deep into refactoring this, which is why i put this back to draft. I am still running on 5.6 and will solve the merge conflicts not before the beta for 5.7 releases. My dev environment does not like me switching between the 5.6 and 5.7.

It shows quite a lot of success in simple test models (quality degrading because of the model bending while printing): image With removed support: Untitled

But it still has issues with the hobgoblin, because as soon as the cradle lines touch regular branches they can not be folded over to remove them easily.