slicer: warn if the model would overflow the print platform
This commit is contained in:
@@ -61,6 +61,11 @@ fn main() -> Result<()> {
|
|||||||
real_scale,
|
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
|
// Center the model
|
||||||
let center = slice_config.platform_resolution / 2;
|
let center = slice_config.platform_resolution / 2;
|
||||||
let mesh_center = (min + max) / 2.0;
|
let mesh_center = (min + max) / 2.0;
|
||||||
|
Reference in New Issue
Block a user