Files
IfcOpenShell/src
Petru Conduraru 248fb3e3fb Bonsai: warn before a unit change that would silently rescale the model
Assigning a different length unit as project default, editing the
assigned SI length unit's prefix, or assigning Blender scene units only
reassigns the IfcUnitAssignment. The length values already stored in the
file keep their numbers, so every stored IfcLengthMeasure changes its
physical meaning and the whole model is rescaled by the unit ratio on
the next load (a 2 m wall reloads as 2 mm after switching metre to
millimetre). The viewport looks unchanged because Blender meshes stay in
metres, which makes the corruption completely silent until reload.

The unit operators now detect when the effective length scale of the
project would change while the file already contains length-bearing data
(shape representations or material layers) and open a confirmation
dialog stating the rescale factor and pointing to the ConvertLengthUnit
patch recipe, which converts all stored values and preserves physical
size. Fresh projects without geometry keep the frictionless one-click
flow, and script/EXEC calls are unaffected.

Fixes #6400

Generated with the assistance of an AI coding tool.
2026-07-20 09:57:46 +03:00
..
2026-07-18 22:39:33 +05:00
2026-07-15 19:20:17 +05:00
2026-07-18 22:39:33 +05:00
2026-02-27 14:52:55 +05:00
2026-07-18 22:39:33 +05:00