Bug report - problems in dxf export

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug report - problems in dxf export

Post by jmaustpc »

It works in FreeCAD 0.14dev
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug report - problems in dxf export

Post by jmaustpc »

It works in FreeCAD 0.14dev
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug report - problems in dxf export

Post by jmaustpc »

works in 0.14dev version of FreeCAD
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug report - problems in dxf export

Post by jmaustpc »

jmsuomal wrote:
normandc wrote:Possible fix in page 2: viewtopic.php?f=3&t=4285
Did you mean:
"Edit -> Preferences -> Draft -> Import/Export -> Max Spline Segment was set at 5; increasing the numerical value of the setting solved the problem!"

Setting the Max Spline Segment to 10 or 99 - did not change anything.

Attaching a jpg to my post still does not work. Not even the same jpg as I was earlier able to upload.
works in 0.14dev version of FreeCAD
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug report - problems in dxf export

Post by jmaustpc »

works in freecad 0.14dev but not 0.13
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug report - problems in dxf export

Post by jmaustpc »

works in freecad 0.14dev but not 0.13
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug report - problems in dxf export

Post by jmaustpc »

It works in 0.14dev versions but not 0.13.

Upgrade FreeCAD and you will be able to get it to work.

Here is part of your camera frame in DXF
cameraframe1.dxf.zip
(968 Bytes) Downloaded 47 times
You will have to unzip it.

Jim
jmsuomal
Posts: 7
Joined: Tue Dec 17, 2013 9:21 am

Re: Bug report - problems in dxf export

Post by jmsuomal »

Thanks Jim, but does that zipped file really look good on your screen? And if it does, what viewer are you using to look it? I am looking it with irfanview and this file you attached looks just as faulty as anything I have exported. Is it just IrfanView that is showing it somehow wrong? On the otherhand the CNC machinist also said the DXFs that looked my screen like that di not come thru correctly.

This is how your DXF looks on my screen:
irfanview interpretation of the file Jim sent
irfanview interpretation of the file Jim sent
cameraframe1_IrfanView_DXF2JPG.jpg (48.43 KiB) Viewed 2205 times
The rouded corners still show as sharp cut edges and the circular holes are replaced with straight lines.

I am also a little sceptical, how increasing the Max Spline Segment number could help here. On my DXFs there are no splines at all. Just straight lines, circles and arches.


Secondly, I checked the dxf exports I produced with the Draft->Shape2DView method. Here's the comparison of that output:
pic showing the problem
pic showing the problem
DXF problem2.jpg (74.97 KiB) Viewed 2205 times
You can see that this is already closer to correct but there are problems with two cases:
(1) circular holes that i have cut with Part Design->Cut method come wrong (on top right and top middle parts)
(2) the fillets on random corners go wrong (on top and bottom right parts).

When I opened the faulty files with notepad I was able to locate whats the the problem there. The DXF ARC command has the start and end angles switched! The problematic corner in top right object there for example is written in DXF like this:

ARC
8
0
62
0
10
-182.749189377
20
-15.0478136539
30
0.0
40
5.0
50
-90.0 <<< this and
51
180.0 <<< this are wrong way around
0


If they are manually switched then that shape comes out correctly. It was also the same problem with the circular holes of the top middle object. In there the circle is for some reason formed with two arches of which one is similarly wrong as the fillet above. By doing these manual fixes I was able to produce good enough export files for my need now. Thanks for helping me out to get this far.

Jim, the file you had on your post is not using arc or circle commands but polylines. Thus the same manual fix is not working there. I think you produced that one directly from the 3D object without flattening it first. If someone can (1) locate and fix the arc start and end angle switching problem and (2) include automatic Draft->Shape2DView step in the DXF export, I think it would produce always perfect DXFs.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug report - problems in dxf export

Post by jmaustpc »

I don't think infranview is a good choice to view dxf files....but I could be wrong.

I used LibreCAD, in which it looks OK ..... as far as I can see.

DXF is a crap format...deliberately stuffed by Auto CAD who don't want interoperability. A lot of people say dxf without realising that there are many different versions of DXF, most opensource applications work on very old versions, so dxf is always going to be problematic/limited.

Is there any chance the your supplier can use a different format? Probably not but you could ask.

Are you using a version of Windows?
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Bug report - problems in dxf export

Post by NormandC »

The reverted arcs are corrected by the fix I linked! Nevermind that it's called splines. Have you upgraded FreeCAD to the latest unstable version available? It will help.

And seriously, IrfanView is a terrific freeware, but it's a raster image viewer, not a proper CAD program! :roll:
Post Reply