mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Fixed cut contours in cut dialog 3D view
This commit is contained in:
		
							parent
							
								
									61ee633cd2
								
							
						
					
					
						commit
						2ef164eeef
					
				
					 1 changed files with 13 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -1330,8 +1330,8 @@ sub Render {
 | 
			
		|||
        glEnable(GL_CULL_FACE) if ($self->enable_picking);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # draw cutting plane
 | 
			
		||||
    if (defined $self->cutting_plane_z) {
 | 
			
		||||
        # draw cutting plane
 | 
			
		||||
        my $plane_z = $self->cutting_plane_z;
 | 
			
		||||
        my $bb = $volumes_bb;
 | 
			
		||||
        glDisable(GL_CULL_FACE);
 | 
			
		||||
| 
						 | 
				
			
			@ -1347,6 +1347,15 @@ sub Render {
 | 
			
		|||
        glEnd();
 | 
			
		||||
        glEnable(GL_CULL_FACE);
 | 
			
		||||
        glDisable(GL_BLEND);
 | 
			
		||||
        
 | 
			
		||||
        # draw cutting contours
 | 
			
		||||
        glEnableClientState(GL_VERTEX_ARRAY);
 | 
			
		||||
        glLineWidth(2);
 | 
			
		||||
        glColor3f(0, 0, 0);
 | 
			
		||||
        glVertexPointer_c(3, GL_FLOAT, 0, $self->cut_lines_vertices->ptr());
 | 
			
		||||
        glDrawArrays(GL_LINES, 0, $self->cut_lines_vertices->elements / 3);
 | 
			
		||||
        glVertexPointer_c(3, GL_FLOAT, 0, 0);
 | 
			
		||||
        glDisableClientState(GL_VERTEX_ARRAY);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # draw warning message
 | 
			
		||||
| 
						 | 
				
			
			@ -1393,18 +1402,10 @@ sub draw_volumes {
 | 
			
		|||
        $volume->render;
 | 
			
		||||
    }
 | 
			
		||||
    glDisableClientState(GL_NORMAL_ARRAY);
 | 
			
		||||
    glDisable(GL_BLEND);
 | 
			
		||||
 | 
			
		||||
    glEnable(GL_CULL_FACE);
 | 
			
		||||
    
 | 
			
		||||
    if (defined $self->cutting_plane_z) {
 | 
			
		||||
        glLineWidth(2);
 | 
			
		||||
        glColor3f(0, 0, 0);
 | 
			
		||||
        glVertexPointer_c(3, GL_FLOAT, 0, $self->cut_lines_vertices->ptr());
 | 
			
		||||
        glDrawArrays(GL_LINES, 0, $self->cut_lines_vertices->elements / 3);
 | 
			
		||||
        glVertexPointer_c(3, GL_FLOAT, 0, 0);
 | 
			
		||||
    }
 | 
			
		||||
    glDisableClientState(GL_VERTEX_ARRAY);
 | 
			
		||||
    
 | 
			
		||||
    glDisable(GL_BLEND);
 | 
			
		||||
    glEnable(GL_CULL_FACE);    
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub mark_volumes_for_layer_height {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue