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!
jmsuomal
Posts: 7
Joined: Tue Dec 17, 2013 9:21 am

Bug report - problems in dxf export

Post by jmsuomal »

First I want to thank all you developers for creating a great free CAD software. Good job.

I used FreeCAD to design a frame for holding two cameras. The material for the frame is going to be carbon fiber sheets so I basically needed to output 2D drawings so that the CNC machine operator can cut the parts for me. The operator requested me to provide the part models as DXF files.

The design phase went basically without any major problems. So I had a beautiful 3D model rotating on my screen. Now I just needed to export it in a format that the machinist needed, but when I tried to export the model as DXF I ran into problems! The DXF do not come out correctly. Here is an DXF export of a Part>cross-section object:
Screenshot showing the DXF error
Screenshot showing the DXF error
DXF problem.jpg (47.32 KiB) Viewed 5076 times
As you can see the all the circular parts come out incorrectly! The rounded corners are cut with a line. Circular holes are drawn as lines or not at all. It could be something related with the circles being rotated wrongly in 3D and they end up being pointing up from the screen(???) and thus showing only as lines?

And its not only a problem with IrfanView showing it wrong but the errors come with other programs also. The export did not work any better from the original 3D object. Also export to SVG(flattened) did not work any better.

I appreciate a lot what you have created so far. It is impressive already as it is but I think this really needs to still fixed before I can recommend the software for anyone. This is kinda critical showstopper bug in the program and I would think that it would need urgent fixing.
User avatar
yorik
Founder
Posts: 13663
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Bug report - problems in dxf export

Post by yorik »

You know, freecad is still ALPHA, you shouldn't expect everything to always work perfectly, right out-of-the-box...
That said, there can be a lot of reasons why this operation fails, but there are several workaround possible. Probably the way you modeled your piece resulted into some kinds of edges that the dxf exporter is unable to recognize, which happens quite often with opencascade.

The dxf exporter had been made primarily to work with horizontal, 2D shapes. It always behaves better in that case. So I would try first to use the Draft->Shape2DView tool, to project a flat 2D view of your piece on the XY plane. Then try exporting that 2D view to dxf instead of the original piece. If it still doesn't work, try exploding (Draft->Downgrade) that view into single edges.

Another possibility is to use the Drawing module to output an SVG view of your piece, then convert the svg to dxf, with inkscape for example.

If none of this works, maybe share you piece here so we can have a look...
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug report - problems in dxf export

Post by jmaustpc »

before we say anything ...tell us what version of FreeCAD you have! And what o/s etc.

please post your about FreeCAD data,

This is quite probably works, once you know how.

It would almost certainly help if you could also post your fcstd file so we can work out what is happening.


DXF in FreeCAD does have its limitations, but come back with what I have asked for and its quite likely that we can get it to work one way or another. :)

Jim

edit: - Yorik posted at the same time as I
jmsuomal
Posts: 7
Joined: Tue Dec 17, 2013 9:21 am

Re: Bug report - problems in dxf export

Post by jmsuomal »

Thanks for the prompt replies.

No need to be defensive. I understand this is still alpha and thus I am not complaining about a couple of crashes and many illogical things I experienced while learning to use the software. I am grateful all the effort you have done for developing such free software and by reporting the problem I just wanted to help you out to make it better.

And thanks to yorik we have now a working solution! Using Draft->Shape2DView tool and exporting that object did the trick! Now I get the shape out correctly!

Once again an expert user was able to solve in a second a problem a novice had to fight for hours. With so many tools around I never noticed that there was such a tool, but I was using the Part->Cross section tool to do almost the same thing. If I experienced the problem now, I am pretty sure in future someone else will also hit his head to the wall with it also. Thus some sort of fix would be a good to add.

If the DXF export does not work properly with 3D objects maybe selecting the export should automatically first flatten the object and write it only after that as DXF - or alternatively it should just refuse to write a 3D object at all and prompt the user to export only 2D objects.

If someone is still interested looking deeper at the export problem, please find attached my DCStd file. And I am using the version 0.13 (1828) on Windows 7 64bit.

Many thanks.
Attachments
DualCameraFrame.FCStd
FCStd file
(313.29 KiB) Downloaded 120 times
jmsuomal
Posts: 7
Joined: Tue Dec 17, 2013 9:21 am

Re: Bug report - problems in dxf export

Post by jmsuomal »

I was a little bit hasty about finding the fix. The Draft->Shape2DView solved some of the problems but not all of them!

With that method all the circular shaped holes that I carved with method:
(1) create sketch on the face and
(2) cut if thru with Part Design -> Create Pocket

...work ok. However the circular holes created with "Part->Make cut of two shapes" come out just as wrong as earlier.

Also as a new error now the external bottom left corners get their rounding carved wrongly. For some reason I dont seem to be able to attach me screenshot....
jmsuomal
Posts: 7
Joined: Tue Dec 17, 2013 9:21 am

Re: Bug report - problems in dxf export

Post by jmsuomal »

The forum is complaining "The uploaded file is empty". Its not...
jmsuomal
Posts: 7
Joined: Tue Dec 17, 2013 9:21 am

Re: Bug report - problems in dxf export

Post by jmsuomal »

Now the forum is complaining "It was not possible to determine the dimensions of the image." for the same jpg file that earlier was supposed to be empty.
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 »

Possible fix in page 2: viewtopic.php?f=3&t=4285
jmsuomal
Posts: 7
Joined: Tue Dec 17, 2013 9:21 am

Re: Bug report - problems in dxf export

Post by jmsuomal »

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.
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 have been trying to reply but the forum is having problems tonight.
Post Reply