You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@
7
7
8
8
|:warning: WARNING |
9
9
|---------------------------|
10
-
|`trimesh >= 4.0.0` on `main` makes minimum Python 3.7 and is in pre-release |
10
+
|`trimesh >= 4.0.0` on `release-candidate` makes minimum Python 3.7 is in pre-release |
11
11
| Testing with `pip install --pre trimesh` would be much appreciated! |
12
-
| Projects that support Python<3.7 should update requirement to `trimesh<4`|
12
+
| Projects that support `python<3.7` should update requirement to `trimesh<4`|
13
13
14
14
15
15
Trimesh is a pure Python 3.7+ library for loading and using [triangular meshes](https://en.wikipedia.org/wiki/Triangle_mesh) with an emphasis on watertight surfaces. The goal of the library is to provide a full featured and well tested Trimesh object which allows for easy manipulation and analysis, in the style of the Polygon object in the [Shapely library](https://github.com/Toblerity/Shapely).
Copy file name to clipboardExpand all lines: docs/guides/contributing.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,16 +71,12 @@ if __name__ == '__main__':
71
71
When you remove the embed and see the profile result you can then tweak the lines that are slow before finishing the function.
72
72
73
73
### Automatic Formatting
74
-
Before opening a pull request I run some auto-formatting rules which will run autopep8 and yell at you about any `ruff` rule violations. There is a convenience script baked into `setup.py` to run all of these which you can run with:
74
+
The only check in that's required to pass in CI is `ruff`, which I usually run with:
75
75
```
76
-
python setup.py --format
76
+
ruff . --fix
77
77
```
78
+
It can fix a lot of formatting issues automatically. We also periodically run `black` to autoformat the codebase.
78
79
79
-
This is equivalent to running `codespell`, `autopep8`, and `flake8` on trimesh, examples, and tests. You can also run it yourself with these options:
Copy file name to clipboardExpand all lines: docs/guides/install.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ If you\'d like most soft dependencies which should install cleanly on Mac, Windo
18
18
pip install trimesh[easy]
19
19
```
20
20
21
-
Or if you want the full experience, you can try the `all` extra, where packages may only be available for Linux:
21
+
Or if you want the full experience, you can try the `all` extra which includes all the testing and recommended packages:
22
22
```
23
23
pip install trimesh[all]
24
24
```
@@ -42,7 +42,7 @@ Ubuntu-Debian Notes
42
42
Blender and openSCAD are soft dependencies used for boolean operations with subprocess, you can get them with `apt`:
43
43
44
44
```
45
-
sudo apt-get install openscad blender
45
+
sudo apt-get install blender
46
46
```
47
47
48
48
Dependency Overview
@@ -54,31 +54,31 @@ Trimesh has a lot of soft-required upstream packages. We try to make sure they'r
54
54
| Package | Description | Alternatives | Level |
55
55
| ------ | --------- | ---------- | ----- |
56
56
|`numpy`| The base container for fast array types. ||`required`|
57
-
|`scipy`| Provides convex hulls (`scipy.spatial.ConvexHull`), fast graph operations (`scipy.sparse.csgraph`), fast nearest-point queries (`scipy.spatial.cKDTree`), b-spline evaluation (`scipy.interpolate`). |Nothing comes to mind, it does a whole heck of a lot. |`easy`|
57
+
|`scipy`| Provides convex hulls (`scipy.spatial.ConvexHull`), fast graph operations (`scipy.sparse.csgraph`), fast nearest-point queries (`scipy.spatial.cKDTree`), b-spline evaluation (`scipy.interpolate`). ||`easy`|
58
58
|`lxml`| Parse XML documents. We use this over the built-in ones as it was slightly faster, and there was a format implemented which was extremely annoying to handle without the ability to get parent nodes (which `lxml` has but built-in XML doesn't). | Standard library's XML |`easy`|
59
-
|`networkx`|A nice-to-use pure Python graph library that's faster than you'd think. It implements DFS, BFS, and the usual FAANG-interview-question algorithms. A lot of the commonly run stuff in trimesh has been re-written to use `scipy.sparse.csgraph`as it's also an easy install and is way faster in most cases. But if you have a small-ish graph the API for `networkx` is way easier to "grok". |`graph-tool`, `scipy.sparse.csgraph`|`easy`|
60
-
|`shapely`| Bindings to `GEOS` for 2D spatial stuff: "set-theoretic analysis and manipulation of planar features." It lets you offset, union, and query polygons nicely. |`clipper` maybe?|`easy`|
59
+
|`networkx`|Pure Python graph library that's reasonably fast and has a nice API. `scipy.sparse.csgraph` is way faster in most cases but is hard to understand and doesn't implement as many algorithms. |`graph-tool`, `scipy.sparse.csgraph`|`easy`|
60
+
|`shapely`| Bindings to `GEOS` for 2D spatial stuff: "set-theoretic analysis and manipulation of planar features" which lets you offset, union, and query polygons. |`clipper`|`easy`|
61
61
|`rtree`| Query ND rectangles with a spatial tree for a "broad phase" intersection. Used in polygon generation ("given N closed curves which curve contains the other curve?") and as the broad-phase for the built-in-numpy slow ray query engine. |`fcl` maybe? |`easy`|
62
62
|`requests`| Do network queries in `trimesh.exchange.load_remote`, will *only* make network requests when asked ||`easy`|
|`xxhash`| Quickly hash arrays, used for our cache checking ||`easy`|
65
-
|`msgpack`| A serialization method that supports bytes-blobs. |`protobuf`|`easy`|
66
-
|`chardet`| When we fail to decode text as UTF-8 we then check with chardet which guesses an encoding. This lets us load files even with weird encodings. ||`easy`|
65
+
|`chardet`| When we fail to decode text as UTF-8 we then check with chardet which guesses an encoding, letting us load files even with weird encodings. ||`easy`|
67
66
|`colorlog`| Printing logs with colors. ||`easy`|
68
-
|`pillow`| Reading raster images for textures, and rendering polygons into raster images. ||`easy`|
67
+
|`pillow`| Reading raster images for textures and render polygons into raster images. ||`easy`|
69
68
|`svg.path`| Parsing SVG path strings. ||`easy`|
70
69
|`jsonschema`| Validating our exports for formats like GLTF. ||`easy`|
71
70
|`pycollada`| Parse `dae` files. ||`easy`|
72
-
|`pyglet`| OpenGL bindings for our simple debug viewer. ||`easy`|
73
-
|`xatlas`| Unwrap meshes to generate UV coordinates quickly and well. ||`all`|
74
-
|`python-fcl`| Do collision queries between meshes ||`all`|
75
-
|`glooey`| Provide a viewer with widgets. ||`all`|
76
-
|`meshio`| Load additional mesh formats. ||`all`|
77
-
|`scikit-image`| Used in voxel ops ||`all`|
78
-
|`mapbox-earcut`| Triangulate 2D polygons |`triangle` which has an unusual license |`all`|
79
-
|`psutil`| Get current memory usage, useful for checking to see if we're going to run out of memory instantiating a giant array ||`all`|
71
+
|`pyglet<2`| OpenGL bindings for our simple debug viewer. ||`recommend`|
72
+
|`xatlas`| Unwrap meshes to generate UV coordinates quickly and well. ||`recommend`|
73
+
|`python-fcl`| Do collision queries between meshes ||`recommend`|
74
+
|`glooey`| Provide a viewer with widgets. ||`recommend`|
0 commit comments