-
Notifications
You must be signed in to change notification settings - Fork 633
Release: Collision Name #2479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Release: Collision Name #2479
Conversation
This file contains hidden or 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
- 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" />
…watertight Instead of giving up if the whole mesh is non-watertight, only skip the components that aren't watertight.
…or binvox version 1.38
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`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trimesh.remove_degenerate_facesandTrimesh.remove_duplicate_faces.SceneViewercontrol instructions from the README to print on thehkeypress, and make the default window caption includeh for helppsutilfrom dependencies. It was only used to check if ascipy.spatial.cdistcall 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 thecdistcall is going to use more than a fixed4 GBof memory,Cylinder) mostly overrideareaandvolumeby checking that their primitive area/volume is not exactly floating point equal to their meshed volume. This caught thatCapsuledidn'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.