Questions tagged [trimesh]
94 questions
1
vote
0 answers
3D Binary Space Partitioning with solid/empty leaves
I've recently started looking into BSPs for real-time collision detection, and I'm now looking into improving the performance of my solution.
The system that I've implemented is rather similar to the solution found on wikipedia…

Lolslayer
- 63
- 8
1
vote
1 answer
Turn samples into Mesh
i want to load a mesh file (.obj), then want to use the trimesh.sample.sample_surface_even() function to get some points on the surface, turn the resulting points back into a mesh and save them back as an .obj file.
My problem is, that i dont know…

David
- 11
- 1
1
vote
1 answer
How to find the volume of a non-closed mesh in Python?
So I have an STL file of a sphere that is cut in half. I want to find the volume of the inside of the file, but since it isn't 'water-tight' I can't find an accurate volume. Using the volume Trimesh function, the result of the volume changes at…

Forrest
- 157
- 14
1
vote
0 answers
How to embed the trimesh show in a python GTK3 app?
I need to make a GTK3 application in Python that includes a mesh visualized with Trimesh.
mesh = trimesh.load(filename)
mesh.is_watertight
mesh.euler_number
np.divide(mesh.volume, mesh.convex_hull.volume)
mesh.vertices -=…

Sergio
- 11
- 1
1
vote
0 answers
How can I refresh Trimesh(Pyglet) viewer to see my mesh(stl) rotation and interupt this visualisation after an angular condition?
After long hours to search by myself a solution to my question, I am here to find some help so that, I hope, someone could help me to unfreeze my actual situation. So if there is any specialist or nice "Python Guru" who has some time to give me a…

RV-G
- 21
- 5
1
vote
2 answers
Walking through directory path and opening them with trimesh
I have the following code:
import os
import trimesh
# Core settings
rootdir = 'path'
extension = ".zip"
for root, dirs, files in os.walk(rootdir):
if not root.endswith(".zip"):
for file in files:
if file.endswith(".stl"):
…

Cenk_Mitir
- 113
- 11
0
votes
0 answers
Generation a Heightmap using Mesh Face_normals Elevation in Pyvista
So, to explain the context ! what I'm trying to do is to generate a heightmap of a Voxelized Buildings mesh, to do that I tried getting the upper faces and their cell_centers so I can use each cell_center elevation as a height and do some math to…

Sofiane
- 3
- 3
0
votes
0 answers
How can I make this rotational matrix work correctly?
I have a function that places a trimesh primitive cylinder (pin) on a defined XYZ coordinate (x_cylinder_points) so that it rests on another cylinder (cylinder), and then it would ideally orient the pin so that it points towards a second defined XYZ…

GIo
- 3
- 3
0
votes
0 answers
how to merge a collection of list objects using the trimesh library and subsequently save the combined result into a single .obj file?
i want merge a collection of list objects using the trimesh library and subsequently save the combined result into a single .obj file?
for file_path, size, translation, rotation_angle in zip(file_paths, size_data, translation_data,…
0
votes
0 answers
Can I extract a submesh from a surface mesh knowing the enclosing perimeter points/boundary of the cell?
I am working on a surface mesh, and would like to cells on the heart surface split the surface into cells, defined by boundary points that break up the heart as shown (which I know). I would like to extract the individual cells, to simply calculate…
0
votes
1 answer
Trimesh, Making two mesh objects merge with each other
I have a script that places two sets of meshes into a list. When I want to export the result, I load all the objects into a scene and then I export the scene. One being a set of slanted cylinders, and the other a set of vertical cylinders.
Each…

GIo
- 3
- 3
0
votes
2 answers
How do I use Python Trimesh to get boundary vertex indices?
How do I use the Trimesh Python library to retrieve the indices of the vertices that make up the boundary of a mesh?
For example, for a planar mesh, I expect only the vertices that are on the outer edges. If the planar mesh has a hole, I also expect…

KevinM
- 567
- 4
- 21
0
votes
0 answers
How do I export an STL from a point_e.util.mesh.TriMesh
Currently I am using this
https://github.com/openai/point-e/blob/main/point_e/examples/pointcloud2mesh.ipynb
and I would like to export to STL instead of PLY
I tried asking GPT and got
import trimesh
from point_e.util.pc_to_mesh import…

Jackie
- 21,969
- 32
- 147
- 289
0
votes
1 answer
Manifold 3D mesh of text in python
I'm trying to get to the end on a code that will help me scripting the generation of customized stl files.
The general needs I have are to :
be in python and if possible without other back-end software
minimize the dependencies
produce lightweight…
0
votes
0 answers
How can i change mesh resolution of the resulting lithophane from my code here?
I was testing a vector graphic and a nature picture to get a sense of darker spots and I'm seeing a lot of triangles. how can increasing the density of vertices be in the result? What's puzzling me is that the density of vertices is not the same as…

Mcneds
- 1
- 1