pic2stl is a Python package that converts images to 3D STL models.
MIT License
2
stars
0
forks
source link
add_base = True get a result ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (142164,) + inhomogeneous part. #6
ValueError Traceback (most recent call last)
[<ipython-input-26-d81244cec2d9>](https://localhost:8080/#) in <cell line: 1>()
----> 1 image_to_stl(f'{file_name}.png', f'{file_name}_0.stl', extrusion_height = 3, add_base = True)
[/usr/local/lib/python3.10/dist-packages/pic2stl/pic2stl.py](https://localhost:8080/#) in image_to_stl(image_path, output_path, extrusion_height, add_base, base_thickness, invert_image)
84 # Create the mesh
85 vertices = np.array(vertices)
---> 86 faces = np.array(faces)
87 output_mesh = mesh.Mesh(np.zeros(faces.shape[0], dtype=mesh.Mesh.dtype))
88 for i, f in enumerate(faces):
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (142164,) + inhomogeneous part.
n.b.
the same source run well when set add_base = False
code
result
n.b.
add_base = False
thanks and best regards