Dxf Export of Dimension

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
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: Fri Jun 08, 2018 11:58 am This is with dimension. Please compare code difference [ignore position value diff]
Some extra code 71 not required & some forgot to insert code 70.

Some dim arrow is flipped in export see screenshot.
Try this one. It looks ok in Draftsight.
Attachments
dimCompatTest.dxf
(74.1 KiB) Downloaded 46 times
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

wandererfan wrote: Sat Jun 09, 2018 5:05 pm
jaisejames wrote: Fri Jun 08, 2018 11:35 am I have made some modification in dxf and now directly opening autocad.

Could you please compare two[original & modified dxf files] & insert those changes. Change are in $DWGCODEPAGE[removed], VPORT[some code removed] & DIMSTYLE[added some code]. No Other changes.
Please try the attached file for ACAD compatibility. Thanks.
working perfectly. :)
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

wandererfan wrote: Sun Jun 10, 2018 12:17 am
jaisejames wrote: Fri Jun 08, 2018 11:58 am This is with dimension. Please compare code difference [ignore position value diff]
Some extra code 71 not required & some forgot to insert code 70.

Some dim arrow is flipped in export see screenshot.
Try this one. It looks ok in Draftsight.
code 71 not required. [see attached file for comparison]

diameter, radius text position is not correct [see screenshot].
Attachments
autocad_view_dim2.jpg
autocad_view_dim2.jpg (15.88 KiB) Viewed 1461 times
dimCompatTest_modified.dxf
(74.08 KiB) Downloaded 42 times
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

One suggestion, we will make each view a block with actual size & then scale it on block insertion.

So somebody require actual one, just insert block.
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: Mon Jun 11, 2018 5:38 am code 71 not required. [see attached file for comparison]

diameter, radius text position is not correct [see screenshot].
getting closer. code 71 on Dims is from later version of Dxf, will remove.

Not sure why text pos is wrong. Looks like same code as linear/angular.
jaisejames wrote: One suggestion, we will make each view a block with actual size & then scale it on block insertion.

So somebody require actual one, just insert block.
Not sure what this means, actually. My dxf knowledge is just what I've picked up fixing the existing code. Can you post a sample?

Thanks for testing.
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

I just exported one cube to dxf with 3 views. see attached file from our legacy exporter as block [shape2d to block].
I just modified first inserted view with 41 & 42 to scale the block in x & y

Code: Select all

INSERT    66 (Attributes follow flag -optional 0), 2 (Block name), 
          10, 20, 30 (insertion point), 41 (X- scale factor 
          -optional 1), 42 (Y scale factor -optional 1), 43 (Z- 
          scale factor -optional 1), 50 (rotation angle -optional 
          0), 70 and 71 (column and row counts -optional 1), 44 and 
          45 (column and row spacing -optional 0).
Attachments
12.dxf
(2.47 KiB) Downloaded 38 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: Mon Jun 11, 2018 5:38 am diameter, radius text position is not correct [see screenshot].
Please check this file for diameter/radius text position. Thanks.
Attachments
dimCompatTestDiaRad.dxf
(75.13 KiB) Downloaded 45 times
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

See attached freecad file. If techdraw page dxf exported, position of one view changes.
Attachments
11.png
11.png (16.49 KiB) Viewed 1398 times
boolean.FCStd
(385.73 KiB) Downloaded 42 times
jaisejames
Posts: 384
Joined: Sat Sep 24, 2016 6:51 am

Re: Dxf Export of Dimension

Post by jaisejames »

wandererfan wrote: Tue Jun 12, 2018 12:21 pm
jaisejames wrote: Mon Jun 11, 2018 5:38 am diameter, radius text position is not correct [see screenshot].
Please check this file for diameter/radius text position. Thanks.
Everything OK. see attached screenshot. But diameter symbol is showing some strange values & angle arrow both in one side.
Attachments
dim2.png
dim2.png (32.74 KiB) Viewed 1396 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: Tue Jun 12, 2018 12:50 pm Everything OK. see attached screenshot. But diameter symbol is showing some strange values & angle arrow both in one side.
Is your "Diameter symbol" in Preferences set to a unicode character? Dxf R12 only understands ASCII (and somethings called MIF and CIF). If you change your preference to "%%c" it will show as Ø in Draftsight and probably ACAD - but it will show as "%%c" in FC.

The arrow problem is a 1 character typo in the source. :oops:
Post Reply