element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) Eagle + generate_3D_data.ulp -> IDF -> FreeCad -> Many 3D formats
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 6 replies
  • Subscribers 177 subscribers
  • Views 2325 views
  • Users 0 members are here
  • freecad
  • step
  • idf
  • 3d
  • iges
  • solidworks
Related

Eagle + generate_3D_data.ulp -> IDF -> FreeCad -> Many 3D formats

bvwj
bvwj over 11 years ago

The generate_3d_data script has fallen into disrepair and hasn't seen any improvements in over two and a half years. 

 

I needed to generate 3D board data for a customer, so I took the opportunity to make some fixes.  In my research I found that FreeCAD (exactly what it sounds like) has an IDF import function.  Unfortunately that module (idf.py) is not installed in the default Windows distribution, but it is easy to copy and paste.

 

The old version of generate_3d_data had many issues that were incompatible with the FreeCAD import filter.  With some guessing and testing I made it work.  I think the rest of the operation of generate_3d_data is unchanged.  It may still have some pre-existing bugs, and I may have introduced new bugs.  For my purposes it seems to be working very well.

 

What I don't know know is if this new version is compatible with other 3D CAD packages.  I have a friend testing SolidWorks, but I don't have access to any of the other packages.  I would appreciate help testing if you have other systems available.

 

From FreeCAD you can generate STEP, IGES, and many other formats after the IDF file is imported.

 

The new version 0.90 ulp is attached.

 

Merry Christmas!

