Don't output slic3r:z attribute in SVG for raft layers
This commit is contained in:
parent
e2b1b52679
commit
8605969dc5
5 changed files with 10 additions and 8 deletions
|
@ -140,8 +140,11 @@ EOF
|
|||
my @previous_layer_slices = ();
|
||||
for my $layer (@layers) {
|
||||
$layer_id++;
|
||||
# TODO: remove slic3r:z for raft layers
|
||||
printf $fh qq{ <g id="layer%d" slic3r:z="%s">\n}, $layer_id, unscale($layer->slice_z);
|
||||
if ($layer->slice_z == -1) {
|
||||
printf $fh qq{ <g id="layer%d">\n}, $layer_id;
|
||||
} else {
|
||||
printf $fh qq{ <g id="layer%d" slic3r:z="%s">\n}, $layer_id, unscale($layer->slice_z);
|
||||
}
|
||||
|
||||
my @current_layer_slices = ();
|
||||
# sort slices so that the outermost ones come first
|
||||
|
|
|
@ -76,7 +76,7 @@ sub generate {
|
|||
$i, # id
|
||||
($i == 0) ? $support_z->[$i] : ($support_z->[$i] - $support_z->[$i-1]), # height
|
||||
$support_z->[$i], # print_z
|
||||
-1); # slice_z
|
||||
);
|
||||
if ($i >= 1) {
|
||||
$object->support_layers->[-2]->set_upper_layer($object->support_layers->[-1]);
|
||||
$object->support_layers->[-1]->set_lower_layer($object->support_layers->[-2]);
|
||||
|
|
|
@ -126,7 +126,7 @@ class PrintObject
|
|||
size_t support_layer_count() const;
|
||||
void clear_support_layers();
|
||||
SupportLayer* get_support_layer(int idx);
|
||||
SupportLayer* add_support_layer(int id, coordf_t height, coordf_t print_z, coordf_t slice_z);
|
||||
SupportLayer* add_support_layer(int id, coordf_t height, coordf_t print_z);
|
||||
void delete_support_layer(int idx);
|
||||
|
||||
// methods for handling state
|
||||
|
|
|
@ -190,10 +190,9 @@ PrintObject::get_support_layer(int idx)
|
|||
}
|
||||
|
||||
SupportLayer*
|
||||
PrintObject::add_support_layer(int id, coordf_t height, coordf_t print_z,
|
||||
coordf_t slice_z)
|
||||
PrintObject::add_support_layer(int id, coordf_t height, coordf_t print_z)
|
||||
{
|
||||
SupportLayer* layer = new SupportLayer(id, this, height, print_z, slice_z);
|
||||
SupportLayer* layer = new SupportLayer(id, this, height, print_z, -1);
|
||||
support_layers.push_back(layer);
|
||||
return layer;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ _constant()
|
|||
size_t support_layer_count();
|
||||
void clear_support_layers();
|
||||
Ref<SupportLayer> get_support_layer(int idx);
|
||||
Ref<SupportLayer> add_support_layer(int id, coordf_t height, coordf_t print_z, coordf_t slice_z);
|
||||
Ref<SupportLayer> add_support_layer(int id, coordf_t height, coordf_t print_z);
|
||||
void delete_support_layer(int idx);
|
||||
|
||||
bool invalidate_state_by_config_options(std::vector<std::string> opt_keys);
|
||||
|
|
Loading…
Reference in a new issue