mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Render the grid a bit below 0, so we avoid some z fighting artifacts
This commit is contained in:
parent
8a5f2b347a
commit
3e0a06e7ee
1 changed files with 6 additions and 6 deletions
|
@ -71,7 +71,7 @@ class BuildVolume(SceneNode):
|
|||
renderer.queueNode(self, mode = RenderBatch.RenderMode.Lines)
|
||||
renderer.queueNode(self, mesh = self._grid_mesh, shader = self._grid_shader, backface_cull = True)
|
||||
if self._disallowed_area_mesh:
|
||||
renderer.queueNode(self, mesh = self._disallowed_area_mesh, shader = self._shader, transparent = True, backface_cull = True)
|
||||
renderer.queueNode(self, mesh = self._disallowed_area_mesh, shader = self._shader, transparent = True, backface_cull = True, sort = -9)
|
||||
return True
|
||||
|
||||
def rebuild(self):
|
||||
|
@ -106,17 +106,17 @@ class BuildVolume(SceneNode):
|
|||
|
||||
mb = MeshBuilder()
|
||||
mb.addQuad(
|
||||
Vector(min_w, min_h, min_d),
|
||||
Vector(max_w, min_h, min_d),
|
||||
Vector(max_w, min_h, max_d),
|
||||
Vector(min_w, min_h, max_d)
|
||||
Vector(min_w, min_h - 0.2, min_d),
|
||||
Vector(max_w, min_h - 0.2, min_d),
|
||||
Vector(max_w, min_h - 0.2, max_d),
|
||||
Vector(min_w, min_h - 0.2, max_d)
|
||||
)
|
||||
self._grid_mesh = mb.getData()
|
||||
for n in range(0, 6):
|
||||
v = self._grid_mesh.getVertex(n)
|
||||
self._grid_mesh.setVertexUVCoordinates(n, v[0], v[2])
|
||||
|
||||
disallowed_area_height = 0.2
|
||||
disallowed_area_height = 0.1
|
||||
disallowed_area_size = 0
|
||||
if self._disallowed_areas:
|
||||
mb = MeshBuilder()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue