Skip to content

Commit 27f57c5

Browse files
committed
some more docs
1 parent 3166e74 commit 27f57c5

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@ If called from inside a `jupyter` or `marimo` notebook, `mesh.show()` displays a
169169

170170
## Additional Notes
171171

172-
- Check out some cool stuff people have done in the [GitHub network](https://github.com/mikedh/trimesh/network/dependents)
173-
- Generally API changes should have a one-year period of [printing a `warnings.DeprecationWarning`](https://trimesh.org/contributing.html#deprecations) unless it's not possible for some reason.
172+
- Check out some cool stuff people have done in the [GitHub network](https://github.com/mikedh/trimesh/network/dependents).
173+
- Generally `trimesh` API changes should have a one-year period of [printing a `warnings.DeprecationWarning`](https://trimesh.org/contributing.html#deprecations) although that's not always possible (i.e. the pyglet2 viewer rewrite that's been back-burnered for several years.)
174174
- Docker containers are available on Docker Hub as [`trimesh/trimesh`](https://hub.docker.com/r/trimesh/trimesh/tags) and there's a [container guide](https://trimesh.org/docker.html) in the docs.
175175
- If you're choosing which format to use, you may want to try [GLB](https://trimesh.org/formats.html) as a fast modern option.
176176

177177

178178

179+

docs/content/formats.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ There's lots of mesh formats out there!
66

77
## Which Mesh Format Should I Use?
88

9-
Quick recommendation: `GLB`. If you're looking for "the simplest possible format because I have to write an importer in another language" you should take a look at `OFF`.
9+
Quick recommendation: `GLB`. If you're looking for "the simplest possible ASCII format because I have to write an importer in another language" you should take a look at `OFF`.
1010

11-
The GLTF is nice because it has a [well defined specification](https://github.com/KhronosGroup/glTF/tree/main/specification/2.0), supports most things people would want, and is very fast to load. The format has a JSON header which defines the layout of a binary blob, which allows the large arrays to be loaded with `numpy.frombuffer` which is extremely fast.
11+
GLTF is nice because it has a [well defined specification](https://github.com/KhronosGroup/glTF/tree/main/specification/2.0), supports most things people would want, and is very fast to load. It's fast because the format has a small JSON header which defines the layout of a packed binary blob, so the arrays can be loaded with `numpy.frombuffer` which is extremely fast. As a counterpoint a format like `3MF` defines each vertex as an `<vertex><x>"1.0123312"</x> ...`, which is almost as far from fast as it is possible to get.
1212

13-
Wavefront `OBJ` is also widely used and supported across many tools, although it lacks a specification and has a slightly unusual internal data structure, which can lead to compatibility and indexing issues.
13+
A very popular format is Wavefront `OBJ`. It's supported across many tools, although it lacks a specification and has an internal data structure that requires some pretty heavy conversion to the `trimesh` flat-array format which can lead to some confusion: for example `f 1/2/3 4/5/6 7//7 9/9/9` is a valid face. It's not a bad choice, but going with GLB is probably advisable in most cases.
1414

1515
## Supported Formats
1616

17-
No dependencies indicates a minimal install of just `trimesh` and `numpy` can load the format.
17+
No dependencies indicates a minimal install of just `trimesh` and `numpy` can load the format. If you are working with the textures, images are handled using `pip install pillow`.
1818

1919
| Format | Dependencies | Notes |
2020
| ------ | ------------ | ----- |
@@ -29,5 +29,5 @@ No dependencies indicates a minimal install of just `trimesh` and `numpy` can lo
2929
| `STEP`/`STP` | `cascadio` | The only boundary representation format with open-source loaders available. `cascadio` uses OpenCASCADE to convert to GLB before loading. |
3030
| `XAML` | `lxml` | Microsoft's 3D XAML format which exports from Solidworks |
3131
| `DXF` | | AutoCAD's drawing format, we only support the ASCII version with 2D geometry. |
32-
| `SVG` | | We import 2D paths as `trimesh.Path2D` from these, discarding pretty much all visual information other than the curves. |
32+
| `SVG` | `svg.path` | We import 2D paths as `trimesh.Path2D` from these, discarding pretty much all visual information other than the curves. |
3333
| `XYZ` | | Simple ASCII point cloud format with just one coordinate per line. |

0 commit comments

Comments
 (0)