Add belt printer transform pipeline: slicing rotation, G-code coords, preview

- Implement core belt slicing pipeline: R(-alpha, X) mesh rotation in PrintObjectSlice with corrected object height calculation for proper layer count
Add to_machine_coords() in GCodeWriter to convert slicing-frame coordinates back to machine-frame, propagated through GCode,
GCodeProcessor, and GCodeViewer
Add belt-mode UI: tilted bed visualization, slicing-direction arrow, and raw G-code toggle to switch between machine-frame and slicing-frame views

This is a combination of 6 commits.

checkpoint 1: initial MVP.  Slicing functions, but rotates instead of skews are happening and a lot of other stuff too

getting somewhere, getting to the point where I need to figure out how to verify this stuff

this appears to be a dead end.

getting somewhere I think maybe

I'm pretty sure we've completely lost the plot at this point and need to restart this process...

remove slice logic in preparation for new, more invasive plan
This commit is contained in:
harrierpigeon
2026-03-11 03:58:52 -05:00
committed by Joseph Robertson
parent 08aa277974
commit ed6ea086a2
22 changed files with 375 additions and 31 deletions

View File

@@ -237,6 +237,9 @@ private:
mutable bool m_no_render_path { false };
bool m_is_dark = false;
bool m_belt_view_enabled = false;
float m_belt_angle_deg = 0.f;
libvgcode::Viewer m_viewer;
bool m_loaded_as_preview{ false };
@@ -336,6 +339,9 @@ public:
void export_toolpaths_to_obj(const char* filename) const;
void set_belt_printer(bool enabled, float angle_deg) { m_belt_view_enabled = enabled; m_belt_angle_deg = angle_deg; }
bool is_belt_view() const { return m_belt_view_enabled && m_belt_angle_deg > 0.f; }
size_t get_extruders_count() { return m_extruders_count; }
void push_combo_style();
void pop_combo_style();