Store / retrieve layer height profile from the AMF file.

Reset the layer height profile when changing a print profile to an incompatible one.
Reset button on the layer height bar.
Fixed an update issue on zooming by a scroll wheel.
Fixed an issue when loading an AMF file: Object names are now retained.
This commit is contained in:
bubnikv 2017-02-09 14:56:13 +01:00
parent 61c0ae4e94
commit 88e34ff5de
14 changed files with 379 additions and 154 deletions

View file

@ -61,8 +61,13 @@ sub write_file {
if ($object->name) {
printf $fh qq{ <metadata type=\"name\">%s</metadata>\n}, $object->name;
}
my $layer_height_profile = $object->layer_height_profile();
my $layer_height_profile_pts = int(@{$layer_height_profile});
if ($layer_height_profile_pts >= 4 && $layer_height_profile_pts % 2 == 0) {
# Store the layer height profile as a single semicolon separated list.
print $fh ' <metadata type="slic3r.layer_height_profile">', join(';', @{$layer_height_profile}), "</metadata>\n";
}
#FIXME Store the layer height ranges (ModelObject::layer_height_ranges)
#FIXME Store the layer height profile.
printf $fh qq{ <mesh>\n};
printf $fh qq{ <vertices>\n};