idf importing error

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!
fiffo
Posts: 42
Joined: Wed Oct 18, 2017 8:57 am

idf importing error

Postby fiffo » Thu Dec 06, 2018 3:25 pm

Hi,
can you help me to understand why there are errors when I tray to import this idf files.
Thanks a lot

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15321 (Git)
Build type: Release
Branch: master
Hash: ef002fdde2f2626c3fd04afea3d54e145d4ecdb0
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)
Attachments
idf.zip
(1 KiB) Downloaded 17 times
openBrain
Posts: 2414
Joined: Fri Nov 09, 2018 5:38 pm

Re: idf importing error

Postby openBrain » Thu Dec 06, 2018 7:23 pm

Hi,

Nothing sure but here some assumptions that you may try.
About FreeCAD
* Try generating your IDF file in mm (millimeters) units => it may be more "natural" for FreeCAD to work with
* Try generating your IDF in a V2 format => yours is a V3 and I don't know whether FreeCAD handles it correctly or not
Some inconsistencies in your file also :
* There are a lot of placement outlines and placement regions, but they all are outside the board outline (which is a non sense)
* Your software isn't really compliant with IDF standard as it precedes coordinates with a '0', which means coordinates are in a counter-clockwise direction, but coordinates are actually stored in the clockwise direction

BR
User avatar
easyw-fc
Posts: 2692
Joined: Thu Jul 09, 2015 9:34 am

Re: idf importing error

Postby easyw-fc » Thu Dec 06, 2018 8:04 pm

fiffo wrote:
Thu Dec 06, 2018 3:25 pm
Hi,
can you help me to understand why there are errors when I tray to import this idf files.
Thanks a lot
if you enable Report view you should see:
<class 'Part.OCCError'>: Both points are equal
fiffo
Posts: 42
Joined: Wed Oct 18, 2017 8:57 am

Re: idf importing error

Postby fiffo » Fri Dec 07, 2018 11:01 am

Hi,
I was read the report "<class 'Part.OCCError'>: Both points are equal" but I don't understand where is the problem.
Sorry
User avatar
easyw-fc
Posts: 2692
Joined: Thu Jul 09, 2015 9:34 am

Re: idf importing error

Postby easyw-fc » Fri Dec 07, 2018 11:24 am

You have a segment of your pcb with almost zero length
fiffo
Posts: 42
Joined: Wed Oct 18, 2017 8:57 am

Re: idf importing error

Postby fiffo » Fri Dec 07, 2018 1:05 pm

This is the original file on Altium 18.1.9 ( I can convert if need).
Can somebody can help me to understand where it is the problem?
thanks a lot
Attachments
altium idf error.zip
(666.81 KiB) Downloaded 13 times
openBrain
Posts: 2414
Joined: Fri Nov 09, 2018 5:38 pm

Re: idf importing error

Postby openBrain » Fri Dec 07, 2018 1:11 pm

fiffo wrote:
Fri Dec 07, 2018 1:05 pm
This is the original file on Altium 18.1.9 ( I can convert if need).
Can somebody can help me to understand where it is the problem?
thanks a lot
Caught it ! I targeted the EMP file as the EMN one was opening correctly.
Indeed in the diode package shaping, there are 2 identical points (line 10 & 11, see below) :
same_points.png
same_points.png (10.55 KiB) Viewed 306 times
I deleted one of the 2 lines and everything goes fine.
However I can't tell if the issues originated from a wrong part package definition or from a bug in the ECAD software.

BR
fiffo
Posts: 42
Joined: Wed Oct 18, 2017 8:57 am

Re: idf importing error

Postby fiffo » Fri Dec 07, 2018 1:21 pm

fantastic.
in the last file upload there are not components but I have same problem: I tested this idf file with Mentor Pads LAyout and idf imported work well.
Attachments
errorCapture.JPG
errorCapture.JPG (20.09 KiB) Viewed 303 times
User avatar
easyw-fc
Posts: 2692
Joined: Thu Jul 09, 2015 9:34 am

Re: idf importing error

Postby easyw-fc » Fri Dec 07, 2018 2:22 pm

fiffo wrote:
Fri Dec 07, 2018 1:21 pm
fantastic.
in the last file upload there are not components but I have same problem: I tested this idf file with Mentor Pads LAyout and idf imported work well.
in your altium file you have doubled the outline edge (you have drawn the edge twice on the same outline)
openBrain
Posts: 2414
Joined: Fri Nov 09, 2018 5:38 pm

Re: idf importing error

Postby openBrain » Fri Dec 07, 2018 2:37 pm

fiffo wrote:
Fri Dec 07, 2018 1:21 pm
fantastic.
in the last file upload there are not components but I have same problem: I tested this idf file with Mentor Pads LAyout and idf imported work well.
Indeed there is a similar issue now in your EMN file :
same_points2.png
same_points2.png (11.87 KiB) Viewed 291 times
This is due to the way your ECAD software exports the 2 successive arcs of the board outline.
It seems correct from a geometrical POV but breaks FreeCAD as it uses several times the same point.
I don't know if it is a (wrong) FreeCAD limitation or an uncompliance to IDF format from your ECAD.

Notice you can easily find the coordinate duplicates with following command line (using GoW or busybox while you're in Windows) :

Code: Select all

cut -d " " -f 2-3 YOUR_FILE | uniq -d
BR