Convert draft_shield to checkbox and add additional_base_layers setting #539

Closed
opened 2026-04-05 16:22:25 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @gerchowl on 3/1/2026

Summary

  • Convert draft_shield from enum (disabled/enabled) to coBool checkbox — simplifies UI and config; legacy enum values are handled via handle_legacy() migration
  • Add additional_base_layers setting (0–3, default 0) — extra foundation layers at the bottom of support/raft structures for improved bed adhesion
  • Integration tests for the additional_base_layers feature using Catch2 (SlicingParameters math + full-pipeline tests with normal and tree support)

Changes

  • PrintConfig.cpp/hpp: Remove DraftShield enum, define draft_shield as coBool, add legacy migration for "disabled""0" / "enabled""1"; add additional_base_layers coInt setting
  • Slicing.cpp: When raft_layers > 1, add additional_base_layers to base_raft_layers
  • SupportCommon.cpp: Generate additional base layers for both raft and non-raft support paths using expanded first-layer footprint
  • TreeSupport.cpp: Handle is_additional_base flag in tree support toolpath generation
  • Print.cpp, GCode.cpp, Preset.cpp: Update all draft_shield usages from enum comparison to bool
  • Tab.cpp, ConfigManipulation.cpp: Wire up UI for additional_base_layers
  • Profile JSONs: Bump process_version to include new setting

Test plan

  • SlicingParameters math: verify base/interface raft layer counts with various additional_base_layers values
  • Full pipeline with normal support: no-raft, raft=1, raft=3, raft=5
  • Full pipeline with tree support: no-raft, raft=1
  • Tree support + raft=3 (diagnostic test included — investigating empty first layer issue)
  • Manual: verify draft_shield checkbox works (on/off) and legacy projects load correctly

🤖 Generated with Claude Code

*Originally created by @gerchowl on 3/1/2026* ## Summary - **Convert `draft_shield` from enum (`disabled`/`enabled`) to `coBool` checkbox** — simplifies UI and config; legacy enum values are handled via `handle_legacy()` migration - **Add `additional_base_layers` setting** (0–3, default 0) — extra foundation layers at the bottom of support/raft structures for improved bed adhesion - **Integration tests** for the additional_base_layers feature using Catch2 (SlicingParameters math + full-pipeline tests with normal and tree support) ## Changes - `PrintConfig.cpp/hpp`: Remove `DraftShield` enum, define `draft_shield` as `coBool`, add legacy migration for `"disabled"`→`"0"` / `"enabled"`→`"1"`; add `additional_base_layers` `coInt` setting - `Slicing.cpp`: When `raft_layers > 1`, add `additional_base_layers` to `base_raft_layers` - `SupportCommon.cpp`: Generate additional base layers for both raft and non-raft support paths using expanded first-layer footprint - `TreeSupport.cpp`: Handle `is_additional_base` flag in tree support toolpath generation - `Print.cpp`, `GCode.cpp`, `Preset.cpp`: Update all `draft_shield` usages from enum comparison to bool - `Tab.cpp`, `ConfigManipulation.cpp`: Wire up UI for `additional_base_layers` - Profile JSONs: Bump `process_version` to include new setting ## Test plan - [x] SlicingParameters math: verify base/interface raft layer counts with various additional_base_layers values - [x] Full pipeline with normal support: no-raft, raft=1, raft=3, raft=5 - [x] Full pipeline with tree support: no-raft, raft=1 - [ ] Tree support + raft=3 (diagnostic test included — investigating empty first layer issue) - [ ] Manual: verify draft_shield checkbox works (on/off) and legacy projects load correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#539