Skip to content

Commit

Permalink
Merge branch 'main' into CURA-9365_fix_building_cura_main
Browse files Browse the repository at this point in the history
  • Loading branch information
jellespijker committed Jun 14, 2022
2 parents 0e3c24d + ae70266 commit bdb13eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions UM/Mesh/MeshData.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,9 @@ def createConvexHull(vertex_data: numpy.ndarray) -> scipy.spatial.ConvexHull:
# See https://github.com/scipy/scipy/issues/8850 for more info.
Logger.logException("e", "Couldn't construct convex hull around mesh (using faux hull instead)")
hull_result = scipy.spatial.ConvexHull(numpy.array([[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]])) # Cube, known to always succeed.
except ValueError: # Can happen if there are NaN points in there.
Logger.error("Model contains NaN coordinates. Using faux convex hull.")
hull_result = scipy.spatial.ConvexHull(numpy.array([[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]])) # Cube, known to always succeed.
return hull_result


Expand Down
9 changes: 9 additions & 0 deletions UM/Resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,15 @@ def getSearchPaths(cls) -> Generator[str, None, None]:

yield from cls.__paths

@classmethod
def getSecureSearchPaths(cls) -> Generator[str, None, None]:
"""Gets the secure search paths for resources.
:return: A sequence of paths where resources might be.
"""

yield from cls.__secure_paths

@classmethod
def removeType(cls, resource_type: int) -> None:
"""Remove a custom resource type."""
Expand Down

0 comments on commit bdb13eb

Please sign in to comment.