Brim: optionally generate brim from Elephant Foot Compensation outline #1252

Closed
opened 2026-04-05 17:06:26 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @kisslorand on 12/27/2025

Summary

This PR adds an optional mode that makes brim generation follow the Elephant Foot Compensation (EFC)–adjusted first-layer outline, instead of the original model outline.

When enabled, the brim is generated relative to the actual first-layer footprint produced after EFC, keeping the brim aligned with compensated perimeters and restoring its intended role in cases where EFC significantly alters the effective first-layer footprint.

Default behavior is unchanged.

Motivation / Problem

Elephant Foot Compensation modifies the effective footprint of the first layer.
However, brim generation has historically referenced the raw model outline, which can diverge significantly from the compensated geometry.

This mismatch can lead to two practical issues:

  • With aggressive EFC, the brim may no longer touch the compensated first layer, reducing its effectiveness for adhesion.
  • When EFC is used intentionally and/or effectively to alter base geometry (e.g. chamfer-like effects and/or printability constraints), the brim is generated relative to geometry that is no longer representative of the printed part.

In both cases, the brim may fail to fulfill its purpose due to outline mismatch, not user intent.

What this PR does

This PR introduces a selectable option that:

  • Uses the already computed EFC-adjusted first-layer outline as the reference geometry for brim generation
  • Aligns brim geometry with the same outline used by compensated perimeters
  • Applies consistently to brim ears, auto-brim heuristics, and per-volume-group processing

The EFC-adjusted outline is reused from existing first-layer geometry, avoiding any attempt to approximate compensation via offsets.

Why this is not a simple offset

Elephant Foot Compensation is not a uniform geometric offset:

  • It is flow-aware
  • It avoids generating unprintable thin features
  • It may intentionally alter the object’s base geometry
  • It can differ per island or volume group

For correctness, this PR reuses the already computed first-layer geometry, rather than attempting to reconstruct it from the raw model outline.

Presets and Backward Compatibility

This change is fully backward compatible with existing presets.

  • The new behavior is opt-in and disabled by default.
  • Existing profiles and saved projects will continue to generate brims using the original model outline unless the option is explicitly enabled.
  • No existing preset values are reinterpreted or migrated.
  • Enabling this option only affects how the brim reference outline is chosen; it does not modify Elephant Foot Compensation itself, extrusion parameters, or first-layer settings.

As a result, existing presets retain identical slicing output unless the user deliberately enables the new option.

User-facing warning (documented in tooltip)

  • With aggressive or geometry-altering EFC, enabling this option may cause brim lines to overlap higher layers.
  • Disabling it in such cases may leave the brim detached from the compensated first layer, reducing its adhesion benefit.

This reflects a real geometric trade-off and is explicitly communicated to the user.

Examples:

The object to be sliced:
image

The 2nd layer of the sliced object (reference for first layer geometry deformation):
image

The followings are sliced with EFC 0.6mm and brim-object gap 0.2:

Outer brim, Brim follows compensated outline disabled:
image

Outer brim, Brim follows compensated outline enabled:
image

Painted brim, Brim follows compensated outline disabled:
image

Painted brim, Brim follows compensated outline enabled:
image

Conclusions

The screenshots above show that, in certain cases, Elephant Foot Compensation meaningfully alters the effective first-layer footprint relative to the original model outline.

In such cases, generating the brim from the unmodified geometry can cause it to lose proper contact with the compensated first-layer perimeter, reducing its effectiveness for first-layer adhesion.
Because the brim no longer follows the actual printed footprint, it also becomes unreliable as a visual or mechanical reference when evaluating or calibrating Elephant Foot Compensation.

Using the EFC-adjusted first-layer outline for brim generation makes the compensated first-layer toolpath explicit and consistent, ensuring the brim reflects the same geometry used to generate the compensated perimeters when Elephant Foot Compensation is applied.

This is not universally required: when Elephant Foot Compensation is mild, the compensated footprint’s geometry may remain close to the original model outline.
The usefulness of this option becomes apparent when Elephant Foot Compensation significantly alters the effective first-layer footprint, either due to strong compensation values or due to printability constraints that intentionally modify base geometry.

Fixes #7494
Fixes #10877
Fixes #3720

Thank you @RF47!

Note: Translations were generated using online translation tools; native speakers are welcome to suggest corrections.

