ocp-gordon
A Python library for Gordon Surface interpolation using B-splines.
What it is and what it does
ocp-gordon is a Python library for creating Gordon surfaces—smooth interpolated surfaces generated from a network of profile and guide curves. It wraps B-spline mathematics and integrates with CadQuery's OCP (OpenCASCADE Python bindings) to work with CAD geometry primitives. The implementation is adapted from C++ code and includes several refinements: a polyfilled optimization algorithm for curve intersection, regularization to prevent singular matrices, and support for iso-parametric inputs that skip unnecessary reparameterization.
The library is designed primarily for use within build123d but can be used independently. It depends on numpy and scipy for numerical computation, plus cadquery_ocp_proxy for geometric operations. The package is actively maintained and has no known security vulnerabilities. A documented caveat is that Gordon surfaces may show misalignment with input curves at boundaries, particularly for non-iso-parametric inputs, due to approximation in the reparameterization process.
Use it for:
- Generate smooth CAD surfaces from a grid of profile and guide curves in parametric design workflows.
- Create complex 3D geometry for 3D printing or CAD models by interpolating curve networks.
- Integrate surface generation into build123d or CadQuery-based design scripts.
- Approximate conic curves and other complex geometries using B-spline representations.
- Prototype aircraft or aerodynamic surfaces using parametric curve networks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Interpolates networks of curves into smooth Gordon surfaces using B-spline mathematics, integrated with CadQuery's OCP for CAD geometry operations.
Yes, if you are working with CadQuery or build123d and need to generate smooth surfaces from curve networks. The low install friction, permissive license, and active maintenance make it a straightforward addition. Be aware that it is early-stage (first release September 2025) with limited community presence, and boundary misalignment is a known issue for non-iso-parametric inputs—consult the wiki before relying on high-precision surface matching.
Install
ocp-gordon on PyPI
pip
pip install ocp-gordonuv
uv add ocp-gordonpoetry
poetry add ocp-gordonInstalling ocp-gordon
Before you install
Low friction installation with a pure-Python wheel. Active maintenance with a recent release (29 days ago), though the project is early-stage with minimal GitHub presence (2 stars).
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install ocp-gordon
from ocp_gordon import interpolate_curve_network
gordon_surface = interpolate_curve_network(profile_curves, guide_curves, tolerance=3e-4)
Requires Python 3.10 or later (supports up to 3.14); profile_curves and guide_curves must be B-spline objects compatible with OCP.
Verify before relying
- Whether the library handles edge-case curve topologies beyond the documented misalignment scenarios.
- Performance characteristics when working with large numbers of curves or high-resolution surfaces.
- Availability of detailed API documentation beyond the basic example in the description.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — cadquery_ocp_proxy, numpy, scipy |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 353,606/month — #7,302 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ocp_gordon-0.2.2-py3-none-any.whl
Keywords: 3d models, 3d printing, 3d, brep, cad, cadquery, build123d, opencascade, python
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
ocp-tessellateConverts OCP (OpenCascade Python bindings) CAD…
permissive · top 15,000 on PyPI
cadquery-ocpcadquery-ocp provides Python bindings to the…
permissive · top 5,000 on PyPI
cadquery-ocp-proxyA proxy package that routes optional…
permissive · top 5,000 on PyPI
cadquery-ocp-novtkProvides Python bindings to the Open CASCADE…
permissive · top 15,000 on PyPI
cadqueryCadQuery is a Python library for writing…
permissive · top 15,000 on PyPI
cascadioConverts STEP files to GLB (glTF binary) format…
unclear · top 15,000 on PyPI
ocpsvgConverts between SVG path strings and…
unclear · top 15,000 on PyPI
pyclothoidsPyclothoids provides a Python interface to…
unclear · top 15,000 on PyPI
Geode-ExplicitGeode-Explicit is an OpenGeode module for…
unclear · top 15,000 on PyPI
build123dbuild123d is a Python CAD framework for…
permissive · top 15,000 on PyPI