slicer: warn if the model would overflow the print platform

This commit is contained in:
2025-04-01 05:56:47 +00:00
parent 18d15b0abe
commit b6b6620105

View File

@@ -61,6 +61,11 @@ fn main() -> Result<()> {
real_scale,
));
let mesh_size = max - min;
if mesh_size.x > slice_config.platform_size.x || mesh_size.y > slice_config.platform_size.y || mesh_size.z > slice_config.platform_size.z {
eprintln!("WARNING: model bounds ({}) exceeds printer bounds ({}); print may be truncated", mesh_size, slice_config.platform_size);
}
// Center the model
let center = slice_config.platform_resolution / 2;
let mesh_center = (min + max) / 2.0;