skillfed

ocp-gordon

A Python library for Gordon Surface interpolation using B-splines.

ocp-gordon v0.2.2 353.6K downloads/30d#7,302 on PyPI2
Permissive license Apache-2.0 Active released

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-gordon

uv

uv add ocp-gordon

poetry

poetry add ocp-gordon

Installing 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

Operating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: MathematicsTopic :: Software Development :: Libraries :: Python Modules

Tags

gordon surface interpolationb-spline surface generationcadquery surface creationcurve network interpolationocp geometry library3d surface fittingopencascade python surfaces
cad-geometryb-spline3d-modeling

More Python Modules packages