Questions tagged [ezdxf]

This tag should be used for questions concerning the ezdxf Python package, a library of functions which may be used to read & manipulate DXF files.

92 questions
0
votes
1 answer

Extracting entity geometry information in world coordinates

I'm looping through all entities in the modelspace and generating a representative set of points for each entity type and storing them in a json file. Some entities like INSERT entities have an object coordinate system different from the world…
0
votes
0 answers

ImportError with embedded python module when linked to larger shared library. undefined symbol: PyLong_AsLongLongAndOverflow

I wrote a C wrapper to access the ezdxf Python package from my C++ program using the embedded interpreter. When I compile the wrapper by itself it works as expected (loads the module below which loads a dxf file and prints the coordinates of all the…
0
votes
1 answer

INSERT Block and Dynamically used content access in DXF with ezdxf

I want to make a table in python like the COUNT LIST command used in the drawing. I'm pulling the number of blocks used in the drawing, but I can't pull the number of dynamic blocks. What I want to do is to count the dynamic and normal blocks I have…
0
votes
1 answer

Converting Text to DXF with Laser-Compatible Font (e.g., tl_lasersans) using ezdxf Library in Python

I'm working on a Python project where I need to convert text into DXF format, specifically to create laser-readable text for laser cutting applications. I would like to use the font tl_lasersans for this purpose. I'm currently using the ezdxf…
Mack2
  • 1
0
votes
0 answers

Displaying geographical coordinates from a dxf file on a device context

I'm trying to display rectangles from a dxf file on a device context using ezdxf and wxpython. But this is not displayed with correct scale and seems out of device area. class draw(wx.Window): def __init__(self, parent): …
0
votes
0 answers

Reading a dxf file using Streamlit

I'm trying to use Streamlit to create an app that reads a .dxf file using ezdxf modifies it and allows a the user to download the modified file. What I'm having trouble with is getting ezdxf to read the uploaded file. The error i'm getting from…
0
votes
0 answers

Extracting all block attributes with ezdxf

I want to extract all the block attributes and put them on a df. Some of the attributes are default, and some are custom attributes: Block attributes to extract import ezdxf as ez import pandas as pd doc = ez.readfile("data.dxf") # Get the…
Lucas Paiva
  • 5
  • 1
  • 4
0
votes
0 answers

Python ezdxf - Get outside dimensions and change orientation

I don't get the outer dimensions from the DXF. import ezdxf as ez import sys doc = ez.readfile("T12706456-0.dxf") msp = doc.modelspace() # helper function def print_entity(e): print("LINE on layer: %s\n" % e.dxf.layer) print("start point:…
DeskDoc
  • 11
  • 1
0
votes
1 answer

DXF acces points from a polyline (python)

I have a dxf files and I wan't to search points from a polyline in python. However, my files sections are differents than a dxf than I succeded to display points. I explain : In the dxf I succeded, polylines were in the ENTITITES section. So I do…
marie
  • 1
0
votes
0 answers

print layer and vertex of DXF file in python

I try to display layers (Sew Lines and Pattern Perimeter) from a dxf file. As a matter of fact, some points of these layers are exactly at the same place : so I wan't to remove some points of one of these layers. To do this I have to access layers,…
marie
  • 1
0
votes
1 answer

ezdxf "bulge" to ARC conversion

Here is the problem description: parse a dxf for all the available entity's (no issues here, straight forward with ezdxf) establish the envelope area and perimeter (done by math not via ezdxf) establish all the contained entities area and perimeter…
0
votes
0 answers

Creating a DXF polyline from a list of 3D coordinates

I'm trying to create a 3D polyline from a list of coordinates using EZDXF in Python. I modified this script and it works great. I can import it in Fusion and can see the points in 3D space. The thing is, I would like to make a polyline instead. I've…
Mugen
  • 21
  • 5
0
votes
0 answers

ezdxf - kernel crashed when saving as pdf

I am reading a dxf file using ezdxf in python, so that I can display the file and draw some additional lines on it and then export it as a pdf or png. However, the kernel keeps on crashing when I try to display my original file (around 150 MB) using…
0
votes
1 answer

I want to convert a geojson from dxf file and longitude, latitude. How can we do that?

I wrote a function that takes dxfgeometry and coordinate points and converts them to the geoJSON. But it was not showing the location which it was supposed to show. Can you provide me a way and mathematical calculations to create a geojson file?
0
votes
1 answer

Is it possible to fetch custom linetypes using ezdxf?

I would like to copy over these complex linetypes to a new DXF file. I can grab most of the information using doc = ezdxf.addons.odafc.readfile(filepath) for linetype in doc.linetypes: print(linetype.dxfattribs() This returns the dict including name…
postgrease
  • 11
  • 3