-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2276 from mikedh/feat/stride
Release: Stride Speedup + Hints
- Loading branch information
Showing
14 changed files
with
249 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ requires = ["setuptools >= 61.0", "wheel"] | |
[project] | ||
name = "trimesh" | ||
requires-python = ">=3.8" | ||
version = "4.4.7" | ||
version = "4.4.8" | ||
authors = [{name = "Michael Dawson-Haggerty", email = "[email protected]"}] | ||
license = {file = "LICENSE.md"} | ||
description = "Import, export, process, analyze and view triangular meshes." | ||
|
@@ -90,7 +90,8 @@ recommend = [ | |
"pyglet<2", | ||
"psutil", | ||
"scikit-image", | ||
"python-fcl", # do collision checks | ||
"fast-simplification", | ||
# "python-fcl", # do collision checks # TODO : broken on numpy 2 | ||
"openctm", # load `CTM` compressed models | ||
"cascadio", # load `STEP` files | ||
|
||
|
@@ -159,7 +160,6 @@ flake8-implicit-str-concat = {"allow-multiline" = false} | |
"IPython.embed".msg = "you forgot to remove a debug embed ;)" | ||
"numpy.empty".msg = "uninitialized arrays are haunted try numpy.zeros" | ||
|
||
|
||
[tool.codespell] | ||
skip = "*.js*,./docs/built/*,./docs/generate/*,./models*,*.toml" | ||
ignore-words-list = "nd,coo,whats,bu,childs,mis,filetests" | ||
|
@@ -169,4 +169,4 @@ python_version = "3.8" | |
ignore_missing_imports = true | ||
disallow_untyped_defs = false | ||
disallow_untyped_calls = false | ||
disable_error_code = ["method-assign"] | ||
disable_error_code = ["method-assign", "var-annotated"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
try: | ||
from . import generic as g | ||
except BaseException: | ||
import generic as g | ||
|
||
|
||
def test_quadric_simplification(): | ||
if not g.trimesh.util.has_module("fast_simplification"): | ||
return | ||
|
||
m = g.get_mesh("rabbit.obj") | ||
assert len(m.faces) > 600 | ||
|
||
# should be about half as large | ||
a = m.simplify_quadric_decimation(percent=0.5) | ||
assert g.np.isclose(len(a.faces), len(m.faces) // 2, rtol=0.2) | ||
|
||
# should have the requested number of faces | ||
a = m.simplify_quadric_decimation(face_count=200) | ||
assert len(a.faces) == 200 | ||
|
||
# see if aggression does anything | ||
a = m.simplify_quadric_decimation(percent=0.25, aggression=5) | ||
assert len(a.faces) > 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
test_quadric_simplification() |
Oops, something went wrong.