# Python 3D libraries

Python 3D libraries load, edit, and render meshes, point clouds, and CAD models. A CAD kernel builds solids from exact curves and surfaces rather than from triangle approximations. These libraries let engineering tools, robotics pipelines, and scientific apps process 3D geometry in code.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [Trimesh](#trimesh) | 14.5M | 3.7K | Nov 2026 | MIT |
| [VTK](#vtk) | 6.1M | 3.2K | Nov 2026 | BSD-3-Clause |
| [cadquery-ocp](#cadquery-ocp) | 4.2M | 216 | Oct 2026 | Apache-2.0 |
| [Manifold](#manifoldthreed) | 4.0M | 2.4K | Nov 2026 | Apache-2.0 |
| [CadQuery](#cadquery) | 3.0M | 6.1K | Jun 2026 | Apache-2.0 |
| [Open3D](#open-d) | 2.3M | 14.2K | Sep 2026 | MIT |
| [PyVista](#pyvista) | 2.1M | 3.9K | Oct 2026 | MIT |
| [bpy](#bpy) | 2.0M | 22.2K | Nov 2026 | GPL-3.0 |

Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[Trimesh](#trimesh) has the most monthly downloads in this comparison, at 14.0M.

## Capabilities

| Library | Point-cloud dataset API | OpenCascade CAD solids |
| --- | --- | --- |
| [Trimesh](#trimesh) | Yes | No |
| [VTK](#vtk) | Yes | No |
| [cadquery-ocp](#cadquery-ocp) | Undocumented | Yes |
| [Manifold](#manifoldthreed) | No | No |
| [CadQuery](#cadquery) | No | Yes |
| [Open3D](#open-d) | Yes | No |
| [PyVista](#pyvista) | Yes | No |
| [bpy](#bpy) | Yes | No |

## Libraries

### Trimesh

[GitHub](https://github.com/mikedh/trimesh) · [PyPI](https://pypi.org/project/trimesh) · [Docs](https://trimesh.org/trimesh.html)

Loads and analyzes triangle meshes, with an emphasis on watertight surfaces.

- Downloads / mo: 14.5M
- Stars: 3.7K
- Last release: 5.2.1
- License: MIT
- Capabilities: [From the Trimesh docs](https://trimesh.org/trimesh.html)

**Strengths**

- **Computes properties of closed meshes.** Compute mass properties for closed meshes with a uniform density.
- **Preserves instances when loading scenes.** Use load_scene when meshes or repeated instances must stay separate.

**Watch out for**

- **Simplification needs fast-simplification.** Install fast-simplification before using simplify_quadric_decimation.
- **Mass properties need closed meshes.** Treat volume and mass properties as unreliable for open triangle surfaces.

```sh
python3.13 -m pip install trimesh==5.2.1
```

**microsoft/TRELLIS** (14.3K stars)

[microsoft/TRELLIS](https://github.com/microsoft/TRELLIS) 

```python
def to_glb(
    app_rep: Union[Strivec, Gaussian],
    mesh: MeshExtractResult,
    simplify: float = 0.95,
    fill_holes: bool = True,
    fill_holes_max_size: float = 0.04,
    texture_size: int = 1024,
    debug: bool = False,
    verbose: bool = True,
) -> trimesh.Trimesh:
    """
    Convert a generated asset to a glb file.

    Args:
        app_rep (Union[Strivec, Gaussian]): Appearance representation.
        mesh (MeshExtractResult): Extracted mesh.
        simplify (float): Ratio of faces to remove in simplification.
        fill_holes (bool): Whether to fill holes in the mesh.
        fill_holes_max_size (float): Maximum area of a hole to fill.
        texture_size (int): Size of the texture.
        debug (bool): Whether to print debug information.
        verbose (bool): Whether to print progress.
    """
    vertices = mesh.vertices.cpu().numpy()
    faces = mesh.faces.cpu().numpy()

    # mesh postprocess
    vertices, faces = postprocess_mesh(
        vertices, faces,
        simplify=simplify > 0,
        simplify_ratio=simplify,
        fill_holes=fill_holes,
        fill_holes_max_hole_size=fill_holes_max_size,
        fill_holes_max_hole_nbe=int(250 * np.sqrt(1-simplify)),
        fill_holes_resolution=1024,
        fill_holes_num_views=1000,
        debug=debug,
        verbose=verbose,
    )

    # parametrize mesh
    vertices, faces, uvs = parametrize_mesh(vertices, faces)

    # bake texture
    observations, extrinsics, intrinsics = render_multiview(app_rep, resolution=1024, nviews=100)
    masks = [np.any(observation > 0, axis=-1) for observation in observations]
    extrinsics = [extrinsics[i].cpu().numpy() for i in range(len(extrinsics))]
    intrinsics = [intrinsics[i].cpu().numpy() for i in range(len(intrinsics))]
    texture = bake_texture(
        vertices, faces, uvs,
        observations, masks, extrinsics, intrinsics,
        texture_size=texture_size, mode='opt',
        lambda_tv=0.01,
        verbose=verbose
    )
    texture = Image.fromarray(texture)

    # rotate mesh (from z-up to y-up)
    vertices = vertices @ np.array([[1, 0, 0], [0, 0, -1], [0, 1, 0]])
    material = trimesh.visual.material.PBRMaterial(
        roughnessFactor=1.0,
        baseColorTexture=texture,
        baseColorFactor=np.array([255, 255, 255, 255], dtype=np.uint8)
    )
    mesh = trimesh.Trimesh(vertices, faces, visual=trimesh.visual.TextureVisuals(uv=uvs, material=material))
    return mesh

```

[trellis/utils/postprocessing_utils.py](https://github.com/microsoft/TRELLIS/blob/193e0502b5cb3eb5997ec457d5340e95d09b158e/trellis/utils/postprocessing_utils.py) · [More projects using Trimesh →](https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20trimesh%20for%20point%20clouds%2C%20mesh%20processing%20and%20scientific%20visualization&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import trimesh

mesh = trimesh.creation.box(extents=(1.0, 2.0, 3.0))
print(mesh.volume)

```

From [README.md](https://trimesh.org/trimesh.creation.html)

### VTK

[GitHub](https://github.com/Kitware/VTK) · [PyPI](https://pypi.org/project/vtk) · [Docs](https://vtk.org/doc/nightly/html/classvtkPolyData.html)

Provides an open-source toolkit for 3D graphics, image processing, and visualization.

- Downloads / mo: 6.1M
- Stars: 3.2K
- Last release: 9.7.2
- License: BSD-3-Clause
- Capabilities: [From the VTK docs](https://vtk.org/doc/nightly/html/classvtkPolyData.html)

```sh
python3.13 -m pip install vtk==9.7.2
```

**Quickstart**

```python
from vtkmodules.vtkFiltersSources import vtkSphereSource

source = vtkSphereSource()
source.Update()
mesh = source.GetOutput()
print(mesh.GetNumberOfPoints())

```

From [classvtkSphereSource.html](https://vtk.org/doc/nightly/html/classvtkSphereSource.html) · [Find projects using VTK →](https://dashboard.exa.ai/playground/search?q=vtk%20GitHub%20projects)

### cadquery-ocp

[GitHub](https://github.com/CadQuery/OCP) · [PyPI](https://pypi.org/project/cadquery-ocp) · [Docs](https://api.github.com/repos/CadQuery/OCP/contents/README.md)

Wraps the Open CASCADE 3D geometry library for Python.

- Downloads / mo: 4.2M
- Stars: 216
- Last release: 8.0.1.1.0
- License: Apache-2.0
- Capabilities: [From the cadquery-ocp docs](https://api.github.com/repos/CadQuery/OCP/contents/README.md)

```sh
python3.13 -m pip install cadquery-ocp==8.0.1.1.0
```

**Quickstart**

```python
from OCP.BRepPrimAPI import BRepPrimAPI_MakeBox

shape = BRepPrimAPI_MakeBox(1.0, 2.0, 3.0).Shape()

```

From [class_b_rep_prim_a_p_i___make_box.html](https://dev.opencascade.org/doc/refman/html/class_b_rep_prim_a_p_i___make_box.html) · [Find projects using cadquery-ocp →](https://dashboard.exa.ai/playground/search?q=cadquery-ocp%20GitHub%20projects)

### Manifold

[GitHub](https://github.com/elalish/manifold) · [PyPI](https://pypi.org/project/manifold3d)

Keeps mesh operations geometrically valid.

- Downloads / mo: 4.0M
- Stars: 2.4K
- Last release: 3.5.5
- License: Apache-2.0
- Capabilities: [From the Manifold docs](https://github.com/elalish/manifold)

```sh
python3.13 -m pip install manifold3d==3.5.5
```

**mikedh/trimesh** (3.7K stars)

[mikedh/trimesh](https://github.com/mikedh/trimesh) 

```python
def boolean_manifold(
    meshes: Sequence,
    operation: BooleanOperationType,
    check_volume: bool = True,
    **kwargs,
):
    """
    Run an operation on a set of meshes using the Manifold engine.

    Parameters
    ----------
    meshes : list of trimesh.Trimesh
      Meshes to be processed
    operation
      Which boolean operation to do.
    check_volume
      Raise an error if not all meshes are watertight
      positive volumes. Advanced users may want to ignore
      this check as it is expensive.
    kwargs
      Passed through to the `engine`.
    """
    if check_volume and not all(m.is_volume for m in meshes):
        raise ValueError("Not all meshes are volumes!")

    # Convert to manifold meshes
    manifolds = [
        Manifold(
            mesh=Mesh(
                vert_properties=np.array(mesh.vertices, dtype=np.float32),
                tri_verts=np.array(mesh.faces, dtype=np.uint32),
            )
        )
        for mesh in meshes
    ]

    # Perform operations
    if operation == "difference":
        if len(meshes) < 2:
            raise ValueError("Difference only defined over two meshes.")
        elif len(meshes) == 2:
            # apply the single difference
            result_manifold = manifolds[0] - manifolds[1]
        elif len(meshes) > 2:
            # union all the meshes to be subtracted from the final result
            unioned = reduce_cascade(lambda a, b: a + b, manifolds[1:])
            # apply the difference
            result_manifold = manifolds[0] - unioned
    elif operation == "union":
        result_manifold = reduce_cascade(lambda a, b: a + b, manifolds)
    elif operation == "intersection":
        result_manifold = reduce_cascade(lambda a, b: a ^ b, manifolds)
    else:
        raise ValueError(f"Invalid boolean operation: '{operation}'")

    # Convert back to trimesh meshes
    from . import Trimesh

    result_mesh = result_manifold.to_mesh()

    return Trimesh(
        vertices=result_mesh.vert_properties, faces=result_mesh.tri_verts, process=False
    )
```

[trimesh/boolean.py](https://github.com/mikedh/trimesh/blob/7fe4ac4405ba5af02756c2db729da6822510304c/trimesh/boolean.py) · [More projects using Manifold →](https://dashboard.exa.ai/playground/search?q=manifold3d%20GitHub%20projects)

**Quickstart**

```python
from manifold3d import Manifold

solid = Manifold.cube((1.0, 2.0, 3.0))
mesh = solid.to_mesh()

```

From [README.md](https://api.github.com/repos/elalish/manifold/contents/bindings/python/manifold3d.cpp?ref=v3.5.5)

### CadQuery

[GitHub](https://github.com/CadQuery/cadquery) · [PyPI](https://pypi.org/project/cadquery) · [Docs](https://cadquery.readthedocs.io/en/latest/classreference.html)

Creates and traverses parametric CAD models from Python scripts.

- Downloads / mo: 3.0M
- Stars: 6.1K
- Last release: 2.8.0
- License: Apache-2.0
- Capabilities: [From the CadQuery docs](https://cadquery.readthedocs.io/en/latest/classreference.html)

```sh
python3.13 -m pip install cadquery==2.8.0
```

**fusion-energy/paramak** (111 stars)

[fusion-energy/paramak](https://github.com/fusion-energy/paramak) 

```python
def create_wire_workplane_from_points(points, plane, origin=(0, 0, 0), obj=None):

    workplane = Workplane(plane, origin=origin, obj=obj)

    all_straight = all(entry[-1] == "straight" for entry in points)
    all_spline = all(entry[-1] == "spline" for entry in points)

    if all_straight:
        entry_values = [entry[:2] for entry in points[:-1]]
        result = workplane.polyline(entry_values).close()
    elif all_spline:
        entry_values = [entry[:2] for entry in points[:-1]]
        result = workplane.spline(
            entry_values, makeWire=True, tol=1e-1, periodic=True
        )  # periodic smooths out the connecting joint
    else:
        instructions = instructions_from_points(points)

        result = create_wire_workplane_from_instructions(
            instructions=instructions,
            workplane=workplane,
        )

    return result
```

[src/paramak/utils.py](https://github.com/fusion-energy/paramak/blob/38e09e1ca15bca97d9612b43816029686b3aa2ce/src/paramak/utils.py) · [More projects using CadQuery →](https://dashboard.exa.ai/playground/search?q=cadquery%20GitHub%20projects)

**Quickstart**

```python
from cadquery import Workplane

part = Workplane("XY").box(1.0, 2.0, 3.0)

```

From [quickstart.html](https://cadquery.readthedocs.io/en/latest/quickstart.html)

### Open3D

[GitHub](https://github.com/isl-org/Open3D) · [PyPI](https://pypi.org/project/open3d) · [Docs](https://www.open3d.org/docs/release/python_api/open3d.geometry.PointCloud.html)

Provides Python geometry structures and algorithms for point clouds, meshes, reconstruction, and visualization.

- Downloads / mo: 2.3M
- Stars: 14.2K
- Last release: 0.20.0
- License: MIT
- Capabilities: [From the Open3D docs](https://www.open3d.org/docs/release/python_api/open3d.geometry.PointCloud.html)

**Strengths**

- **Builds surfaces from point clouds.** Reconstruct triangle meshes with ball pivoting or Poisson methods.
- **Combines geometry and interactive views.** Inspect geometry with mouse-controlled rotation, translation, and scaling.

**Watch out for**

- **Poisson reconstruction needs point normals.** Supply point normals before running Poisson surface reconstruction.
- **Poisson reconstruction can extrapolate.** Remove low-density regions when reconstruction adds surfaces beyond observed points.

```sh
python3.13 -m pip install open3d==0.20.0
```

**Pointcept/Pointcept** (3.3K stars)

[Pointcept/Pointcept](https://github.com/Pointcept/Pointcept) 

```python
def get_point_cloud(coord, color=None, verbose=True):
    if not isinstance(coord, list):
        coord = [coord]
        if color is not None:
            color = [color]

    pcd_list = []
    for i in range(len(coord)):
        coord_ = to_numpy(coord[i])
        if color is not None:
            color_ = to_numpy(color[i])
        pcd = o3d.geometry.PointCloud()
        pcd.points = o3d.utility.Vector3dVector(coord_)
        pcd.colors = o3d.utility.Vector3dVector(
            np.zeros_like(coord_) if color is None else color_
        )
        pcd_list.append(pcd)
    if verbose:
        o3d.visualization.draw_geometries(pcd_list)
    return pcd_list

```

[pointcept/utils/visualization.py](https://github.com/Pointcept/Pointcept/blob/77f87abe69bf098ebccf3e9b08400963954af6ac/pointcept/utils/visualization.py) · [More projects using Open3D →](https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20open3d%20for%20point%20clouds%2C%20mesh%20processing%20and%20scientific%20visualization&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import numpy as np
import open3d as o3d

cloud = o3d.geometry.PointCloud()
cloud.points = o3d.utility.Vector3dVector(
    np.array([[0, 0, 0], [1, 0, 0], [0, 1, 0]], dtype=np.float64)
)
bounds = cloud.get_axis_aligned_bounding_box()
print(bounds)

```

From [triangle_mesh_simplification_decimation.py](https://www.open3d.org/docs/release/python_api/open3d.geometry.PointCloud.html)

### PyVista

[GitHub](https://github.com/pyvista/pyvista) · [PyPI](https://pypi.org/project/pyvista) · [Docs](https://docs.pyvista.org/api/core/_autosummary/pyvista.polydata)

Provides dataset structures, mesh filters, and plotting for points, surfaces, and volumes.

- Downloads / mo: 2.1M
- Stars: 3.9K
- Last release: 0.49.2
- License: MIT
- Capabilities: [From the PyVista docs](https://docs.pyvista.org/api/core/_autosummary/pyvista.polydata)

**Strengths**

- **Renders volume datasets.** Render image grids and unstructured volume data with add_volume.
- **Reduces triangle counts.** Use decimate to reduce a triangular mesh’s face count.

**Watch out for**

- **Decimation targets triangular surfaces.** Triangulate polygonal surfaces before calling decimate.
- **Decimation needs attribute settings.** Set enable_all_attribute_error when simplification must account for data arrays.

```sh
python3.13 -m pip install pyvista==0.49.2
```

**microsoft/TRELLIS** (14.3K stars)

[microsoft/TRELLIS](https://github.com/microsoft/TRELLIS) 

```python
def postprocess_mesh(
    vertices: np.array,
    faces: np.array,
    simplify: bool = True,
    simplify_ratio: float = 0.9,
    fill_holes: bool = True,
    fill_holes_max_hole_size: float = 0.04,
    fill_holes_max_hole_nbe: int = 32,
    fill_holes_resolution: int = 1024,
    fill_holes_num_views: int = 1000,
    debug: bool = False,
    verbose: bool = False,
):
    """
    Postprocess a mesh by simplifying, removing invisible faces, and removing isolated pieces.

    Args:
        vertices (np.array): Vertices of the mesh. Shape (V, 3).
        faces (np.array): Faces of the mesh. Shape (F, 3).
        simplify (bool): Whether to simplify the mesh, using quadric edge collapse.
        simplify_ratio (float): Ratio of faces to keep after simplification.
        fill_holes (bool): Whether to fill holes in the mesh.
        fill_holes_max_hole_size (float): Maximum area of a hole to fill.
        fill_holes_max_hole_nbe (int): Maximum number of boundary edges of a hole to fill.
        fill_holes_resolution (int): Resolution of the rasterization.
        fill_holes_num_views (int): Number of views to rasterize the mesh.
        verbose (bool): Whether to print progress.
    """

    if verbose:
        tqdm.write(f'Before postprocess: {vertices.shape[0]} vertices, {faces.shape[0]} faces')

    # Simplify
    if simplify and simplify_ratio > 0:
        mesh = pv.PolyData(vertices, np.concatenate([np.full((faces.shape[0], 1), 3), faces], axis=1))
        mesh = mesh.decimate(simplify_ratio, progress_bar=verbose)
        vertices, faces = mesh.points, mesh.faces.reshape(-1, 4)[:, 1:]
        if verbose:
            tqdm.write(f'After decimate: {vertices.shape[0]} vertices, {faces.shape[0]} faces')

    # Remove invisible faces
    if fill_holes:
        vertices, faces = torch.tensor(vertices).cuda(), torch.tensor(faces.astype(np.int32)).cuda()
        vertices, faces = _fill_holes(
            vertices, faces,
            max_hole_size=fill_holes_max_hole_size,
            max_hole_nbe=fill_holes_max_hole_nbe,
            resolution=fill_holes_resolution,
            num_views=fill_holes_num_views,
            debug=debug,
            verbose=verbose,
        )
        vertices, faces = vertices.cpu().numpy(), faces.cpu().numpy()
        if verbose:
            tqdm.write(f'After remove invisible faces: {vertices.shape[0]} vertices, {faces.shape[0]} faces')

    return vertices, faces

```

[trellis/utils/postprocessing_utils.py](https://github.com/microsoft/TRELLIS/blob/193e0502b5cb3eb5997ec457d5340e95d09b158e/trellis/utils/postprocessing_utils.py) · [More projects using PyVista →](https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20pyvista%20for%20point%20clouds%2C%20mesh%20processing%20and%20scientific%20visualization&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import pyvista as pv

mesh = pv.Sphere(radius=1.0)
print(mesh.n_points)

```

From [create_tri_surface.py](https://docs.pyvista.org/api/utilities/_autosummary/pyvista.Sphere.html)

### bpy

[GitHub](https://github.com/blender/blender) · [PyPI](https://pypi.org/project/bpy) · [Docs](https://docs.blender.org/api/current/info_advanced_blender_as_bpy.html)

Runs Blender as a Python module.

- Downloads / mo: 2.0M
- Stars: 22.2K
- Last release: 5.3.0
- License: GPL-3.0
- Capabilities: [From the bpy docs](https://docs.blender.org/api/current/info_advanced_blender_as_bpy.html)

```sh
python3.13 -m pip install bpy==5.3.0
```

**DLR-RM/BlenderProc** (3.8K stars)

[DLR-RM/BlenderProc](https://github.com/DLR-RM/BlenderProc) 

```python
def create_from_blender_mesh(blender_mesh: bpy.types.Mesh, object_name: str = None) -> MeshObject:
    """ Creates a new Mesh object using the given blender mesh.

    :param blender_mesh: The blender mesh.
    :param object_name: The name of the new object. If None is given, the name of the given mesh is used.
    :return: The new Mesh object.
    """
    # link this mesh inside of a new object
    obj = bpy.data.objects.new(blender_mesh.name if object_name is None else object_name, blender_mesh)
    # link the object in the collection
    bpy.context.collection.objects.link(obj)
    return MeshObject(obj)
```

[blenderproc/python/types/MeshObjectUtility.py](https://github.com/DLR-RM/BlenderProc/blob/76bd8b82ee19489843578ff045298642197bf883/blenderproc/python/types/MeshObjectUtility.py) · [More projects using bpy →](https://dashboard.exa.ai/playground/search?q=bpy%20GitHub%20projects)

**Quickstart**

```python
import bpy

bpy.ops.mesh.primitive_cube_add(size=1.0, location=(0.0, 0.0, 0.0))

```

From [bpy.ops.mesh.html](https://docs.blender.org/api/current/bpy.ops.mesh.html)

## FAQ

### Which Python 3D library should I use?

[Trimesh](#trimesh) suits loading and analyzing triangle meshes. [Open3D](#open-d) suits point clouds and surface reconstruction. [CadQuery](#cadquery) suits parametric CAD models built in code.

### What is CadQuery?

[CadQuery](#cadquery) is a parametric scripting language for creating and traversing CAD models in Python. It builds on the Open CASCADE geometry kernel through [cadquery-ocp](#cadquery-ocp).

### What is Open3D?

[Open3D](#open-d) is a library for point clouds, meshes, and surface reconstruction. It includes geometry algorithms and an interactive visualizer.

### What is bpy?

[bpy](#bpy) is Blender packaged as a Python module. Scripts can build scenes, edit meshes, and render without opening the Blender interface.

### What is PyVista?

[PyVista](#pyvista) wraps VTK with dataset structures, mesh filters, and plotting for points, surfaces, and volumes.

### What is Trimesh?

[Trimesh](#trimesh) loads and analyzes triangle meshes, with an emphasis on watertight surfaces. It computes properties such as volume and checks meshes for intersections.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best Python 3D libraries Open3D Trimesh PyVista vedo code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
