mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
Added UI options to make a slab, defaulting to the model object's bounding box * 1.5
This commit is contained in:
parent
6aecae3121
commit
4f428fae40
2 changed files with 41 additions and 1 deletions
|
@ -352,6 +352,10 @@ sub on_btn_lambda {
|
|||
$mesh = Slic3r::TriangleMesh::cylinder($params->{"cyl_r"}, $params->{"cyl_h"});
|
||||
} elsif ($type eq "sphere") {
|
||||
$mesh = Slic3r::TriangleMesh::sphere($params->{"sph_rho"});
|
||||
} elsif ($type eq "slab") {
|
||||
$mesh = Slic3r::TriangleMesh::cube($self->{model_object}->bounding_box->size->x*1.5, $self->{model_object}->bounding_box->size->y*1.5, $params->{"slab_h"});
|
||||
# box sets the base coordinate at 0,0, move to center of plate and move it up to initial_z
|
||||
$mesh->translate(-$self->{model_object}->bounding_box->size->x*1.5/2.0, -$self->{model_object}->bounding_box->size->y*1.5/2.0, $params->{"slab_z"});
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue