Belt: drop the per-extrusion transform determinant

The mesh transform is a rotation and an axis permutation, so its
determinant is always 1; rebuilding the forward transform on every
extrusion to divide the flow by it changed nothing.

Raised in Hanif Koh's review of #14394.
This commit is contained in:
harrierpigeon
2026-10-02 01:07:43 -05:00
parent 3752144995
commit c49e8d32c8
-14
View File
@@ -8402,20 +8402,6 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
auto _mm3_per_mm = path.mm3_per_mm * this->config().print_flow_ratio;
_mm3_per_mm *= filament_flow_ratio;
// Belt printer: compensate for any volume change introduced by the mesh
// forward transform. path.mm3_per_mm is derived from slicer-frame layer
// height × line width, but a slicer-frame slab of volume V maps under the
// back-transform to a machine-frame region of volume V / |det(T)|. The
// mesh transform is now rotation ∘ pre-remap, both orthogonal, so |det(T)|
// is always 1 and this is currently a no-op; it is retained as a guard in
// case a non-orthogonal mesh transform is ever reintroduced. (Machine-frame
// shear/scale acts on the g-code in BeltKinematics, not here.)
if (m_config.belt_printer.value) {
double det = std::abs(BeltTransformPipeline::build_forward_transform(m_config).linear().determinant());
if (det > EPSILON)
_mm3_per_mm /= det;
}
if (path.role() == erTopSolidInfill) {
_mm3_per_mm *= m_config.top_solid_infill_flow_ratio;
} else if (path.role() == erBottomSurface) {