mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
UI: fixed naming sphere is not a cylinder.
This commit is contained in:
parent
2971235299
commit
6aecae3121
2 changed files with 5 additions and 5 deletions
|
@ -23,7 +23,7 @@ sub new {
|
||||||
dim => [1, 1, 1],
|
dim => [1, 1, 1],
|
||||||
cyl_r => 1,
|
cyl_r => 1,
|
||||||
cyl_h => 1,
|
cyl_h => 1,
|
||||||
cyl_rho => 1.0,
|
sph_rho => 1.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
$self->{sizer} = Wx::BoxSizer->new(wxVERTICAL);
|
$self->{sizer} = Wx::BoxSizer->new(wxVERTICAL);
|
||||||
|
@ -118,11 +118,11 @@ sub new {
|
||||||
my $optgroup_sphere;
|
my $optgroup_sphere;
|
||||||
$optgroup_sphere = $self->{optgroup_sphere} = Slic3r::GUI::OptionsGroup->new(
|
$optgroup_sphere = $self->{optgroup_sphere} = Slic3r::GUI::OptionsGroup->new(
|
||||||
parent => $self,
|
parent => $self,
|
||||||
title => 'Add Cylinder...',
|
title => 'Add Sphere...',
|
||||||
on_change => sub {
|
on_change => sub {
|
||||||
# Do validation
|
# Do validation
|
||||||
my ($opt_id) = @_;
|
my ($opt_id) = @_;
|
||||||
if ($opt_id eq 'cyl_rho') {
|
if ($opt_id eq 'sph_rho') {
|
||||||
if (!looks_like_number($optgroup_sphere->get_value($opt_id))) {
|
if (!looks_like_number($optgroup_sphere->get_value($opt_id))) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ sub new {
|
||||||
);
|
);
|
||||||
|
|
||||||
$optgroup_sphere->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new(
|
$optgroup_sphere->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new(
|
||||||
opt_id => "cyl_rho",
|
opt_id => "sph_rho",
|
||||||
label => 'Rho',
|
label => 'Rho',
|
||||||
type => 'f',
|
type => 'f',
|
||||||
default => '1',
|
default => '1',
|
||||||
|
|
|
@ -351,7 +351,7 @@ sub on_btn_lambda {
|
||||||
} elsif ($type eq "cylinder") {
|
} elsif ($type eq "cylinder") {
|
||||||
$mesh = Slic3r::TriangleMesh::cylinder($params->{"cyl_r"}, $params->{"cyl_h"});
|
$mesh = Slic3r::TriangleMesh::cylinder($params->{"cyl_r"}, $params->{"cyl_h"});
|
||||||
} elsif ($type eq "sphere") {
|
} elsif ($type eq "sphere") {
|
||||||
$mesh = Slic3r::TriangleMesh::sphere($params->{"cyl_rho"});
|
$mesh = Slic3r::TriangleMesh::sphere($params->{"sph_rho"});
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue