mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-12 04:21:49 +08:00
Measuring - Gizmo measure disabled for scaled volumes
This commit is contained in:
parent
75baf95d71
commit
7002b94419
@ -68,6 +68,7 @@
|
|||||||
#define ENABLE_RAYCAST_PICKING_DEBUG (0 && ENABLE_RAYCAST_PICKING)
|
#define ENABLE_RAYCAST_PICKING_DEBUG (0 && ENABLE_RAYCAST_PICKING)
|
||||||
// Enable Measure Gizmo
|
// Enable Measure Gizmo
|
||||||
#define ENABLE_MEASURE_GIZMO (1 && ENABLE_RAYCAST_PICKING)
|
#define ENABLE_MEASURE_GIZMO (1 && ENABLE_RAYCAST_PICKING)
|
||||||
|
#define DISABLE_MEASURE_GIZMO_FOR_SCALED_VOLUMES (1 && ENABLE_MEASURE_GIZMO)
|
||||||
#define ENABLE_MEASURE_GIZMO_DEBUG (0 && ENABLE_MEASURE_GIZMO)
|
#define ENABLE_MEASURE_GIZMO_DEBUG (0 && ENABLE_MEASURE_GIZMO)
|
||||||
|
|
||||||
|
|
||||||
|
@ -290,8 +290,12 @@ bool GLGizmoMeasure::on_is_activable() const
|
|||||||
bool res = (wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA) ?
|
bool res = (wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA) ?
|
||||||
selection.is_single_full_instance() :
|
selection.is_single_full_instance() :
|
||||||
selection.is_single_volume() || selection.is_single_volume_instance();
|
selection.is_single_volume() || selection.is_single_volume_instance();
|
||||||
if (res)
|
if (res) {
|
||||||
res &= !selection.get_first_volume()->is_sinking();
|
res &= !selection.get_first_volume()->is_sinking();
|
||||||
|
#if DISABLE_MEASURE_GIZMO_FOR_SCALED_VOLUMES
|
||||||
|
res &= Geometry::Transformation(selection.get_first_volume()->world_matrix()).get_scaling_factor().isApprox(Vec3d::Ones());
|
||||||
|
#endif // DISABLE_MEASURE_GIZMO_FOR_SCALED_VOLUMES
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user