Metadata-Version: 2.4
Name: dxfgeometry
Version: 0.1.3
Summary: A tool for reading dxf files and parsing all primitives by layer classification
Project-URL: Homepage, https://github.com/ChunnTsang/dxfgeometry
Project-URL: Repository, https://github.com/ChunnTsang/dxfgeometry
Project-URL: Bug Tracker, https://github.com/ChunnTsang/dxfgeometry/issues
Author-email: Chun Tsang <zjun5566@163.com>
License: MIT
License-File: LICENSE
Keywords: architecture,bim,cad,dxf,geometry,gis
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: ezdxf<2.0.0,>=1.2.0
Requires-Dist: shapely<3.0.0,>=2.0.4
Description-Content-Type: text/markdown

# dxfgeometry

[![PyPI - Version](https://img.shields.io/badge/Pypi-v0.1.3-blue)](https://pypi.org/project/dxfgeometry/)
[![PyPI - Python Version](https://img.shields.io/badge/Python-3.10-blue)](https://pypi.org/project/dxfgeometry/)

**dxfgeometry** is a Python library for converting graphic data from `.dxf` CAD files into standard geometric data structures (such as polygons, lines, circles, etc.).

It traverses all layers in a CAD file and returns the results organized by "File → Layers → Data".

## Features

-  Parse DXF files and extract geometric primitives
-  Layer-based organization of geometric data
-  Convert CAD entities to Shapely geometries
-  Export all geometric elements to JSON format
-  Support for various primitive types (polygons, lines, circles, arcs, etc.)
-  Reload previously saved JSON files for further processing
-  Designed for architectural and BIM applications

## Installation
```bash
pip install dxfgeometry
```

## Quick Start
```python
from dxfgeometry.parser import read_dxf_to_geometry

# Read DXF file
result = read_dxf_to_geometry('your_file.dxf')

# Access data by layer
for layer_name, layer_data in result.get_layers():
    print(f"Layer: {layer_name}")
    print(f"Geometric set: {layer_data}")
```

## Requirements

- Python >= 3.10
- ezdxf >= 1.2.0
- shapely >= 2.0.4

## Examples

See the [examples/](examples/) directory for more usage examples.

## License

MIT License - see [LICENSE](LICENSE) file for details.
