mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 02:07:51 -06:00
Merge branch '2.1'
This commit is contained in:
commit
9b88f06970
13 changed files with 4044 additions and 4854 deletions
|
@ -42,6 +42,14 @@ class ConvexHullJob(Job):
|
|||
# Don't use data below 0.
|
||||
# TODO; We need a better check for this as this gives poor results for meshes with long edges.
|
||||
vertex_data = vertex_data[vertex_data[:,1] >= 0]
|
||||
|
||||
# Round the vertex data to 1/10th of a mm, then remove all duplicate vertices
|
||||
# This is done to greatly speed up further convex hull calculations as the convex hull
|
||||
# becomes much less complex when dealing with highly detailed models.
|
||||
vertex_data = numpy.round(vertex_data, 1)
|
||||
duplicates = (vertex_data[:,0] == vertex_data[:,1]) | (vertex_data[:,1] == vertex_data[:,2]) | (vertex_data[:,0] == vertex_data[:,2])
|
||||
vertex_data = numpy.delete(vertex_data, numpy.where(duplicates), axis = 0)
|
||||
|
||||
hull = Polygon(vertex_data[:, [0, 2]])
|
||||
|
||||
# First, calculate the normal convex hull around the points
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue