mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 11:29:02 +08:00
Fix creation of indices on elliptic build plate
This commit is contained in:
parent
68fd0814e5
commit
f7ebed945e
@ -234,11 +234,14 @@ class BuildVolume(SceneNode):
|
|||||||
|
|
||||||
# Build plate grid mesh
|
# Build plate grid mesh
|
||||||
mb = MeshBuilder()
|
mb = MeshBuilder()
|
||||||
mb.addArc(max_w, Vector.Unit_Y, center = Vector(0, min_h - z_fight_distance, 0))
|
|
||||||
sections = mb.getVertexCount()
|
|
||||||
mb.addVertex(0, min_h - z_fight_distance, 0)
|
mb.addVertex(0, min_h - z_fight_distance, 0)
|
||||||
for n in range(0, sections-1):
|
mb.addArc(max_w, Vector.Unit_Y, center = Vector(0, min_h - z_fight_distance, 0))
|
||||||
mb.addIndices([sections, n + 1, n])
|
sections = mb.getVertexCount() - 1 # Center point is not an arc section
|
||||||
|
indices = []
|
||||||
|
for n in range(0, sections - 1):
|
||||||
|
indices.append([0, n + 2, n + 1])
|
||||||
|
mb.addIndices(numpy.asarray(indices, dtype = numpy.int32))
|
||||||
|
mb.calculateNormals()
|
||||||
|
|
||||||
for n in range(0, mb.getVertexCount()):
|
for n in range(0, mb.getVertexCount()):
|
||||||
v = mb.getVertex(n)
|
v = mb.getVertex(n)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user