Skip to content

Conversation

@mikedh
Copy link
Owner

@mikedh mikedh commented Nov 7, 2025

  • release Add optional name parameter to min_distance_internal #2475
  • release Handle 3mf partnumber #2474
  • release Remove additional faces from trimesh.creation.revolve output #2483
  • release [OBJ] Allow splitting scenes by 'o' and 'g' tags #2481
  • release binvox header fix  #2486
  • release Refactor: Docs #2480
    • this applies the March 2024 deprecation removing Trimesh.remove_degenerate_faces and Trimesh.remove_duplicate_faces.
    • moves the SceneViewer control instructions from the README to print on the h keypress, and make the default window caption include h for help
  • remove psutil from dependencies. It was only used to check if a scipy.spatial.cdist call was going to use more than 50% of free system memory before falling back to a more memory-efficient but slower loop. This now falls back to a looping method if the cdist call is going to use more than a fixed 4 GB of memory,
  • add check that primitives (i.e. Cylinder) mostly override area and volume by checking that their primitive area/volume is not exactly floating point equal to their meshed volume. This caught that Capsule didn't return analytical volume/area which was also fixed. We could probably make Primitive a multiple inheritance ABC that requires certain properties but since Primitive already inherits from Trimesh that seems unnecessary and confusing.
  • clean up references to OpenCTM, which was deprecated for low use, being unmaintained, and inflicting a burden on upstream package management.
  • docker images now build with 3.14

mikedh and others added 30 commits September 26, 2025 14:44
- Add optional 'name' parameter to min_distance_internal method
- When name=None (default), maintains existing behavior for all object pairs
- When name is provided, computes distance from specified object to others
- Temporarily removes target object from manager to avoid self-distance calculation
- Add test case to verify single object distance functionality
Hi again @mikedh! ^^

Here a PR that extends `CollisionManager.min_distance_internal()` with
an optional `name` parameter to compute distances from a specific object
to all others.

### Changes
- Added `name=None` parameter to `min_distance_internal()`
- When `name` provided: computes distance from specified object to
others
- When `name=None`: existing behavior (all pairs) unchanged
- Temporarily removes target object from manager to avoid self-distance
calculation
- Added test check for new functionality

### Usage
```python
# Existing (unchanged)
distance = manager.min_distance_internal()

# New functionality  
distance = manager.min_distance_internal(name="my_object")
```
Handle build items'
[partnumber](https://github.com/3MFConsortium/spec_core/blob/997b385e06f3181cf9aae0c578e0b45ccd48ccb2/3MF%20Core%20Specification.md#attributes-2)
attribute on both load and export functions

Now the node names won't have unique id suffix, only an integer will be
added when needed. The partnumbers will be the node names in the Scene
graph, if it's better to store them separately please let me know.

While testing part number preservation, I found that the Scene class
cannot keep the hierarchy of 3MF files containing multiple instances of
composite parts. That’s the reason we flatten the graph during loading,
isn’t it?
As a result, build items that reference composite objects are expanded
into their components, causing the original part numbers to be lost and
new ones to be added.

It would be cool to be able to replicate the original hierarchy, but I
haven't found an easy way.
Previously it was only possible to group objects by material. Instead, it is now possible to
split objects by different group names or object names. This is similar to blender, which also
allows splitting OBJ by group and object. The implementation was straightforward, as previously
loading 'o' and 'g' tags was already implemented, but nothing seemed to use the functionality.
The one thing I had to add was group name in face_tuples, and update the functionality of
group_by_material to also handle objects and groups.
The function `trimesh.creation.revolve` produces an additional set of
faces linking the points at the beginning and at the end of the provided
line.

For example running this snippet, the assertion fails because 48 faces
are produced, i.e. 2*sections more than the expected number
```python
import trimesh.creation
import numpy as np

line = np.array([[1.0, 0.0], [1.0, 1.0], [1.0, 2.0], [1.0, 3.0]])
t = trimesh.creation.revolve(line, cap=False, sections=6)
assert t.vertices.shape == (24, 3)
assert t.faces.shape == (36, 3)
```

Viewing the mesh in MeshLab we can notice the presence of problematic
faces.
<img width="562" height="692" alt="Screenshot 2025-11-11 alle 19 10 08"
src="https://github.com/user-attachments/assets/4a93e77e-2227-4398-b2df-e7917d7e442e"
/>

This PR fixes the problem by avoiding the creation of the spurious
faces, recovering the expected result.
<img width="514" height="689" alt="Screenshot 2025-11-11 alle 19 11 03"
src="https://github.com/user-attachments/assets/47ea90c4-fa75-4c68-8997-064d65e59f60"
/>
pbsds and others added 28 commits November 14, 2025 21:15
…watertight

Instead of giving up if the whole mesh is non-watertight, only skip the components that aren't watertight.
Hello ! 

Apparently there has been an update to the binvox file header (tested on
binvox version 1.38), now binvox files includes a new header line that
looks like this :

```
# generated by [binvox], https://www.google.com/search?q=binvox, parameters: ...
```

This PR fixes the binvox parser and header to account for the newline.
…ertight (#2484)

Instead of giving up if the whole mesh is non-watertight, only skip the
components that aren't watertight. I'm having success with this on my
data.
- edit the somewhat outdated feature list
- shorten the README with links to the website rather than a wall of
text
- move the format discussion to its own markdown document on the website
including a table describing pros and cons of various formats, and
slightly tame the OBJ negativity.
- remove `openctm` references reflecting [the
deprecation](trimesh/openctm#5)
- move helper code generation and docker files to `helpers` rather than
being sprinkled around in the source directory.
- add a `trimesh.typed.Self` helper and change the relevant type hints. 
- apply the March 2024 deprecation removing
`Trimesh.remove_degenerate_faces` and `Trimesh.remove_duplicate_faces`.
@mikedh mikedh merged commit ffe3c35 into main Nov 24, 2025
11 checks passed
@mikedh mikedh deleted the release/collision branch November 24, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants