diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2014-07-12 19:35:17 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2014-07-12 19:35:17 +0400 |
commit | 670ffcf4bed2ca82d2596be786f61265d1311d8c (patch) | |
tree | b1b073b0ddae1ea660e378a082f220a3f1dee7bd /utils | |
parent | a34c7c76c4197027d82f8173cd98e677e09235f4 (diff) |
Show section lines in cut preview
Diffstat (limited to 'utils')
-rw-r--r-- | utils/view-mesh.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/view-mesh.pl b/utils/view-mesh.pl index 120ddfe6d..680102405 100644 --- a/utils/view-mesh.pl +++ b/utils/view-mesh.pl @@ -19,6 +19,7 @@ my %opt = (); { my %options = ( 'help' => sub { usage() }, + 'cut=f' => \$opt{cut}, ); GetOptions(%options) or usage(1); $ARGV[0] or usage(1); @@ -32,6 +33,7 @@ my %opt = (); $Slic3r::ViewMesh::object = $model->objects->[0]; my $app = Slic3r::ViewMesh->new; + $app->{canvas}->SetCuttingPlane($opt{cut}) if defined $opt{cut}; $app->MainLoop; } @@ -43,6 +45,7 @@ sub usage { Usage: view-mesh.pl [ OPTIONS ] file.stl --help Output this usage screen and exit + --cut Z Display the cutting plane at the given Z EOF exit ($exit_code || 0); @@ -61,7 +64,7 @@ sub OnInit { my $panel = Wx::Panel->new($frame, -1); my $sizer = Wx::BoxSizer->new(wxVERTICAL); - $sizer->Add(Slic3r::GUI::PreviewCanvas->new($panel, $object), 1, wxEXPAND, 0); + $sizer->Add($self->{canvas} = Slic3r::GUI::PreviewCanvas->new($panel, $object), 1, wxEXPAND, 0); $panel->SetSizer($sizer); $sizer->SetSizeHints($panel); |