
euler_number # the convex hull is another Trimesh object that is available as a property # lets compare the volume of our mesh with the volume of its convex hull print ( mesh. is_watertight # what's the euler number for the mesh? mesh. load ( './models/featuretype.STL' ) # is the current mesh watertight? mesh. load ( 'models/CesiumMilkTruck.glb', force = 'mesh' ) # mesh objects can be loaded from a file name or from a buffer # you can pass any of the kwargs for the `Trimesh` constructor # to `trimesh.load`, including `process=False` if you would like # to preserve the original loaded data without merging vertices # STL files will be a soup of disconnected triangles without # merging vertices however and will not register as watertight mesh = trimesh. # if you *always* want a straight `trimesh.Trimesh` you can ask the # loader to "force" the result into a mesh through concatenation mesh = trimesh. Trimesh ( vertices =, , ], faces = ], process = False ) # some formats represent multiple meshes with multiple instances # the loader tries to return the datatype which makes the most sense # which will for scene-like files will return a `trimesh.Scene` object. Trimesh ( vertices =, , ], faces = ]) # by default, Trimesh will do a light processing, which will # remove any NaN values and merge vertices that share position # if you want to not do this on load, you can pass `process=False` mesh = trimesh. attach_to_log () # mesh objects can be created from existing faces and vertex data mesh = trimesh. Import numpy as np import trimesh # attach to logger so trimesh messages will be printed to console trimesh.
Install gmsh on windows install#
With just numpy, pip can generally install trimesh cleanly on Packages adds functionality but is not required. Keeping trimesh easy to install is a core goal, thus the only hard Here’s a quick developmentĪnd contributing guide. Things not on that list are also welcome.

To contribute, here is an up to date list of potential Pull requests are appreciated and responded to promptly! If you’d like

Guaranteed: install a specific version if you plan on deploying The API is mostly stable, but this should not be relied on and is not
Install gmsh on windows full#
Provide a full featured and well tested Trimesh object which allows forĮasy manipulation and analysis, in the style of the Polygon object in Trimesh is a pure Python (2.7-3.5+) library for loading and usingĪn emphasis on watertight surfaces.
