skillfed

ocp-tessellate

Tessellate OCP (https://github.com/cadquery/OCP) objects to use with threejs

ocp-tessellate v3.4.1 107.6K downloads/30d#12,604 on PyPI15
Permissive license Apache-2.0 Active released

What it is and what it does

ocp-tessellate bridges CAD modeling libraries and web-based 3D viewers by converting solid geometry into triangulated meshes packaged as JSON. It walks hierarchical CAD structures—assemblies, compounds, sketches—preserves their tree organization, computes surface triangulations and discretized edges, and emits a format directly consumable by three-cad-viewer and related tooling.

The package offers three entry points: a high-level export function that writes a ready-to-load JavaScript file, a mid-level converter that produces an OcpGroup hierarchy and instance list, and a tessellation function for fine-grained control over mesh parameters like deviation and angular tolerance. It accepts per-object styling (colors, alphas, material modes) and renderer hints.

Use it for:

  • Export CAD designs to interactive 3D web viewers without manual mesh conversion.
  • Embed tessellation in CAD tools to preview geometry changes in real time.
  • Generate JSON scene trees for downstream processing or custom applications.
  • Preserve assembly structure and metadata through the tessellation pipeline.
  • Batch convert OCP shapes to web-ready formats for documentation or design review.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts OCP (OpenCascade Python bindings) CAD shapes into JSON-friendly tessellated meshes for visualization in web-based 3D viewers.

Yes. Active, low-friction package with no known vulnerabilities, permissive licensing, and a clear role in the OCP ecosystem. Install if you need to visualize CAD geometry in web-based viewers or embed tessellation in CAD tools; skip if you work exclusively with desktop CAD or have no web visualization requirement.

Install

ocp-tessellate on PyPI

pip

pip install ocp-tessellate

uv

uv add ocp-tessellate

poetry

poetry add ocp-tessellate

Installing ocp-tessellate

Before you install

Low friction: pure Python wheel with four lightweight runtime dependencies (webcolors, numpy, cachetools, imagesize). Active maintenance with a release in the last 30 days. Requires Python 3.10+ and OCP 7.8 or 7.9 as external dependencies.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions—suitable for most projects.

Quickstart

from ocp_tessellate.convert import export_three_cad_viewer_js

# Accepts OCP shapes, CadQuery, or build123d objects
export_three_cad_viewer_js("shape", your_shape, filename="output.js")

Requires Python 3.10+ and OCP 7.8 or 7.9 installed separately.

Verify before relying

  • Performance characteristics with large or complex assemblies (tessellation time, memory usage).
  • Exact tessellation quality tuning options and their effect on mesh fidelity vs. file size.
  • Compatibility with OCP versions beyond 7.8 and 7.9.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — webcolors, numpy, cachetools, imagesize
Maintenance actively maintained — 30 days since the last release
Last repo commit
First released
Downloads 107,648/month — #12,604 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ocp_tessellate-3.4.1-py3-none-any.whl

Keywords: 3d models, 3d printing, 3d viewing, 3d, brep, cad, cadquery, opencscade, python

Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

ocp shape to json meshcad geometry tessellationthree-cad-viewer exportopencascade mesh conversioncadquery visualization export
cad-visualizationmesh-conversion3d-geometry

More Graphics packages