Questions tagged [dxf]

DXF (Drawing Exchange Format) is a CAD data file developed by AutoDesk for interoperability between AutoCAD and other CAD applications.

320 questions
3
votes
4 answers

AutoCAD library in Java to read .dwg files?

Is there any open-source Java or JavaScript library available to parse .dwg files and get the objects from it. I would like to extract data from a table of text for my project. It seems that the AutoCAD developer community prefers .NET and C/C++…
user3336544
  • 211
  • 1
  • 4
  • 11
3
votes
1 answer

DXF image entity group code explanation

I'm working on a Delphi class to import/export some kind of entities from DXF file. I'd like add support for Image entity but I don't understand some group codes. I'm using official DXF guide reference (2002):…
Martin
  • 1,065
  • 1
  • 17
  • 36
3
votes
2 answers

arc transform start end point to start angle end angle

Given a description of an arc which has a startpoint and endpoint (both in Cartesian x,y coordinates), radius and direction (clockwise or counter-clockwise), I need to convert the arc to one with a start-angle, end-angle, center, and radius. Is…
dr jerry
  • 9,768
  • 24
  • 79
  • 122
3
votes
2 answers

dxf file parsing with dxfgrabber library in the python

I want to parse dxf file for obtain objects (line, point, text and so on) with dxfgrabber library. The code is as below #!/usr/bin/env python import dxfgrabber dxf = dxfgrabber.readfile("1.dxf") print ("DXF version :…
Danil Chernokalov
  • 755
  • 1
  • 10
  • 31
3
votes
3 answers

What is the reason to IllegalArgumentException: negative width in kabeja

Please can some one explain the reason for an IllegalArgumentException: negative width exception being thrown when using Kabeja package? This is the error stack that I got: java.lang.IllegalArgumentException: negative width at…
LkDev
  • 221
  • 3
  • 9
2
votes
3 answers

Writing to dxf or dwg format?

I have the X and Y values for a curve in C# and I want them to be drawn in a dxf or dwg file format using the same C# project. Is there a way to do that? Thank you.
gmk
  • 47
  • 1
  • 6
2
votes
1 answer

DXF files - How does the normal vector and position relative to this provide full understanding of block position

I have been scratching my head for days understanding how to fully describe a block to insert in DXF. For background I am interested in the rules and behaviour of how to do this, not simply trying to find an existing library. I can create a block…
samp17
  • 547
  • 1
  • 4
  • 16
2
votes
2 answers

Get circles x and y center

My target is to get all circles from dxf file with 3 information like: circumference, X center, Y center. So far i am able to get circumference. How can i get Y & X? This is my current code: import sys import ezdxf doc =…
Arie
  • 3,041
  • 7
  • 32
  • 63
2
votes
1 answer

Double values comparison w/ tolerance for "point" equality in a DXF drawing

I have a simple algorithm that fails sometimes because it is comparing doubles. I look at a DXF drawing and get all the line segments, and also break it down into a series of points. When looping through all the points to identify if it forms a…
fr332lanc3
  • 151
  • 1
  • 11
2
votes
1 answer

How to format an array of coordinates to a different reference point

I looked around and I couldn't find any info on the topic... probably because I can't iterate my problem accurately into a search engine. I'm trying to take raw line data from a dxf, sort it into squares, find the center of each square, number the…
PaulyP
  • 165
  • 10
2
votes
1 answer

ezdxf python mtext set location

I have some simple text I want to place in my dxf, like this: mtext = msp.add_mtext("TEXT TEST", dxfattribs={'style': 'OpenSans'}) I want to insert this text in x=1 and y=1 location in my dxf. This is what i tried: mtext.dxf.insert([1,1,0]) But I…
user2727167
  • 428
  • 1
  • 3
  • 16
2
votes
1 answer

How do I return the string within 'MTEXT' with ezdxf?

I am using the below code to return a string from all TEXT items within a .dxf for i in m_space.query('TEXT'): return(str(i.dxf.text)) This is working well so I would like to do the same for all MTEXT items. From reading the docs I have…
ajcnzd
  • 53
  • 4
2
votes
0 answers

pstoedit gives different result while converting eps to dxf using "dxf" and "dxf_14"

I am using pstoedit as a part of a shell script to convert svg to dxf. When I use pstoedit -psarg '-dNOSAFER' -dt -f 'dxf: -mm' "${epsfile}" "${dxffile}" in script, the result is like the picture below. But when i use pstoedit -psarg '-dNOSAFER'…
vfsoraki
  • 2,186
  • 1
  • 20
  • 45
2
votes
2 answers

Python module to merge DXF files

I am looking for a python module that will merge dxf files. I have found dxfgrabber and ezdxf, however they seem to be used for different applications then what I am after. I am using ExpressPCB, which outputs each layer of the PCB, the holes, and…
paperstsoap
  • 335
  • 4
  • 13
2
votes
1 answer

How to edit AutoCAD Layer Description using ezdxf

I want to know how to edit AutoCAD's Layer Description property. I have referenced the ezdxf documentation but I do not know how. Please tell me an example of how to use it.
leez
  • 85
  • 8
1 2
3
21 22