Page MenuHome

Print3D add-on: Make statistics less confusing
ClosedPublic

Authored by Mikhail Rachinskiy (alm) on Jul 17 2016, 3:43 AM.

Details

Summary

This diff limits volume and area statistics output to a single unit system that is currently in use (None, Metric or Imperial).

Currently statistics will always output in two unit systems, which is confusing (especially for a newcomers) and doesn't make any sense.

Diff Detail

Event Timeline

Mikhail Rachinskiy (alm) retitled this revision from to Print3D add-on: Make statistics less confusing.
Mikhail Rachinskiy (alm) updated this object.
Mikhail Rachinskiy (alm) set the repository for this revision to rBA Blender Add-ons.

Description was missing for Metric and Imperial outputs.

@Campbell Barton (campbellbarton) Unfortunately bpy.utils.units.to_string() does not work with unit scales:

bpy.utils.units.to_string('METRIC', 'VOLUME', 0.0000001)
> '100mm³'

but

bpy.utils.units.to_string('METRIC', 'VOLUME', 0.000001)
> '1cm³'

Which is OK for general purpose, but unacceptable for 3D printing. I propose that we keep current workflow with clean_float() function.

This revision is now accepted and ready to land.Jul 18 2016, 3:47 PM