ocpsvg
What it is and what it does
OCPSVG bridges SVG and OpenCASCADE by converting SVG path strings to and from OCP topological objects (TopoDS_Edge, TopoDS_Wire, TopoDS_Face). It works at the low OCP level using svgelements for the SVG parsing and geometry translation. The package is designed to add SVG import and export capability to higher-level CAD APIs that build on OCP.
The package is a thin integration layer: it takes SVG documents or path strings and produces native OCP geometry objects, or vice versa. This is useful for workflows where you need to move geometry between SVG (web, design tools) and OpenCASCADE-based CAD systems. It has low install friction as a pure-Python wheel, but maintenance is aging and the license is undocumented.
Use it for:
- Import SVG designs from web or design tools into OpenCASCADE-based CAD applications
- Export OCP geometry as SVG for visualization or sharing in web contexts
- Convert SVG paths to TopoDS edges or wires for further CAD operations
- Build SVG support into higher-level CadQuery or OCP-based tools
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts between SVG path strings and OpenCASCADE topological objects (edges, wires, faces), enabling SVG import and export at the OCP level.
Yes, if you need SVG-to-OCP conversion and can work around the aging maintenance status. The low install friction and lack of security issues are positives. However, verify the license first, and be aware that the package has not been actively developed for several months—expect limited support for edge cases or new SVG features.
Install
ocpsvg on PyPI
pip
pip install ocpsvguv
uv add ocpsvgpoetry
poetry add ocpsvgInstalling ocpsvg
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 218 days ago—so expect limited active development and slower response to issues.
License in practice
License treatment is unclear; no SPDX identifier or raw license text is available in the metadata. Verify the actual license before use in proprietary or restricted contexts.
Quickstart
pip install ocpsvg
from ocpsvg import svg_to_ocp
# Convert SVG path to TopoDS_Edge or Wire
edge = svg_to_ocp('M 0 0 L 10 10')
Requires Python >= 3.10 and depends on cadquery_ocp_proxy and svgelements packages.
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode
- What license actually applies to the package
- Performance characteristics when converting large or complex SVG documents
- Completeness of SVG feature support (e.g., curves, transforms, groups)
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — cadquery_ocp_proxy, svgelements |
| Maintenance | aging — 218 days since the last release |
| First released | |
| Downloads | 423,657/month — #6,769 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ocpsvg-0.6.0-py3-none-any.whl
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
ocp-tessellateConverts OCP (OpenCascade Python bindings) CAD…
permissive · top 15,000 on PyPI
svgelementssvgelements parses SVG files and provides…
permissive · top 5,000 on PyPI
cascadioConverts STEP files to GLB (glTF binary) format…
unclear · top 15,000 on PyPI
ocp-gordonInterpolates networks of curves into smooth…
permissive · top 15,000 on PyPI
cadquery-ocp-novtkProvides Python bindings to the Open CASCADE…
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
svg.pathParses SVG path definitions and provides…
permissive · top 5,000 on PyPI
build123dbuild123d is a Python CAD framework for…
permissive · top 15,000 on PyPI
svgpathtoolsReads, writes, and analyzes SVG Path objects…
permissive · top 5,000 on PyPI