From 098ae387f9748bc1453af6f4967ba9e1c254099a Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Tue, 13 Feb 2018 17:15:13 +1100 Subject: [PATCH] Prepare 0.2.0 release --- README.md | 32 ++++++++++++++++++++++++++++++-- scripts/dxf_to_csv.py | 2 +- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8ea2c98..7de0f1f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,35 @@ # dxf-to-csv # -dxf-to-csv is a tool to extract coordinates from CAD drawings. +__dxf-to-csv__ is a tool to extract coordinates from CAD drawings. -AutoCAD offers the `LIST` command, which shows the geometry of selected objects, but this approach is no practical when dealing with a large number of objects. +AutoCAD offers the `LIST` command, which shows the geometry of selected objects, but this approach is not practical when dealing with a large number of objects. ![AutoCAD list command](doc/autocad-list.png) + +## Installation ## + +`pip install dxfgrabber` + +## Usage ## + +Show available layers: + +`python dxf_to_csv.py drawing.dxf -l` + +Convert all layers: + +`python dxf_to_csv.py drawing.dxf` + +Convert specific layer: + +`python dxf_to_csv.py drawing.dxf -n LAYER_NAME` + +## Output ## + +`drawing.csv` + +| layer | type | id | x | y | z | +| ----- | :--------- | ---: | ------: | ------: | -: | +| MAP | LWPOLYLINE | 9896 | 202.568 | -41.517 | 0 | +| MAP | LWPOLYLINE | 9896 | 206.053 | -40.062 | 0 | +| MAP | LWPOLYLINE | 9896 | 207.450 | -36.796 | 0 | diff --git a/scripts/dxf_to_csv.py b/scripts/dxf_to_csv.py index 86294d5..109f7ae 100644 --- a/scripts/dxf_to_csv.py +++ b/scripts/dxf_to_csv.py @@ -9,7 +9,7 @@ Example: """ __author__ = "D. Howe" -__version__ = "0.1.0" +__version__ = "0.2.0" __email__ = "d.howe@wrl.unsw.edu.au" import os