DXF export has flipped arc's even with recent PPA

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
jpieper
Posts: 9
Joined: Sat Jun 06, 2015 6:49 pm

DXF export has flipped arc's even with recent PPA

Postby jpieper » Sat Jun 06, 2015 7:00 pm

I have a sheet metal part, that when exported to DXF, has a random subset of 180 degree circular arcs flipped. I've found a number of references to this problem in the past, each of which has had some kind of fix applied. I don't know if this is exactly a regression or some new problem. The dxf stuff is set to auto-download in the Draft preferences, and has a timestamp of today, 2015-06-06, in my .FreeCAD directory.

Am I doing something wrong, or is there a workaround I can use?
freecad_view.png
freecad_view.png (135.29 KiB) Viewed 1350 times
librecad_dxf_view.png
librecad_dxf_view.png (83.82 KiB) Viewed 1350 times
Previous bugs describing a seemingly identical issue all of which are documented as being fixed.
* http://www.freecadweb.org/tracker/view.php?id=1653
* http://www.freecadweb.org/tracker/view.php?id=1590
* http://www.freecadweb.org/tracker/view.php?id=1513

OS: Ubuntu 14.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.4928 (Git)
Branch: master
Hash: d8f63bcfd10301f3d1e141cced4370f0782238d0
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
gimbal_bracket.dxf
(7.67 KiB) Downloaded 18 times
gimbal_bracket.fcstd
(141.85 KiB) Downloaded 16 times
triplus
Posts: 8835
Joined: Mon Dec 12, 2011 4:45 pm

Re: DXF export has flipped arc's even with recent PPA

Postby triplus » Sat Jun 06, 2015 9:53 pm

As for fixing this probably Yorik will take a look. As for workaround you can still use workaround i mentioned in issue report.
  • Select Shape2DView object in Tree View and use Draft Downgrade tool on it.
  • Select all edges and use Draft Convert to Sketch tool.
  • Part Design -> Part Design -> Merge sketches tool
Try to export that crated sketch to DXF. Probably 4 horizontal lines should be removed first for DXF export and 4 vertical ones will need to be repaired as it looks like are lost at conversion.
User avatar
yorik
Site Admin
Posts: 11613
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: DXF export has flipped arc's even with recent PPA

Postby yorik » Sun Jun 07, 2015 8:37 pm

This is a recurrent problem... Fir some reason I never manage to fix it completely...
Another workaround is to separate everything into single edges with the Draft Downgrade tool.
triplus
Posts: 8835
Joined: Mon Dec 12, 2011 4:45 pm

Re: DXF export has flipped arc's even with recent PPA

Postby triplus » Sun Jun 07, 2015 8:47 pm

yorik wrote:This is a recurrent problem... Fir some reason I never manage to fix it completely...
Another workaround is to separate everything into single edges with the Draft Downgrade tool.
Sometimes this does work but often the conversion to sketcher geometry fixes it. For example only using Draft Downgrade tool on Shape2DView object won't fix the issue in attached file. I was thinking what could be that difference involved that would affect DXF library in a way it flips Draft Arc in one direction and then again the same converted Draft Arc to Sketcher geometry in the other direction? Is there any additional check involved or what could be the cause? Does sketcher geometry (arc) have any additional info DXF library (or something else affecting DXF library) does use? I am not sure sketcher is "perfect" as in the past if i remember correctly i did get flipped arcs (sketcher geometry) but usually this is how i "workaround" the issue. Or is this more or less a question of "luck" and sometimes one method works and then again the other one?
cox
Posts: 963
Joined: Wed Nov 26, 2014 11:37 pm

Re: DXF export has flipped arc's even with recent PPA

Postby cox » Mon Jun 08, 2015 6:50 am

I know the path module is not ready for testing, but might this shed som light on some common library having a problem.

Flipping seams random and resizing the pocket has in many occasions flipped the circles the correct way
flipp.png
flipp.png (69.54 KiB) Viewed 1288 times
OS: "Arch Linux"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5465 (Git)
Build type: Unknown
Branch: makepkg
Hash: 347fe6217111569866fd83a4796d3d65e4e75dfe
Python version: 2.7.10
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.9.0
Need help? Feel free to ask, but please read the guidelines first
User avatar
yorik
Site Admin
Posts: 11613
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: DXF export has flipped arc's even with recent PPA

Postby yorik » Tue Jun 09, 2015 3:49 pm

oh no, inverted arcs in Path too!!!! :cry:
User avatar
f3nix
Posts: 313
Joined: Sat May 30, 2015 11:58 am

Re: DXF export has flipped arc's even with recent PPA

Postby f3nix » Wed Jun 10, 2015 5:36 pm

Hi!

I'm having the same problem:
FreeCAD_0.16.png
FreeCAD_0.16.png (121.46 KiB) Viewed 1225 times
OS: Debian GNU/Linux 8.1 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5070 (Git)
Build type: Unknown
Branch: master
Hash: 418cefd7ee4d02d584c5a871f07104683606787b
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.9.0

Cheers,
Mateusz
Attachments
frame-xz.FCStd
(113.35 KiB) Downloaded 12 times
ickby
Posts: 2933
Joined: Wed Oct 05, 2011 7:36 am

Re: DXF export has flipped arc's even with recent PPA

Postby ickby » Wed Jun 10, 2015 7:03 pm

Yorik, is there somewhere a collection of all files which have shown this inverted arc problem?
cox
Posts: 963
Joined: Wed Nov 26, 2014 11:37 pm

Re: DXF export has flipped arc's even with recent PPA

Postby cox » Wed Jun 10, 2015 7:35 pm

Just a thought, could this be a variable type (signed / unsigned) problem.

Looks like there could be a 50-50 chance of having the arcs invert
Need help? Feel free to ask, but please read the guidelines first
User avatar
f3nix
Posts: 313
Joined: Sat May 30, 2015 11:58 am

Re: DXF export has flipped arc's even with recent PPA

Postby f3nix » Wed Jun 10, 2015 8:12 pm

I've tested the export in:

OS: Debian GNU/Linux 8.1 (jessie)
Word size: 64-bit
Version: 0.14.3702 (Git)
Branch: releases/FreeCAD-0-14
Hash: b3368125c63289ec8ce9faec2b2ae4c78d436406
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.0

And the arcs are ok.
FreeCAD_0.14.png
FreeCAD_0.14.png (98.85 KiB) Viewed 1204 times
Cheers,
Mateusz