mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Don't die on non-manifold models, after having tried the slower detection algorithm too. #16
This commit is contained in:
		
							parent
							
								
									00beb7e118
								
							
						
					
					
						commit
						74786185e4
					
				
					 1 changed files with 11 additions and 8 deletions
				
			
		| 
						 | 
					@ -158,6 +158,7 @@ sub make_surfaces {
 | 
				
			||||||
    my $self = shift;
 | 
					    my $self = shift;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if (0) {
 | 
					    if (0) {
 | 
				
			||||||
 | 
					        printf "Layer was sliced at z = %f\n", $self->slice_z * $Slic3r::resolution;
 | 
				
			||||||
        require "Slic3r/SVG.pm";
 | 
					        require "Slic3r/SVG.pm";
 | 
				
			||||||
        Slic3r::SVG::output(undef, "lines.svg",
 | 
					        Slic3r::SVG::output(undef, "lines.svg",
 | 
				
			||||||
            lines       => [ grep !$_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
 | 
					            lines       => [ grep !$_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
 | 
				
			||||||
| 
						 | 
					@ -206,12 +207,15 @@ sub make_surfaces {
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                #Slic3r::SVG::output(undef, "lines.svg",
 | 
					                if (0 && !$next_lines) {
 | 
				
			||||||
                #    lines       => [ map $_->p, grep !$_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
 | 
					                    require "Slic3r/SVG.pm";
 | 
				
			||||||
                #    red_lines   => [ map $_->p, grep  $_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
 | 
					                    Slic3r::SVG::output(undef, "no_lines.svg",
 | 
				
			||||||
                #    points      => [ $points[-1] ],
 | 
					                        lines       => [ grep !$_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
 | 
				
			||||||
                #    no_arrows => 1,
 | 
					                        red_lines   => [ grep  $_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
 | 
				
			||||||
                #) if !$next_lines;
 | 
					                        points      => [ $points[-1] ],
 | 
				
			||||||
 | 
					                        no_arrows => 1,
 | 
				
			||||||
 | 
					                    );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                $next_lines
 | 
					                $next_lines
 | 
				
			||||||
                    or die sprintf("No lines start at point %s. This shouldn't happen. Please check the model for manifoldness.", $get_point_id->($points[-1]));
 | 
					                    or die sprintf("No lines start at point %s. This shouldn't happen. Please check the model for manifoldness.", $get_point_id->($points[-1]));
 | 
				
			||||||
| 
						 | 
					@ -289,11 +293,10 @@ sub make_surfaces {
 | 
				
			||||||
            Slic3r::SVG::output(undef, "layer" . $self->id . "_discarded_polylines.svg",
 | 
					            Slic3r::SVG::output(undef, "layer" . $self->id . "_discarded_polylines.svg",
 | 
				
			||||||
                polylines   => \@discarded_polylines,
 | 
					                polylines   => \@discarded_polylines,
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
            exit;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        $self->cleanup_lines;
 | 
					        $self->cleanup_lines;
 | 
				
			||||||
        $detect->();
 | 
					        eval { $detect->(); };
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        if (@discarded_lines) {
 | 
					        if (@discarded_lines) {
 | 
				
			||||||
            print "  Warning: even slow detection algorithm throwed errors. Review the output before printing.\n";
 | 
					            print "  Warning: even slow detection algorithm throwed errors. Review the output before printing.\n";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue