wire-frame only parts after idf import
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
wire-frame only parts after idf import
Hi all,
I have a problem with idf import (my be a driver error, but as I'm new to freecad ...)
The problem is, that the part on the pcb I'm inporting are wire-frame only.
The idf file is generated from cadsoft eagle using the generate_3d_dat.ulp version 0.91.
Any hints how to resolve this?
--
Lorenz
I have a problem with idf import (my be a driver error, but as I'm new to freecad ...)
The problem is, that the part on the pcb I'm inporting are wire-frame only.
The idf file is generated from cadsoft eagle using the generate_3d_dat.ulp version 0.91.
Any hints how to resolve this?
--
Lorenz
Last edited by lorenznl on Wed Feb 19, 2014 4:33 pm, edited 1 time in total.
Re: wire-frame only parts ofter idf import
Hi Lorenz
Welcome here.
Please read the first topic at the top of the help forum, READ FIRST BEFORE ASKING FOR HELP!!! .
Specifically it might help if you post you FreeCAD help about data, perhaps some files for example a fcstd file, that demonstrates the issue.
Jim
Welcome here.
Please read the first topic at the top of the help forum, READ FIRST BEFORE ASKING FOR HELP!!! .
Specifically it might help if you post you FreeCAD help about data, perhaps some files for example a fcstd file, that demonstrates the issue.
Jim
Re: wire-frame only parts ofter idf import
Ah, well ...
OS: Windows 7
Platform: 64-bit
Version: 0.14.2778 (Git)
Branch: master
Hash: 0506a918b24e015ac6277a7cf613ce151e1dee44
Python version: 2.6.4
Qt version: 4.5.3
Coin version: 2.4.5a
SoQt version: 1.4.1
OCC version: 6.3.0
attached are the idf fileset and the result produced by importing it as FCStd file
--
Lorenz
OS: Windows 7
Platform: 64-bit
Version: 0.14.2778 (Git)
Branch: master
Hash: 0506a918b24e015ac6277a7cf613ce151e1dee44
Python version: 2.6.4
Qt version: 4.5.3
Coin version: 2.4.5a
SoQt version: 1.4.1
OCC version: 6.3.0
attached are the idf fileset and the result produced by importing it as FCStd file
--
Lorenz
- Attachments
-
- LEDs.7z
- (193.39 KiB) Downloaded 277 times
Re: wire-frame only parts ofter idf import
When I try to import you emn file I get the following error message, so I have file a bug report
issue #1424
Have you tried to import any other emn files? Does it fail on all or just this specific file?
Jim
Started with opening of "/home/user/Downloads/LEDs.emn" file
Emn version: 3.0
Found board thickness 1.60
['LED1L.1', 'PLCC4-3A-F2.1_salvia-opto.1', 'PLCC4-3A-F2.1.1', 98.33, 133.9, 180.0, 'BOTTOM', 'PLACED']
['LED1L.2', 'PLCC4-3A-F2.1_salvia-opto.2', 'PLCC4-3A-F2.1.2', 98.33, 133.9, 180.0, 'BOTTOM', 'PLACED']
['LED1L.3', 'PLCC4-3A-F2.1_salvia-opto.3', 'PLCC4-3A-F2.1.3', 98.33, 133.9, 180.0, 'BOTTOM', 'PLACED']
edited, - many lines similar to the above deleted
['X1R.16', '53261-04_salvia-molex.16', '53261-04.16', 80.0, 150.0, 0.0, 'TOP', 'PLACED']
['X1R.17', '53261-04_salvia-molex.17', '53261-04.17', 80.0, 150.0, 0.0, 'TOP', 'PLACED']
['X1R.18', '53261-04_salvia-molex.18', '53261-04.18', 80.0, 150.0, 0.0, 'TOP', 'PLACED']
.HEADER
.BOARD_OUTLINE
.DRILLED_HOLES
.PLACEMENTmid point <function mid_point at 0x212ded8>
mid point <function mid_point at 0x212ded8>
mid point <function mid_point at 0x212ded8>
mid point <function mid_point at 0x212ded8>
Added outline
Cutting shape inside outline
Cutting shape inside outline
Proceed 3 outlines
Emp version: 3.0
edited, - many blank lines which had been in the report view deleted
Adding EMP model LED10L.1
Adding EMP model LED10L.2
Adding EMP model LED10L.3
edited, - many lines similar to the above deleted
Adding EMP model X1R.8
Adding EMP model X1R.9
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/Downloads/cad/build/Mod/Idf/Idf.py", line 66, in open
process_emn(doc,filename)
File "/home/user/Downloads/cad/build/Mod/Idf/Idf.py", line 132, in process_emn
place_steps(doc,placement,board_thickness)
File "/home/user/Downloads/cad/build/Mod/Idf/Idf.py", line 330, in place_steps
model_file=pythonopen(model_tab_filename, "r")
<type 'exceptions.IOError'>: (2, 'No such file or directory', '/home/user/Downloads/cad/build/data/Mod/Idf/lib/footprints_models.csv')
OS: Ubuntu 12.04.4 LTS
Platform: 64-bit
Version: 0.14.3167 (Git)
Branch: master
Hash: bb98b5afb0890d786da88aaf8dc8bf05872c5d7a
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
issue #1424
Have you tried to import any other emn files? Does it fail on all or just this specific file?
Jim
Started with opening of "/home/user/Downloads/LEDs.emn" file
Emn version: 3.0
Found board thickness 1.60
['LED1L.1', 'PLCC4-3A-F2.1_salvia-opto.1', 'PLCC4-3A-F2.1.1', 98.33, 133.9, 180.0, 'BOTTOM', 'PLACED']
['LED1L.2', 'PLCC4-3A-F2.1_salvia-opto.2', 'PLCC4-3A-F2.1.2', 98.33, 133.9, 180.0, 'BOTTOM', 'PLACED']
['LED1L.3', 'PLCC4-3A-F2.1_salvia-opto.3', 'PLCC4-3A-F2.1.3', 98.33, 133.9, 180.0, 'BOTTOM', 'PLACED']
edited, - many lines similar to the above deleted
['X1R.16', '53261-04_salvia-molex.16', '53261-04.16', 80.0, 150.0, 0.0, 'TOP', 'PLACED']
['X1R.17', '53261-04_salvia-molex.17', '53261-04.17', 80.0, 150.0, 0.0, 'TOP', 'PLACED']
['X1R.18', '53261-04_salvia-molex.18', '53261-04.18', 80.0, 150.0, 0.0, 'TOP', 'PLACED']
.HEADER
.BOARD_OUTLINE
.DRILLED_HOLES
.PLACEMENTmid point <function mid_point at 0x212ded8>
mid point <function mid_point at 0x212ded8>
mid point <function mid_point at 0x212ded8>
mid point <function mid_point at 0x212ded8>
Added outline
Cutting shape inside outline
Cutting shape inside outline
Proceed 3 outlines
Emp version: 3.0
edited, - many blank lines which had been in the report view deleted
Adding EMP model LED10L.1
Adding EMP model LED10L.2
Adding EMP model LED10L.3
edited, - many lines similar to the above deleted
Adding EMP model X1R.8
Adding EMP model X1R.9
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/Downloads/cad/build/Mod/Idf/Idf.py", line 66, in open
process_emn(doc,filename)
File "/home/user/Downloads/cad/build/Mod/Idf/Idf.py", line 132, in process_emn
place_steps(doc,placement,board_thickness)
File "/home/user/Downloads/cad/build/Mod/Idf/Idf.py", line 330, in place_steps
model_file=pythonopen(model_tab_filename, "r")
<type 'exceptions.IOError'>: (2, 'No such file or directory', '/home/user/Downloads/cad/build/data/Mod/Idf/lib/footprints_models.csv')
OS: Ubuntu 12.04.4 LTS
Platform: 64-bit
Version: 0.14.3167 (Git)
Branch: master
Hash: bb98b5afb0890d786da88aaf8dc8bf05872c5d7a
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
Re: wire-frame only parts ofter idf import
Didn't catch the error in the status line, but after enabling the log file I see the errer toojmaustpc wrote:When I try to import you emn file I get the following error message, so I have file a bug reportissue #1424
Happens with 0.13 too. But the idf.py in both versions is identical anyway.
not yet, but checking now ...jmaustpc wrote:Have you tried to import any other emn files? Does it fail on all or just this specific file?
... seems to be the same for all emn/emp I've tested so far.
I'll play around a bit tomorrow, if I can make sure it's not a format error in the emn/emp files
--
Lorenz
Re: wire-frame only parts after idf import
Ok, digging around I found the origin of the exeption and the solution for my original problem (the wire frame only parts):
1) the exception occures because idf.py expects footprints_models.csv to be in
2) the cure for my wire frame problem is changing line 45 in idf.py from
1) the exception occures because idf.py expects footprints_models.csv to be in
- .../data/Mod/Idf/lib
- .../Mod/Idf/Idflibs (0.14 git 2778)
- .../Mod/Idf/lib (0.13)
2) the cure for my wire frame problem is changing line 45 in idf.py from
- EmpDisplayMode=2 # 0='Flat Lines', 1='Shaded', 2='Wireframe', 3='Points'; recommended 2 or 0
- EmpDisplayMode=0 # 0='Flat Lines', 1='Shaded', 2='Wireframe', 3='Points'; recommended 2 or 0
Re: wire-frame only parts after idf import
The python file should be fixed. Since you have already mantis account etc, would you file a bug about it? In ideal world of course someone should make a pull request for revised python file. Even deeper into territory of "do not have necessary stuff set up and not going to bother as I have already patched our local company version".
It seems that the FreeCAD.getResourceDir() points to installdir/data now (did it always?) and it's not possible to get from there to the correct folder (installdir/mod)
Changing these lines
Into this
fixes the problem
It seems that the FreeCAD.getResourceDir() points to installdir/data now (did it always?) and it's not possible to get from there to the correct folder (installdir/mod)
Changing these lines
Code: Select all
## path to table file (simple comma separated values)
model_tab_filename = FreeCAD.getResourceDir()+ "Mod/Idf/lib/footprints_models.csv"
## path to directory containing step models
step_path=FreeCAD.getResourceDir()+ "Mod/Idf/lib/"
Code: Select all
## path to table file (simple comma separated values)
model_tab_filename = FreeCAD.getHomePath()+ "/Mod/Idf/idflibs/footprints_models.csv"
## path to directory containing step models
step_path=FreeCAD.getHomePath()+ "/Mod/Idf/idflibs/"
Re: wire-frame only parts after idf import
I was wrong about the items being imported as wires, they were solids, but were set to wireframe display mode. I was confused because I was not expecting each of the components to be made up from a few solids, I as expecting them to be one solid.
So should they be imported in wireframe display mode, or should the default display mode on import be set to "flatlines"? I would have thought it should be flat lines.
The error message is still there of course, I have updated the Mantis ticket to reflect the above and to link to this topic and the last post above.
http://freecadweb.org/tracker/view.php?id=1424
So should they be imported in wireframe display mode, or should the default display mode on import be set to "flatlines"? I would have thought it should be flat lines.
The error message is still there of course, I have updated the Mantis ticket to reflect the above and to link to this topic and the last post above.
http://freecadweb.org/tracker/view.php?id=1424
Re: wire-frame only parts after idf import
Since there were some other issues too, I made a pull request in git for the bunch.
Maybe it gets included someday.
Maybe it gets included someday.