*Originally created by @kisslorand on 12/27/2025* ## Summary This PR adds an optional mode that makes **brim generation follow the Elephant Foot Compensation (EFC)–adjusted first-layer outline**, instead of the original model outline. When enabled, the brim is generated relative to the **actual first-layer footprint produced after EFC**, keeping the brim aligned with compensated perimeters and restoring its intended role in cases where EFC significantly alters the effective first-layer footprint. Default behavior is unchanged. ## Motivation / Problem Elephant Foot Compensation modifies the effective footprint of the first layer. However, brim generation has historically referenced the raw model outline, which can diverge significantly from the compensated geometry. This mismatch can lead to two practical issues: - With **aggressive EFC**, the brim may no longer touch the compensated first layer, reducing its effectiveness for adhesion. - When EFC is used **intentionally and/or effectively to alter base geometry** (e.g. chamfer-like effects and/or printability constraints), the brim is generated relative to geometry that is no longer representative of the printed part. In both cases, the brim may fail to fulfill its purpose due to outline mismatch, not user intent. ## What this PR does This PR introduces a selectable option that: - Uses the already computed EFC-adjusted first-layer outline as the reference geometry for brim generation - Aligns brim geometry with the same outline used by compensated perimeters - Applies consistently to brim ears, auto-brim heuristics, and per-volume-group processing The EFC-adjusted outline is reused from existing first-layer geometry, avoiding any attempt to approximate compensation via offsets. ## Why this is not a simple offset Elephant Foot Compensation is not a uniform geometric offset: - It is flow-aware - It avoids generating unprintable thin features - It may intentionally alter the object’s base geometry - It can differ per island or volume group For correctness, this PR reuses the **already computed first-layer geometry**, rather than attempting to reconstruct it from the raw model outline. ## Presets and Backward Compatibility This change is fully backward compatible with existing presets. - The new behavior is opt-in and disabled by default. - Existing profiles and saved projects will continue to generate brims using the original model outline unless the option is explicitly enabled. - No existing preset values are reinterpreted or migrated. - Enabling this option only affects how the brim reference outline is chosen; it does not modify Elephant Foot Compensation itself, extrusion parameters, or first-layer settings. As a result, existing presets retain identical slicing output unless the user deliberately enables the new option. ## User-facing warning (documented in tooltip) - With aggressive or geometry-altering EFC, enabling this option may cause brim lines to overlap higher layers. - Disabling it in such cases may leave the brim detached from the compensated first layer, reducing its adhesion benefit. This reflects a real geometric trade-off and is explicitly communicated to the user. ## Examples: The object to be sliced: <img width="763" height="651" alt="image" src="https://github.com/user-attachments/assets/500ca720-d52e-4926-9072-c8bcbd165dbf" /> The 2nd layer of the sliced object (reference for first layer geometry deformation): <img width="721" height="642" alt="image" src="https://github.com/user-attachments/assets/0f02c7d1-cfa2-4603-ab8b-56317dd4f00e" /> The followings are sliced with EFC 0.6mm and brim-object gap 0.2: Outer brim, `Brim follows compensated outline` __disabled__: <img width="879" height="785" alt="image" src="https://github.com/user-attachments/assets/34778b9c-6a4d-4232-a2b0-792d79888139" /> Outer brim, `Brim follows compensated outline` __enabled__: <img width="875" height="787" alt="image" src="https://github.com/user-attachments/assets/bee47a94-24dc-4969-93b6-e6ab86287fdc" /> Painted brim, `Brim follows compensated outline` __disabled__: <img width="667" height="602" alt="image" src="https://github.com/user-attachments/assets/f6df6c34-aae7-4c10-ba8f-720cbd62e838" /> Painted brim, `Brim follows compensated outline` __enabled__: <img width="673" height="609" alt="image" src="https://github.com/user-attachments/assets/2d0c2429-97d2-4e78-b2cd-a08f105f7083" /> ## Conclusions The screenshots above show that, in certain cases, Elephant Foot Compensation meaningfully alters the effective first-layer footprint relative to the original model outline. In such cases, generating the brim from the unmodified geometry can cause it to lose proper contact with the compensated first-layer perimeter, reducing its effectiveness for first-layer adhesion. Because the brim no longer follows the actual printed footprint, it also becomes unreliable as a visual or mechanical reference when evaluating or calibrating Elephant Foot Compensation. Using the EFC-adjusted first-layer outline for brim generation makes the compensated first-layer toolpath explicit and consistent, ensuring the brim reflects the same geometry used to generate the compensated perimeters when Elephant Foot Compensation is applied. **This is not universally required**: when Elephant Foot Compensation is mild, the compensated footprint’s geometry may remain close to the original model outline. The usefulness of this option becomes apparent when Elephant Foot Compensation significantly alters the effective first-layer footprint, either due to strong compensation values or due to printability constraints that intentionally modify base geometry. Fixes #7494 Fixes #10877 Fixes #3720 Thank you @RF47! >Note: Translations were generated using online translation tools; native speakers are welcome to suggest corrections.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#1252