{"id":31241693,"url":"https://github.com/smoren/trimeshtools-pypi","last_synced_at":"2025-09-23T00:19:22.261Z","repository":{"id":312542338,"uuid":"1047855289","full_name":"Smoren/trimeshtools-pypi","owner":"Smoren","description":"Collection of tools for 3D modeling with Trimesh","archived":false,"fork":false,"pushed_at":"2025-08-31T12:09:14.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-31T12:31:45.165Z","etag":null,"topics":["3d-modelling","3d-models","3d-printing","trimesh"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/trimeshtools/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Smoren.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-31T11:45:07.000Z","updated_at":"2025-08-31T12:09:17.000Z","dependencies_parsed_at":"2025-08-31T12:31:48.145Z","dependency_job_id":"ede5ecc4-4750-4212-894c-362d11c06724","html_url":"https://github.com/Smoren/trimeshtools-pypi","commit_stats":null,"previous_names":["smoren/trimeshtools-pypi"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Smoren/trimeshtools-pypi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smoren%2Ftrimeshtools-pypi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smoren%2Ftrimeshtools-pypi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smoren%2Ftrimeshtools-pypi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smoren%2Ftrimeshtools-pypi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Smoren","download_url":"https://codeload.github.com/Smoren/trimeshtools-pypi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smoren%2Ftrimeshtools-pypi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276494397,"owners_count":25652356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-modelling","3d-models","3d-printing","trimesh"],"created_at":"2025-09-23T00:19:17.891Z","updated_at":"2025-09-23T00:19:22.247Z","avatar_url":"https://github.com/Smoren.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TrimeshTools - collection of tools for 3D modeling with Trimesh\n\n[![PyPI package](https://img.shields.io/badge/pip%20install-trimeshtools-brightgreen)](https://pypi.org/project/trimeshtools/)\n[![version number](https://img.shields.io/pypi/v/trimeshtools?color=green\u0026label=version)](https://github.com/Smoren/trimeshtools-pypi/releases)\n[![PyPI Downloads](https://static.pepy.tech/badge/trimeshtools)](https://pepy.tech/projects/trimeshtools)\n[![Actions Status](https://github.com/Smoren/trimeshtools-pypi/workflows/Test/badge.svg)](https://github.com/Smoren/trimeshtools-pypi/actions)\n[![License](https://img.shields.io/github/license/Smoren/trimeshtools-pypi)](https://github.com/Smoren/trimeshtools-pypi/blob/master/LICENSE)\n\n**TrimeshTools** is a minimalistic Python library designed to extend the capabilities of the popular `trimesh` library. \nIt provides a limited set of tools for basic 3D mesh manipulation, including operations for combining, moving, rotating, \nand visualizing 3D models. This library aims to simplify common mesh processing tasks, making it easier for developers \nand researchers to work with 3D data in Python.\n\n## Key Features\n\n* **Mesh Combination**: Seamlessly perform boolean union operations and concatenate multiple meshes.\n* **Advanced Deformation**: Apply various deformation techniques such as bending, spiral bending, and twisting to meshes.\n* **Precise Editing**: Subdivide meshes for increased detail and accurately cut meshes using defined planes.\n* **Transformations**: Easily move meshes to specific positions (center, floor, custom bounds) and apply rotations or mirroring transformations.\n* **Geometric Figure Creation**: Generate complex 3D shapes like Archimedean spirals and rounded boxes.\n* **Surface Operations**: Utilize the `Surface` class for advanced operations, including creating surfaces from vertices, paths, Z-functions, and parametric functions, as well as thickening surfaces.\n* **Visualization**: Conveniently display meshes in a 3D viewer, with optional axis visualization.\n* **Mesh Repair Utilities**: Includes functions to fix common mesh issues such as merging vertices, removing duplicate faces, and correcting normals.\n\n## Installation\n\nTo install `trimeshtools-pypi`, you can use pip:\n```bash\npip install trimeshtools-pypi\n```\n\n## Usage\n\nHere are some basic examples of how to use `trimeshtools-pypi`.\n\n### Combining Meshes\n\n```python\nimport trimesh\nfrom trimeshtools.combine import union_meshes, concatenate_meshes\n\n# Create some sample meshes\nmesh1 = trimesh.creation.box()\nmesh2 = trimesh.creation.sphere()\n\n# Perform a union operation\ncombined_mesh_union = union_meshes(mesh1, mesh2)\n\n# Concatenate meshes\ncombined_mesh_concat = concatenate_meshes(mesh1, mesh2)\n```\n\n### Deforming Meshes\n\n```python\nimport trimesh\nfrom trimeshtools.deform import bend_mesh, spiral_bend_mesh, twist_mesh\n\n# Create a sample mesh\nmesh = trimesh.creation.box()\n\n# Bend the mesh\nbent_mesh = bend_mesh(mesh.copy(), radius=10)\n\n# Spiral bend the mesh\nspiral_bent_mesh = spiral_bend_mesh(mesh.copy(), bend_amount=0.5)\n\n# Twist the mesh\ntwisted_mesh = twist_mesh(mesh.copy(), num_rotations=3)\n```\n\n### Editing Meshes\n\n```python\nimport trimesh\nfrom trimeshtools.edit import subdivide_shape, cut_mesh\nimport numpy as np\n\n# Create a sample mesh\nmesh = trimesh.creation.box()\n\n# Subdivide the mesh\nsubdivided_mesh = subdivide_shape(mesh.copy(), iterations=1)\n\n# Cut the mesh\nplane_origin = [0, 0, 0]\nplane_normal = [0, 0, 1]\nmesh_above, mesh_below = cut_mesh(mesh.copy(), plane_origin, plane_normal)\n```\n\n### Moving Meshes\n\n```python\nimport trimesh\nfrom trimeshtools.move import move_to_center, move_to_floor, move_to_bound\n\n# Create a sample mesh\nmesh = trimesh.creation.box()\n\n# Move to center\ncentered_mesh = move_to_center(mesh.copy())\n\n# Move to floor\nfloored_mesh = move_to_floor(mesh.copy())\n\n# Move to specific bound\nbound_mesh = move_to_bound(mesh.copy(), x=1, y=-1, z=0)\n```\n\n### Rotating Meshes\n\n```python\nimport trimesh\nfrom trimeshtools.rotate import create_rotation_matrix_for_x, create_mirror_matrix\nimport numpy as np\n\n# Create a sample mesh\nmesh = trimesh.creation.box()\n\n# Create rotation matrix and apply\nrotation_matrix = create_rotation_matrix_for_x(np.radians(45))\nrotated_mesh = mesh.copy().apply_transform(rotation_matrix)\n\n# Create mirror matrix and apply\nmirror_matrix = create_mirror_matrix(x=True)\nmirrored_mesh = mesh.copy().apply_transform(mirror_matrix)\n```\n\n### Showing Meshes\n\n```python\nimport trimesh\nfrom trimeshtools.show import show_mesh\n\n# Create a sample mesh\nmesh = trimesh.creation.box()\n\n# Show the mesh\nshow_mesh(mesh)\n```\n\n### Surface Operations\n\n```python\nimport trimesh\nimport numpy as np\nfrom trimeshtools.surface import Surface\n\n# Create a surface from vertices\nvertices = np.array([\n    [0, 0, 0],\n    [1, 0, 0],\n    [0, 1, 0],\n    [1, 1, 0]\n])\nsurface_from_vertices = Surface.from_vertices(vertices)\n\n# Create a surface from a z-function\ndef custom_z_function(X, Y):\n    return np.sin(X) + np.cos(Y)\n\nsurface_from_function = Surface.from_z_function(\n    custom_z_function, x_range=(0, 2*np.pi), y_range=(0, 2*np.pi), steps_count=50\n)\n\n# Thicken a surface\nthickened_surface = surface_from_vertices.thicken(0.1)\n```\n\n## Dependencies\n\n`trimeshtools-pypi` relies on the following core libraries:\n\n* `trimesh`: A powerful Python library for 3D meshes and geometry.\n* `numpy`: The fundamental package for scientific computing with Python.\n* `scipy`: Scientific computing tools for Python, used for Delaunay triangulation in surface creation.\n* `shapely`: A Python library for manipulation and analysis of planar geometric objects, used for creating spiral meshes.\n\nThese dependencies will be automatically installed when you install `trimeshtools-pypi` using pip.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoren%2Ftrimeshtools-pypi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmoren%2Ftrimeshtools-pypi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoren%2Ftrimeshtools-pypi/lists"}