mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 06:09:38 +08:00
Prevent exceptions when spine is empty
CURA-2083
This commit is contained in:
parent
eb1d5e13d0
commit
0aad5ef5ed
@ -425,6 +425,8 @@ class X3DReader(MeshReader):
|
|||||||
# All the spines are collinear. Fallback to the rotated source
|
# All the spines are collinear. Fallback to the rotated source
|
||||||
# XZ plane.
|
# XZ plane.
|
||||||
# TODO: handle the situation where the first two spine points match
|
# TODO: handle the situation where the first two spine points match
|
||||||
|
if len(spine) < 2:
|
||||||
|
return Vector(0, 0, 1)
|
||||||
v = spine[1] - spine[0]
|
v = spine[1] - spine[0]
|
||||||
orig_y = Vector(0, 1, 0)
|
orig_y = Vector(0, 1, 0)
|
||||||
orig_z = Vector(0, 0, 1)
|
orig_z = Vector(0, 0, 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user