Skip to main content

Convert DXF entities created by ezdxf to shapely geomerty objects.

Project description

EZDXF to Shapely Converter

Convert geometric entities loaded vom DXF files using ezdxf to shapely geometry objects.

First use ezdxf to load the DXF entities from file and filter them using query or similar.

import ezdxf

dxf_doc = ezdxf.readfile("your_file.dxf")
entities = dxf_doc.modelspace().query("*[layer==0]")

Then use ezdxf-shapely to convert the entities and refine the results.

import ezdxf_shapely

geoms = ezdxf_shapely.convert_all(entities)
polygons = ezdxf_shapely.polygonize(geoms) # optionally merge lines to polygons

License

Licensed under the terms of the MIT License

Acknowledgements

This is a fork of cad-to-shapely with some simplifications and the provision of more control over the import process to the user.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ezdxf_shapely-1.0.tar.gz (241.0 kB view details)

Uploaded Source

Built Distribution

ezdxf_shapely-1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file ezdxf_shapely-1.0.tar.gz.

File metadata

  • Download URL: ezdxf_shapely-1.0.tar.gz
  • Upload date:
  • Size: 241.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for ezdxf_shapely-1.0.tar.gz
Algorithm Hash digest
SHA256 7625ec848f6601cd74c9913bbe7d4038bd70d2e0aeb93750d0849aead9ff19d1
MD5 b053cb7510b4c98e1b5074a18d9de3f6
BLAKE2b-256 e5494b4424a61dad10a0ebab77b518bf7ac84384b04181126fbd700d123c623f

See more details on using hashes here.

File details

Details for the file ezdxf_shapely-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ezdxf_shapely-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cba440275805911b38eadd7256f2e0c5c8d8ce0beda55f3921c5ee705332ed6
MD5 1dec941a97ae66d9dae575c8c672624f
BLAKE2b-256 5db9ceab4fb83cace44a2417cfd06091116c947ae84b4b49ff29e28bc008a081

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page