trimesh - Serbipunk/notes GitHub Wiki
Features
https://github.com/mikedh/trimesh/blob/main/README.md#features
-
Import meshes from binary/ASCII STL, Wavefront OBJ, ASCII OFF, binary/ASCII PLY, GLTF/GLB 2.0, 3MF, XAML, 3DXML, etc.
-
Import and export 2D or 3D vector paths from/to DXF or SVG files (不理解这2个格式)
-
Import geometry files using the GMSH SDK if installed (BREP, STEP, IGES, INP, BDF, etc) (不理解)
-
Export meshes as binary STL, binary PLY, ASCII OFF, OBJ, GLTF/GLB 2.0, COLLADA, etc.
-
Export meshes using the GMSH SDK if installed (Abaqus INP, Nastran BDF, etc)
-
Preview meshes using pyglet or in- line in jupyter notebooks using three.js (值得看一下three.js)
-
Automatic hashing of numpy arrays for change tracking using MD5, zlib CRC, or xxhash
-
Internal caching of computed values validated from hashes
-
Calculate face adjacencies, face angles, vertex defects(顶点缺陷), etc. 面片相关计算
-
Calculate cross sections (交叉区域), i.e. the slicing operation used in 3D printing。 物体关系相关计算
-
Slice meshes with one or multiple arbitrary planes and return the resulting surface 细分面片
-
Split mesh based on face connectivity using networkx (), graph-tool, or scipy.sparse 细分面片(networkx 图论工具)
-
Calculate mass properties, including volume, center of mass, moment of inertia, principal components of inertia vectors and components 堆属性算法
-
Repair simple problems with triangle winding, normals, and quad/tri holes (修复工具么?)
-
Convex hulls of meshes (面片结构的凸包)
-
Compute rotation/translation/tessellation(镶嵌) invariant identifier and find duplicate meshes (mesh的去重)
-
Determine if a mesh is watertight(水密性), convex, etc.
-
Uniformly sample the surface of a mesh
-
Ray-mesh queries including location, triangle index, etc.
-
Boolean operations on meshes (intersection, union, difference) using OpenSCAD or Blender as a back end. Note that mesh booleans in general are usually slow and unreliable (几乎不可用特性)
-
Voxelize watertight meshes (体素化) (INTRESTING)
-
Volume mesh generation (TETgen) using Gmsh SDK
-
Smooth watertight meshes using laplacian smoothing algorithms (Classic, Taubin, Humphrey) (表面平滑)
-
Subdivide faces of a mesh (细分)
-
Minimum volume oriented bounding boxes for meshes (取得外接盒)
-
Minimum volume bounding spheres (取得外界椭球)
-
Symbolic integration of functions over triangles (??联想不到)
-
Calculate nearest point on mesh surface and signed distance (计算最近点)
-
Determine if a point lies inside or outside of a well constructed mesh using signed distance (点、物体关系)
-
Primitive objects (Box, Cylinder, Sphere, Extrusion) which are subclassed Trimesh objects and have all the same features (inertia, viewers, etc) (基础几何形状)
-
Simple scene graph and transform tree which can be rendered (pyglet window, three.js in a jupyter notebook, pyrender) or exported. (可渲染的场景树)
-
Many utility functions, like transforming points, unitizing vectors, aligning vectors, tracking numpy arrays for changes, grouping rows, etc.