Attachments:
generate_3d_data_v090.ulp.zip
  • Sign in to reply
  • Cancel
  • autodeskguest
    autodeskguest over 11 years ago

    Barry Walker wrote:

     

    The generate_3d_data script has fallen into disrepair and hasn't seen

    any improvements in over two and a half years. 

     

    I needed to generate 3D board data for a customer, so I took the

    opportunity to make some fixes.  In my research I found that FreeCAD

    (exactly what it sounds like) has an IDF import function.  Unfortunately

    that module (idf.py) is not installed in the default Windows

    distribution, but it is easy to copy and paste.

     

    The old version of generate_3d_data had many issues that were

    incompatible with the FreeCAD import filter.  With some guessing and

    testing I made it work.  I think the rest of the operation of

    generate_3d_data is unchanged.  It may still have some pre-existing

    bugs, and I may have introduced new bugs.  For my purposes it seems to

    be working very well.

     

    What I don't know know is if this new version is compatible with other

    3D CAD packages.  I have a friend testing SolidWorks, but I don't have

    access to any of the other packages.  I would appreciate help testing if

    you have other systems available.

     

    From FreeCAD you can generate STEP, IGES, and many other formats after

    the IDF file is imported.

     

    The new version 0.90 ulp is attached.

     

    there is a thread regarding generate_3d_data vs. eagle V6

     

    http://www.eaglecentral.ca/forums/index.php/m/150121/6377607912ccb8b76588a5b350a10e2a/?srch=generate_3d_data#msg_150121

     

    maybe Mr. Zaffran will chime in anyway, but if not you could contact

    him to obtain a copy of the updated ULP and combine it with your

    changes.

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 11 years ago in reply to autodeskguest

    Hi Barry,

     

    Lorenz wrote:

    Barry Walker wrote:

     

    The generate_3d_data script has fallen into disrepair and hasn't seen

    any improvements in over two and a half years. 

     

    The new version 0.90 ulp is attached.

     

    I was not aware about Freecads import capability for idf.

     

    It took me some time (because I'm not familiar with Phyton) but I

    managed to obtain the mod/idf code from githup.

     

    The idf file generated with your version of the generate_3d_data.ulp

    loads in Freecad (0.13) without issuing an error (unlike Mr. Zaffrans

    1.3 Version which throws an exception 'both points are equal'), but

    ...

     

    1) parts are only wireframe

    2) bottom parts are placed on top

    3) I have two 4mm vias (GND for test clips), but only one of them

    shows up in the import

    4) the mounting holes (arcs in the dimension layer of a package, that

    is: coutouts no drills) don't show up at all

     

     

    ... waiting for the Solid2013 import to finish ...

     

     

    ok, let's see:

     

    1) in solid the parts are solid 8-)

    2) bottom parts on top too

    3) none of the 4mm vias shows up

    4) mounting holes missing too

     

     

    HTH

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 11 years ago in reply to autodeskguest

    Lorenz wrote:

     

    Hi Barry,

     

    Lorenz wrote:

    Barry Walker wrote:

     

    The generate_3d_data script has fallen into disrepair and hasn't seen

    any improvements in over two and a half years. 

     

    The new version 0.90 ulp is attached.

     

    while trying-out the board-outlines-and-cutouts workaround* with your

    script I found that your script version no longer runs on a

    stand-alone board file with packages.

     

    Peeking into the ulp it seems you access the schematic it there a

    packages in the board.

     

    (don't get me wrong, I'm not complaining, only reporting my findings)

     

     

    • board coutouts don't show up in the idf if drawn in layer 50

    directly in the board.

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • bvwj
    bvwj over 11 years ago in reply to autodeskguest

    I was not aware about Freecads import capability for idf.

     

    It took me some time (because I'm not familiar with Phyton) but I

    managed to obtain the mod/idf code from githup.

     

    The idf file generated with your version of the generate_3d_data.ulp

    loads in Freecad (0.13) without issuing an error (unlike Mr. Zaffrans

    1.3 Version which throws an exception 'both points are equal'), but

    ...

     

    1) parts are only wireframe

    2) bottom parts are placed on top

    3) I have two 4mm vias (GND for test clips), but only one of them

    shows up in the import

    4) the mounting holes (arcs in the dimension layer of a package, that

    is: coutouts no drills) don't show up at all

     

     

     

    1) in solid the parts are solid 8-)

    2) bottom parts on top too

    3) none of the 4mm vias shows up

    4) mounting holes missing too

     

     

    Lorenz,

     

    Thanks for testing the script and reporting the details of your results.

     

    The first problem with the old versions was the "both points are equal" error in FreeCAD.  The old versions basically repeated all the points twice in the .emn and .emp files.  This may be legal in IDF, but the FreeCAD importer did not care for it.  I fixed this and another error that appears after you fix that one.

     

    The parts in wire frame issue I don't think is fixable with the script.  It may be a setting in FreeCAD.  Was FreeCAD in wireframe mode?  I am not a FreeCAD expert at all.  I do not get wireframe parts, but the IDF format doesn't really specify solids or wire frames, just points.

     

    I confess I found the misplaced bottom parts issue shortly after my post yesterday.  It was only a problem with multi-outline parts placed on the bottom, but for me it is fixed with the v091 file attached.

     

    Odd only one of two vias would show up.  I don't have an explanation for that one.  I have 4 large vias for mounting holes on my board, all 4 show up.  It is pretty easy to open the .emn file with a text editor and look at the hole call outs.  That would tell you if the script isn't finding the hole, or if the importer isn't importing the hole.  I did set the via limit too low once and it caught all my signal vias.  The script handled it well enough, but FreeCAD always crashed before loading the entire design.

     

    Pretty sure the .ulp does not look at the dimension layer in packages.  If it isn't on layer 50,  57,  58, or a through hole pad it might as well not exist for this version. 

     

    I don't use any cutouts on the board I am testing, so I have no results.  As I recall from using the old version a few years ago, there were issues with the cutouts.  I didn't touch any of the code in that section.  If I remember correctly, when I made components with cutouts on layer 50 and it handled those better than using cutouts directly on layer 50 of the board.

     

    The new script does rely on components in the schematic so it can find the original library part dimensions and angles.  The IDF format uses library parts then placement of those library parts, much like Eagle.  The old version of the generate_3d .ulp made a new part for every rotation and mounting side of each part found on the board.  I changed that.  Possibly this is not helpful for board only designs.

     

    I also appreciate  your comment that you are reporting not complaining.  Very kind.

    Attachments:
    generate_3d_data_v091.ulp.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 11 years ago in reply to bvwj

    Barry Walker wrote:

     

    Odd only one of two vias would show up.  I don't have an explanation for

    that one.  I have 4 large vias for mounting holes on my board, all 4

    show up.

     

    I tracked down the missing drill.

    Looking into to emn file revealed all drills to be present.

    So I had a look into idf.py and I think there is a bug in the line

    that handles the drills.

     

    if current_section==".DRILLED_HOLES"  and section_counter>2 and float(emnrecords[0])*emn_unit>ignore_hole_size:

             drills.append([float(emnrecords[0])emn_unit,float(emnrecords[1])emn_unit,float(emnrecords[2])*emn_unit])

     

    changing 'section_counter>2' to 'section_counter>1' produced the

    missing drill.

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • f.mitnacht
    f.mitnacht over 6 years ago in reply to bvwj

    Hi Barry,

    there's still a problem with packages, that have 3D data on the bottom ECAD layer 50 "bCAD". Here's an example of a THT female connector. In the tCAD layer 57 there are the beginnings of the pins and in the bCAD layer 58 there are the endings of the pins. generate_3d_data_v091.ulp generates wrong angle data, if your package is places in other angles than 0° or 180°. You see in the picture on the left side packes placed in 0° and 180°. No problem here. The pins on the bCAD layer are at the same x/y-Coordinate as on the tCAD. On the right side you see packages rotated to 90° or 270°. The bCAD-pins are rotated in the wrong direction.

    Data in *.emn:image

    [..]
    AMTEK-5PS2RDB63-207_BR38.1 AMTEK-5PS2RDB63-207_BR38_SMD-FM.1 X2.1
    22.00 11.00 0 90.00 TOP PLACED
    AMTEK-5PS2RDB63-207_BR38.2 AMTEK-5PS2RDB63-207_BR38_SMD-FM.2 X2.2
    22.00 11.00 0 90.00 TOP PLACED
    [...]
    AMTEK-5PS2RDB63-207_BR38.9 AMTEK-5PS2RDB63-207_BR38_SMD-FM.9 X2.9
    22.00 11.00 0 90.00 BOTTOM PLACED
    AMTEK-5PS2RDB63-207_BR38.10 AMTEK-5PS2RDB63-207_BR38_SMD-FM.10 X2.10
    22.00 11.00 0 90.00 BOTTOM PLACED
    [...]


    Should be:

    [..]
    AMTEK-5PS2RDB63-207_BR38.1 AMTEK-5PS2RDB63-207_BR38_SMD-FM.1 X2.1
    22.00 11.00 0 90.00 TOP PLACED
    AMTEK-5PS2RDB63-207_BR38.2 AMTEK-5PS2RDB63-207_BR38_SMD-FM.2 X2.2
    22.00 11.00 0 90.00 TOP PLACED
    [...]
    AMTEK-5PS2RDB63-207_BR38.9 AMTEK-5PS2RDB63-207_BR38_SMD-FM.9 X2.9
    22.00 11.00 0 -90.00 BOTTOM PLACED
    AMTEK-5PS2RDB63-207_BR38.10 AMTEK-5PS2RDB63-207_BR38_SMD-FM.10 X2.10
    22.00 11.00 0 -90.00 BOTTOM PLACED
    [...]

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube