mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	better handling of too-small and too-short models #929.
These changes handle small models better in the plater preview. Extremely small thumbnails are preserved instead of culled, allowing the model to be scaled up. The scale range is extended to 100000% to allow mm-scale objects expressed in meters to be opened and scaled to mm. Original coding by mesheldrake
This commit is contained in:
		
							parent
							
								
									ac2356f66a
								
							
						
					
					
						commit
						33a4ec660d
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -437,7 +437,7 @@ sub changescale {
 | 
			
		|||
    my ($obj_idx, $object) = $self->selected_object;
 | 
			
		||||
    
 | 
			
		||||
    # max scale factor should be above 2540 to allow importing files exported in inches
 | 
			
		||||
    my $scale = Wx::GetNumberFromUser("", "Enter the scale % for the selected object:", "Scale", $object->scale*100, 0, 5000, $self);
 | 
			
		||||
    my $scale = Wx::GetNumberFromUser("", "Enter the scale % for the selected object:", "Scale", $object->scale*100, 0, 100000, $self);
 | 
			
		||||
    return if !$scale || $scale == -1;
 | 
			
		||||
    
 | 
			
		||||
    $self->{list}->SetItem($obj_idx, 2, "$scale%");
 | 
			
		||||
| 
						 | 
				
			
			@ -861,7 +861,7 @@ sub repaint {
 | 
			
		|||
    @{$parent->{object_previews}} = ();
 | 
			
		||||
    for my $obj_idx (0 .. $#{$parent->{objects}}) {
 | 
			
		||||
        my $object = $parent->{objects}[$obj_idx];
 | 
			
		||||
        next unless $object->thumbnail;
 | 
			
		||||
        next unless $object->thumbnail && @{$object->thumbnail->expolygons};
 | 
			
		||||
        for my $instance_idx (0 .. $#{$object->instances}) {
 | 
			
		||||
            my $instance = $object->instances->[$instance_idx];
 | 
			
		||||
            push @{$parent->{object_previews}}, [ $obj_idx, $instance_idx, $object->thumbnail->clone ];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue