mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Fixed visualization of the "sinking contours" for complex objects.
This commit is contained in:
		
							parent
							
								
									5e735a59d0
								
							
						
					
					
						commit
						1f4f8ff3ad
					
				
					 1 changed files with 1 additions and 13 deletions
				
			
		|  | @ -319,19 +319,7 @@ void GLVolume::SinkingContours::update() | |||
|             MeshSlicingParams slicing_params; | ||||
|             slicing_params.trafo = m_parent.world_matrix(); | ||||
|             Polygons polygons = union_(slice_mesh(mesh.its, 0.0f, slicing_params)); | ||||
|             for (Polygon& polygon : polygons) { | ||||
|                 if (polygon.is_clockwise()) | ||||
|                     polygon.reverse(); | ||||
|                 Polygons outer_polys = offset(polygon, float(scale_(HalfWidth))); | ||||
|                 assert(outer_polys.size() == 1); | ||||
|                 if (outer_polys.empty()) | ||||
|                     // no outer contour, skip
 | ||||
|                     continue; | ||||
| 
 | ||||
|                 ExPolygon expoly(std::move(outer_polys.front())); | ||||
|                 expoly.holes = offset(polygon, -float(scale_(HalfWidth))); | ||||
|                 polygons_reverse(expoly.holes); | ||||
| 
 | ||||
|             for (ExPolygon &expoly : diff_ex(expand(polygons, float(scale_(HalfWidth))), shrink(polygons, float(scale_(HalfWidth))))) { | ||||
|                 GUI::GLModel::InitializationData::Entity entity; | ||||
|                 entity.type = GUI::GLModel::PrimitiveType::Triangles; | ||||
|                 const std::vector<Vec3d> triangulation = triangulate_expolygon_3d(expoly); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vojtech Bubnik
						Vojtech Bubnik