diff --git a/pyproject.toml b/pyproject.toml index 9d4e3e900..11a88c3b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ trimesh = [ # this is the base extra most users will want easy = [ "colorlog", - # "mapbox-earcut", BLOCKED FOR NUMPY2 +"manifold3d>=2.3.0", # do boolean operations "chardet", "lxml", "jsonschema", @@ -91,7 +91,8 @@ recommend = [ "python-fcl", # do collision checks "openctm", # load `CTM` compressed models "cascadio", # load `STEP` files - "manifold3d>=2.3.0" # do boolean operations + "mapbox-earcut", BLOCKED FOR NUMPY2 + ] # this is the list of everything that is ever added anywhere diff --git a/trimesh/creation.py b/trimesh/creation.py index 599860072..2224f726c 100644 --- a/trimesh/creation.py +++ b/trimesh/creation.py @@ -548,7 +548,8 @@ def triangulate_polygon( """ if engine is None: - engine = next(name for name, exists in _engines if exists) + # try getting the first engine that is installed + engine = next((name for name, exists in _engines if exists), None) if polygon is None or polygon.is_empty: return [], []