mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fix of #5007 - "Reload from disk" causes objects converted to inches to revert to mm
This commit is contained in:
parent
9dd83a3daa
commit
aaaa85c1f8
7 changed files with 88 additions and 19 deletions
|
@ -552,11 +552,12 @@ public:
|
|||
int volume_idx{ -1 };
|
||||
Vec3d mesh_offset{ Vec3d::Zero() };
|
||||
Geometry::Transformation transform;
|
||||
bool is_converted_from_inches = false;
|
||||
|
||||
template<class Archive> void serialize(Archive& ar) {
|
||||
//FIXME Vojtech: Serialize / deserialize only if the Source is set.
|
||||
// likely testing input_file or object_idx would be sufficient.
|
||||
ar(input_file, object_idx, volume_idx, mesh_offset, transform);
|
||||
ar(input_file, object_idx, volume_idx, mesh_offset, transform, is_converted_from_inches);
|
||||
}
|
||||
};
|
||||
Source source;
|
||||
|
@ -655,6 +656,7 @@ public:
|
|||
|
||||
void set_mirror(const Vec3d& mirror) { m_transformation.set_mirror(mirror); }
|
||||
void set_mirror(Axis axis, double mirror) { m_transformation.set_mirror(axis, mirror); }
|
||||
void convert_from_imperial_units();
|
||||
|
||||
const Transform3d& get_matrix(bool dont_translate = false, bool dont_rotate = false, bool dont_scale = false, bool dont_mirror = false) const { return m_transformation.get_matrix(dont_translate, dont_rotate, dont_scale, dont_mirror); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue