mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Renamed PreviewCanvas to 3DScene
This commit is contained in:
		
							parent
							
								
									0a62d658d9
								
							
						
					
					
						commit
						fb08588007
					
				
					 7 changed files with 11 additions and 11 deletions
				
			
		|  | @ -26,7 +26,7 @@ use Slic3r::GUI::OptionsGroup::Field; | |||
| use Slic3r::GUI::SimpleTab; | ||||
| use Slic3r::GUI::Tab; | ||||
| 
 | ||||
| our $have_OpenGL = eval "use Slic3r::GUI::PreviewCanvas; 1"; | ||||
| our $have_OpenGL = eval "use Slic3r::GUI::3DScene; 1"; | ||||
| our $have_LWP    = eval "use LWP::UserAgent; 1"; | ||||
| 
 | ||||
| use Wx 0.9901 qw(:bitmap :dialog :icon :id :misc :systemsettings :toplevelwindow | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| package Slic3r::GUI::PreviewCanvas; | ||||
| package Slic3r::GUI::3DScene; | ||||
| use strict; | ||||
| use warnings; | ||||
| 
 | ||||
|  | @ -375,7 +375,7 @@ sub load_object { | |||
|          | ||||
|             my $color = [ @{COLORS->[ $color_idx % scalar(@{&COLORS}) ]} ]; | ||||
|             push @$color, $volume->modifier ? 0.5 : 1; | ||||
|             push @{$self->volumes}, my $v = Slic3r::GUI::PreviewCanvas::Volume->new( | ||||
|             push @{$self->volumes}, my $v = Slic3r::GUI::3DScene::Volume->new( | ||||
|                 bounding_box    => $mesh->bounding_box, | ||||
|                 group_id        => $group_id, | ||||
|                 instance_idx    => $instance_idx, | ||||
|  | @ -940,7 +940,7 @@ sub draw_volumes { | |||
|     glDisableClientState(GL_VERTEX_ARRAY); | ||||
| } | ||||
| 
 | ||||
| package Slic3r::GUI::PreviewCanvas::Volume; | ||||
| package Slic3r::GUI::3DScene::Volume; | ||||
| use Moo; | ||||
| 
 | ||||
| has 'mesh'          => (is => 'rw', required => 0);  # only required for cut contours | ||||
|  | @ -8,7 +8,7 @@ use Slic3r::Geometry qw(); | |||
| use Slic3r::Geometry::Clipper qw(); | ||||
| use Wx qw(:misc :pen :brush :sizer :font :cursor wxTAB_TRAVERSAL); | ||||
| use Wx::Event qw(); | ||||
| use base qw(Slic3r::GUI::PreviewCanvas Class::Accessor); | ||||
| use base qw(Slic3r::GUI::3DScene Class::Accessor); | ||||
| 
 | ||||
| __PACKAGE__->mk_accessors(qw(_volumes _volumes_inv)); | ||||
| 
 | ||||
|  |  | |||
|  | @ -86,7 +86,7 @@ sub new { | |||
|     # right pane with preview canvas | ||||
|     my $canvas; | ||||
|     if ($Slic3r::GUI::have_OpenGL) { | ||||
|         $canvas = $self->{canvas} = Slic3r::GUI::PreviewCanvas->new($self); | ||||
|         $canvas = $self->{canvas} = Slic3r::GUI::3DScene->new($self); | ||||
|         $canvas->enable_cutting(1); | ||||
|         $canvas->load_object($self->{model_object}); | ||||
|         $canvas->set_auto_bed_shape; | ||||
|  |  | |||
|  | @ -68,7 +68,7 @@ sub new { | |||
|     # right pane with preview canvas | ||||
|     my $canvas; | ||||
|     if ($Slic3r::GUI::have_OpenGL) { | ||||
|         $canvas = $self->{canvas} = Slic3r::GUI::PreviewCanvas->new($self); | ||||
|         $canvas = $self->{canvas} = Slic3r::GUI::3DScene->new($self); | ||||
|         $canvas->load_object($self->{model_object}); | ||||
|         $canvas->set_auto_bed_shape; | ||||
|         $canvas->SetSize([500,500]); | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ BEGIN { | |||
| use Getopt::Long qw(:config no_auto_abbrev); | ||||
| use Slic3r; | ||||
| use Slic3r::GUI; | ||||
| use Slic3r::GUI::PreviewCanvas; | ||||
| use Slic3r::GUI::3DScene; | ||||
| $|++; | ||||
| 
 | ||||
| my %opt = (); | ||||
|  | @ -66,7 +66,7 @@ sub OnInit { | |||
|     my $frame = Wx::Frame->new(undef, -1, 'Mesh Viewer', [-1, -1], [500, 400]); | ||||
|     my $panel = Wx::Panel->new($frame, -1); | ||||
|      | ||||
|     $self->{canvas} = Slic3r::GUI::PreviewCanvas->new($panel); | ||||
|     $self->{canvas} = Slic3r::GUI::3DScene->new($panel); | ||||
|      | ||||
|     my $sizer = Wx::BoxSizer->new(wxVERTICAL); | ||||
|     $sizer->Add($self->{canvas}, 1, wxEXPAND, 0); | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ BEGIN { | |||
| use Getopt::Long qw(:config no_auto_abbrev); | ||||
| use Slic3r; | ||||
| use Slic3r::GUI; | ||||
| use Slic3r::GUI::PreviewCanvas; | ||||
| use Slic3r::GUI::3DScene; | ||||
| $|++; | ||||
| 
 | ||||
| my %opt = (); | ||||
|  | @ -82,7 +82,7 @@ sub OnInit { | |||
|      | ||||
|     my $canvas; | ||||
|     if ($d3) { | ||||
|         $canvas = Slic3r::GUI::PreviewCanvas->new($panel); | ||||
|         $canvas = Slic3r::GUI::3DScene->new($panel); | ||||
|         $canvas->print($print); | ||||
|          | ||||
|         $canvas->set_bed_shape($print->config->bed_shape); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci