cad-scale-dxf
Zero-dependency Python library for 2D CAD and DXF geometry calculations: polyline perimeter, shoelace polygon area, bounding boxes, raster DPI-to-millimeter calibration, 1:N architectural drawing scale conversion, Ramer-Douglas-Peucker polyline simplification, and ASCII DXF LWPOLYLINE serialization.
Installation
pip install cad-scale-dxf
Quick Start
from dxf_geometry import polyline_length, polygon_area, pixels_to_mm, simplify_rdp
wall = [(0, 0), (5000, 0), (5000, 4000), (0, 4000)]
print(polyline_length(wall, closed=True)) # 18000.0
print(polygon_area(wall)) # 20000000.0
print(pixels_to_mm(300, 300)) # 25.4
Online Reference
- Interactive image-to-CAD converter: ImgToCAD
- Sketch vectorization reference: Sketch to CAD
License
MIT License — see LICENSE.
Metadata
Release files for cad-scale-dxf 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cad_scale_dxf-0.1.0.tar.gz | 3.8 kB | Without provenance | Details for cad_scale_dxf-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cad_scale_dxf-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cad_scale_dxf-0.1.0-py3-none-any.whl |
Total release size: 7.9 kB
Release files / cad_scale_dxf-0.1.0.tar.gz
| Download URL | cad_scale_dxf-0.1.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49fa6549595c5aff2a65f9f85bbb7f22e5ac6cb75f40d3370d8aa74a51282eb9
|
|
BLAKE2b-256 checksum How to use checksums |
2fbf8e50f19fa9f1b523488e50d622ab11dbc4b153cf3f0f733a7c0207a0230d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / cad_scale_dxf-0.1.0-py3-none-any.whl
| Download URL | cad_scale_dxf-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bd9262b655dc6442efe6424bede34e66234810f0a765b63ded2e83f61613c23
|
|
BLAKE2b-256 checksum How to use checksums |
c8593eab65d84af2ca2b7dd7c3c5687636d70ea6819f818ef84f2ce3f0268fca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for cad-scale-dxf 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.