Skip to main content

opencad2d

GeometryHelper for Python: 2D and 3D geometry, DXF and DWG read and write, and the CAD presenter without a window (a CadDocument edited through its command session and saved). The library is the .NET one, run on pythonnet; the .NET names stay as they are, and the wheel carries stubs so an editor (Pylance, pyright) completes them.

Install

Windows, 64-bit, Python 3.11 to 3.15, and a .NET 8 (or later) runtime or .NET Framework 4.8:

pip install opencad2d[numpy]

The numpy extra is for opencad2d.arrays, which copies point arrays to and from numpy in one block.

Example

import opencad2d
from OpenCAD2D import CadCommandSession, CadDocument
from GeometryHelper.Dxf import DxfDatabase, DxfWriter

document = CadDocument.From(DxfDatabase.Parse(DxfWriter().ToString()))
session = CadCommandSession(document)
with opencad2d.undo_group(document, "A circle"):  # one undo step, or none if the block raises
    for line in ("CIRCLE", "0,0", "25"):
        session.Feed(line)
document.SaveAs("drawing.dwg")
print(document.EntityCount, opencad2d.__version__, opencad2d.runtime())

The runtime is chosen by the environment variable OPENCAD2D_RUNTIME: auto (the default: .NET 8 or later when it is installed, else .NET Framework), coreclr or netfx.

The guide, with the runtime choice, the numpy helpers and the stubs, is at https://nguyenthanguth.github.io/GeometryHelper/.

Metadata

Release files for opencad2d 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for opencad2d 1.0.0
File Interpreter ABI Platform Actions
opencad2d-1.0.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for opencad2d-1.0.0-py3-none-win_amd64.whl

Release files / opencad2d-1.0.0-py3-none-win_amd64.whl

Download URL opencad2d-1.0.0-py3-none-win_amd64.whl
Size 10.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
ebee49e9d28a404892ce2562672d1d3c32103053954508d9bb8f1b3eb851c9fb
BLAKE2b-256 checksum
How to use checksums
d681e7bd0ff71d4df24b977121d7711d9b1fcc464156b8a02154ee28dfcde94c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for opencad2d 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for opencad2d-1.0.0-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page