Registry / ai-ml / ocp-gordon

ocp-gordon

JSON →
library0.2.0pypypiunverified

A Python library for Gordon surface interpolation using B-splines, building on Open CASCADE Technology (OCCT) via OCP. Version 0.2.0 requires Python >=3.10,<3.15. Active development with frequent releases.

pip install ocp-gordon
INSTALL
IMPORT
SIG · OCP-GORDON
O
ocp-gordon
ai-mlpythonv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GordonSurface
from ocp_gordon import GordonSurface
from ocp_gordon import GordonSurface

Create a Gordon surface from four corner points using bicubic B-spline interpolation.

from ocp_gordon import GordonSurface from OCP.BRepPrimAPI import BRepPrimAPI_MakeBox from OCP.gp import gp_Pnt # Create a simple Gordon surface from four corner points pts = [gp_Pnt(0,0,0), gp_Pnt(1,0,0.5), gp_Pnt(0,1,0.3), gp_Pnt(1,1,0.8)] surf = GordonSurface(pts, degree_u=3, degree_v=3) # Convert to shape for further processing shape = surf.to_shape() print('Gordon surface created')
Debug
Known issues
gotchaThe `GordonSurface` constructor expects a list of 4 corner points in order: lower-left, lower-right, upper-left, upper-right. Incorrect ordering produces a twisted surface.
fix
Ensure points are ordered: [p00, p10, p01, p11] where u varies along rows, v along columns.
affects: 0.1.0-0.2.0
breakingIn v0.2.0, the `to_shape()` method replaces the deprecated `toTopoDS_Shape()` from v0.1.x. Calling the old method raises AttributeError.
fix
Use `shape = surf.to_shape()` instead of `shape = surf.toTopoDS_Shape()`.
affects: >=0.2.0
deprecatedThe function `make_gordon_surface` (with underscores) is deprecated in v0.2.0 in favor of `GordonSurface` class. It will be removed in v0.3.0.
fix
Use `GordonSurface(...)` constructor instead.
affects: 0.2.0
Upgrade
Version history
0.2.0latest on PyPI · released Jan 9, 2026
Audit
Dependencies
ocp-vscodeoptionalOCP CAD viewer, optional for visualization
OCPrequiredPython bindings for Open CASCADE Technology
numpyrequiredNumerical operations
Agent activity
2 hits · last 30 days
node
2
Resources
ocp-gordon — pip install ocp-gordon · libregistry