Commit Graph
3 Commits
Author SHA1 Message Date
TheLegendTubaGuy 89fa736737 Fix center of mass details, belt preview and section view bugs (#16958)
* Fix center of mass details, belt preview and section view bugs

Fixes the center of mass bugs from #16781 (center of mass a-d and
rendering b).

- The details box follows its marker, so zooming toward the cursor
  could slide it under the mouse, where ImGui took the wheel and
  zooming stopped. The wheel now zooms over the box.
- Esc closes the details box. A click on a marker now focuses the 3D
  view first, so Esc reaches it after typing in a sidebar field.
- On belt printers the Preview markers stayed in the raw G-code frame
  while the upright view draws the toolpaths back-transformed. The
  masses now get the toolpaths' transform. It shears, so the second
  moments are kept as a full 3x3 matrix to keep the moments of
  inertia right, and the bounding box rows are left out for a map
  that mixes the axes, where the box of the mapped corners would be
  far too large.
- At the top layer of the slider the solid marker of what is printed
  so far covered the faded finished-print one, which could not be
  clicked. At the top layer only the finished print's markers show,
  drawn solid.
- The section view cuts a marker away when its center is on the cut
  side, as it does the toolpaths' option markers.

* Keep the belt bounding box and store six second moments

- Belt prints keep the bounding box rows in the details. The G-code
  back-transform moves from GCodeViewer into
  BeltTransformPipeline::build_gcode_back_transform(), and on a belt
  print the processor keeps a second box per mass, of each segment's
  ends and bead height mapped by its linear part. ObjectMass::transform()
  moves that box by the translation, instead of dropping the box that
  the shear would blow up.
- A mass stores its second moments as the diagonal and the three cross
  terms instead of a full matrix, which is built only to transform it.

(cherry picked from commit e66569a966)
2026-11-01 09:53:53 +08:00
Ian BassiandKris Austin 70bc02467b Faster Preview View (#15884)
Co-authored-by: Kris Austin <kris.austin@gmail.com>
2026-10-02 14:45:58 -03:00
Ian Bassi a1ad2b4425 Add section view feature for 3D canvas (#15879) 2026-10-02 11:50:43 -03:00