Dxf Export of Dimension

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Dxf Export of Dimension

Post by jaisejames »

For any dimension, we need to write block of every dimension shape [say lines, dimension value as text] in block section.

Then you have refer the block number in dimension entity details. This is required to open in directly autocad.

see dxf attached exported from freecad with above change.

This is just for information.
Attachments
dim.dxf
(2.92 KiB) Downloaded 87 times
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Dxf Export of Dimension

Post by wandererfan »

jaisejames wrote: Thu May 24, 2018 7:02 am For any dimension, we need to write block of every dimension shape [say lines, dimension value as text] in block section.

Then you have refer the block number in dimension entity details. This is required to open in directly autocad.
Thanks for the file. Back to the Dxf spec book. :(
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

Currently exported dxf from techdraw syntax error coming.

Pls note that Group code should be 3 digit. In case 2, it should be one space followed by code. In case one digit, it should be two space followed by code. See the below code for reference.

Code: Select all

100
AcDbDimension
  2
*DIMENSION
 10
0.446097594071
 20
-0.277299734401
 30
0.0
 11
-0.699780139756
 21
-0.274470368969
 31
0.0
 70
1
  3
 
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Dxf Export of Dimension

Post by wandererfan »

jaisejames wrote: Tue May 29, 2018 7:47 am Currently exported dxf from techdraw syntax error coming.
What version of dxf is your program (autocad?) trying to import? The library we are using for export seems to be making AC1009/R12. The thing about 3 positions for group codes is a "relatively recent" change.

What FreeCAD are you running? There have been a few changes to the Dxf export code in the last week. Maybe one of the changes has caused a regression?

LibreCAD seems quite happy importing as is and I don't have any other Dxf programs.
easyw-fc wrote: Are you still getting good results with Dxf export?
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Dxf Export of Dimension

Post by easyw-fc »

wandererfan wrote: Tue May 29, 2018 12:26 pm LibreCAD seems quite happy importing as is and I don't have any other Dxf programs.
easyw-fc wrote: Are you still getting good results with Dxf export?
if you re-export by LibreCAD the file as 'dxf R12' what you have produced as FX dxf, you get a messy dxf also if you reload it in librecad...
I think the header part or the quoting part is in some way wrong...
If you also re-import in FC a dxf generated by FC with dimensions you get an empty document (I'm testing with legacy importer)

My FC testing release:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13824 (Git)
Build type: Release
Branch: master
Hash: 73d597710fe15f1ee3453bf75c0f4f95c309764a
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

wandererfan wrote: Tue May 29, 2018 12:26 pm
jaisejames wrote: Tue May 29, 2018 7:47 am Currently exported dxf from techdraw syntax error coming.
What version of dxf is your program (autocad?) trying to import? The library we are using for export seems to be making AC1009/R12. The thing about 3 positions for group codes is a "relatively recent" change.

What FreeCAD are you running? There have been a few changes to the Dxf export code in the last week. Maybe one of the changes has caused a regression?

LibreCAD seems quite happy importing as is and I don't have any other Dxf programs.
easyw-fc wrote: Are you still getting good results with Dxf export?
First I tested LibreCad, But it is crashing

Version: 2.2.0-rc1
Compiler: GNU GCC 4.9.1
Compiled on: Feb 16 2018
Qt Version: 5.4.1
Boost Version: 1.53.0
System: Windows 7

Then I used Autocad true viewer 2019, it is opening as blank & some error message show.
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

One thing I noticed, In poly-line vertices numbers, it written strange value.[-1.#QNAN]

Code: Select all

100
AcDbPolyline
90
-1.#QNAN
Attachments
12.dxf
(6 KiB) Downloaded 55 times
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

We can a comment in file first like this for traceability.

Code: Select all

999
Drawing created by FreeCAD : 0.18.13824 (Git)
:)
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Dxf Export of Dimension

Post by wandererfan »

jaisejames wrote: Wed May 30, 2018 5:21 am

Code: Select all

100
AcDbPolyline
90
-1.#QNAN
NAN is c++ shorthand for "Not A Number". should never see this.

Any chance you can post your FCStd file and the list of error messages from the viewer?
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

See the attached file with vertex issue
Attachments
13.dxf
(6.65 KiB) Downloaded 61 times
techdraw dxf.FCStd
(21.83 KiB) Downloaded 54 times
Post Reply