{"id":2381,"date":"2016-01-03T18:52:32","date_gmt":"2016-01-03T18:52:32","guid":{"rendered":"http:\/\/mentin-blog.azurewebsites.net\/?p=2381"},"modified":"2016-01-04T18:37:18","modified_gmt":"2016-01-04T18:37:18","slug":"tutorial-generating-3d-pcb-data-in-seconds","status":"publish","type":"post","link":"https:\/\/blog.mentin.at\/?p=2381","title":{"rendered":"[Tutorial] Generating 3D PCB Data in seconds"},"content":{"rendered":"<p>In this Tutorial i will show you the few steps needed to generate 3D PCB Information easily.<br \/>\nFirst of all you will have to\u00a0use this tools:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.cadsoft.de\/\" target=\"_blank\">EAGLE <\/a>Layout Editor\u00a0(generate-3d-idf-data.ulp) &#8211;\u00a0for generating idf Information.<\/li>\n<li><a href=\"http:\/\/hb9etc.ch\/\" target=\"_blank\">IDFStepper <\/a>&#8211;\u00a0for generating STEP Data.<\/li>\n<li><a href=\"http:\/\/www.freecadweb.org\/\" target=\"_blank\">FreeCAD<\/a>\u00a0&#8211; for viewing generated 3D Data and assembly with housing models.<\/li>\n<\/ul>\n<p>If you are using EAGLE, you know how libraries are organized in Symbols, Packages and Devices.<br \/>\nIn some other tutorials i will show how to set up all library Informations properly, this tutorial will focus only on the library parts concerning 3D Data, which is the Package Information. This additional Infomation to generate step-files will cost you maybe one additional minute when creating a new Package but the\u00a03D Information you get is completely amazing.<\/p>\n<p><strong>First<\/strong> of all you will have to generate some <strong>new layers<\/strong> in the <strong>Package of a Device:<\/strong><\/p>\n<ul>\n<li><em>Package<\/em> <strong>Layer 57<\/strong>: for top placed parts<\/li>\n<li><em>Package<\/em> <strong>Layer 58<\/strong>: for bottom placed parts<\/li>\n<\/ul>\n<p><em>(just copy paste into the command line of eagle-Package Editor: layer &#8217;57&#8217; tCAD or layer &#8217;58&#8217; bCAD)<\/em><\/p>\n<p>By\u00a0only drawing the outlines of your part in this layers, shapes will later be extruded with the height of your line width (<strong>1\u00a0\u00b5m\u00a0width =\u00a01mm heigth<\/strong>). <strong><em>The line width determines the extrusion height<\/em><\/strong>. If you want some pins\u00a0of your e.g.\u00a0TQFP part shown in the 3D Model you will have to draw extra rectangular shapes for every pin.<\/p>\n<figure id=\"attachment_3341\" aria-describedby=\"caption-attachment-3341\" style=\"width: 200px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/57_TCAD-1.png\" rel=\"attachment wp-att-3341\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3341 \" src=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/57_TCAD-1.png\" alt=\"57_TCAD\" width=\"200\" height=\"200\" srcset=\"https:\/\/blog.mentin.at\/wp-content\/uploads\/57_TCAD-1.png 269w, https:\/\/blog.mentin.at\/wp-content\/uploads\/57_TCAD-1-150x150.png 150w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/a><figcaption id=\"caption-attachment-3341\" class=\"wp-caption-text\">Layer 57: tCAD Polygons for Plastic Case and Pins<\/figcaption><\/figure>\n<p>Be aware, that eagle connects lines which are close together, to a single polygon, therefore, parallel outline shape of pins\u00a0and plastic case should not be connected since you will get errors when generating the idf-file. You can check if they are connected, by zooming in wide, or only moving the shapes a bit. You will see if they stick together immediately. To have no problems i move the conours by entering the numbers directly into the Info of a shape contour, so they will always be in a distance of more than 1\u00b5m. In the 3D Model you wont see that distance between feet and plastic case.<\/p>\n<blockquote>\n<p style=\"text-align: left;\"><strong>NOTE:<\/strong> Be sure that you draw something like the maximum outline dimensions, since big parts may have <strong>mm Tolerances<\/strong> and they might collide in your housing if you don&#8217;t consider that sometimes parts are bigger than the typ. size shown in the Datasheets!<\/p>\n<\/blockquote>\n<figure id=\"attachment_3321\" aria-describedby=\"caption-attachment-3321\" style=\"width: 200px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/50_PCBOutline-1.png\" rel=\"attachment wp-att-3321\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3321\" src=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/50_PCBOutline-1.png\" alt=\"50_PCBOutline\" width=\"200\" height=\"130\" srcset=\"https:\/\/blog.mentin.at\/wp-content\/uploads\/50_PCBOutline-1.png 553w, https:\/\/blog.mentin.at\/wp-content\/uploads\/50_PCBOutline-1-300x195.png 300w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/a><figcaption id=\"caption-attachment-3321\" class=\"wp-caption-text\">Layer 50: PCB Outline with PCB cutout<\/figcaption><\/figure>\n<p><strong>Next<\/strong> step is to generate a\u00a0<strong>new layer in your .brd<\/strong>:<br \/>\n<em>.brd<\/em> <strong>Layer 50<\/strong>: for\u00a0the PCB Outline (you may copy only the Dimension to that Layer).\u00a0as in the Package.<br \/>\nThe line width also determines the PCB Thickness, in the same way.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_3271\" aria-describedby=\"caption-attachment-3271\" style=\"width: 200px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/3D_test_brd-1.png\" rel=\"attachment wp-att-3271\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3271\" src=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/3D_test_brd-1.png\" alt=\"one simple PCB Outline with a breakthrough and three simple Parts placed\" width=\"200\" height=\"130\" srcset=\"https:\/\/blog.mentin.at\/wp-content\/uploads\/3D_test_brd-1.png 552w, https:\/\/blog.mentin.at\/wp-content\/uploads\/3D_test_brd-1-300x195.png 300w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/a><figcaption id=\"caption-attachment-3271\" class=\"wp-caption-text\">one simple PCB Outline with a breakthrough and three simple Parts placed<\/figcaption><\/figure>\n<p>If you want some cutouts or\u00a0breaktroughs in your Board, you can do so by defining a Polygon with <strong>line width set to 0.0\u00b5m<\/strong>.\u00a0When you are done with the Layout, here\u00a0in my tiny example i only put one Resistor and another Capacitor onto the Board, it may look something like this.<\/p>\n<p><strong>After that<\/strong> you will have to generate the 3D idf Data with a\u00a0eagle ulp Program called\u00a0<strong>generate-3d-idf-data.ulp.<\/strong><\/p>\n<figure id=\"attachment_2561\" aria-describedby=\"caption-attachment-2561\" style=\"width: 250px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/3D_test.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2561\" src=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/3D_test.png\" alt=\"3D_test\" width=\"250\" height=\"199\" srcset=\"https:\/\/blog.mentin.at\/wp-content\/uploads\/3D_test.png 656w, https:\/\/blog.mentin.at\/wp-content\/uploads\/3D_test-300x238.png 300w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><figcaption id=\"caption-attachment-2561\" class=\"wp-caption-text\">step file generated with idf-stepper (idf and idb file as Input)<\/figcaption><\/figure>\n<p>There will be 2 files generated. On is the named *.idf and it contains the information of the whole polygons. idf-stepper will generate a step file for every single polygon and store it in the root folder. The *.idb file contains the Information how the polygons are oriented to the Board origin. idf-stepper will take all the generated step files, put them in place to one big step assembly.\u00a0In windows idf-stepper works with drag&amp;drop the *.idf and *.idb files simply onto the executable and you are done!<\/p>\n<p>When you are using your simple rectangular shapes like me in my little example you will then get a generated step file looking something like this.\u00a0For most Mechanical Engineers this\u00a0generated step\u00a0Information is all what they need to place the parts in a mechanical assemly and check collisions and\u00a0correctness of mounting points.<\/p>\n<p>But idf-stepper also can also deal with advanced very complex step models. Exactly this function\u00a0gives you\u00a0the most powerful capability:<\/p>\n<hr \/>\n<blockquote>\n<p style=\"text-align: left;\">By only using the *.idb file you can take every very advanced 3D Model as Input source to the idf stepper. Only take a short look at the naming convention, take your advanced model, give it the right orientation and you can use it immediately by replacing the generated step file of this part generated by idf-stepper. If you deliver the idf-stepper only the *.idb file as Input,\u00a0the existing step files wont be overwritten.<\/p>\n<hr \/>\n<\/blockquote>\n<p style=\"text-align: left;\">\u00a0In another Project i used more advanced 3D Models for the LEDs, once you have rotated the advanded LED-Models into the right angles, you can use them every time again:<\/p>\n<figure id=\"attachment_2631\" aria-describedby=\"caption-attachment-2631\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/3D_advancedLED_Models.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2631\" src=\"http:\/\/mentin-blog.azurewebsites.net\/wp-content\/uploads\/3D_advancedLED_Models.png\" alt=\"3D_advancedLED_Models\" width=\"600\" height=\"555\" srcset=\"https:\/\/blog.mentin.at\/wp-content\/uploads\/3D_advancedLED_Models.png 1499w, https:\/\/blog.mentin.at\/wp-content\/uploads\/3D_advancedLED_Models-300x277.png 300w, https:\/\/blog.mentin.at\/wp-content\/uploads\/3D_advancedLED_Models-1024x947.png 1024w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-2631\" class=\"wp-caption-text\">included advanced step files for LEDs<\/figcaption><\/figure>\n<p><strong><em>One addiotional highly useful and powerful feature:<\/em><\/strong> Since FreeCAD has the Ability to save the step file as *.html (every modern Browser can use WebGL) you can send your <strong>3D Model as html-file<\/strong> to everyone, still if he has no CAD Viewer, he will be\u00a0able to <strong>rotate the model, zoom in\/out within the browser<\/strong>. The only thing you might have to adjust\u00a0by your own with a simple text editor is, to set the camera Position far enough from your board, since if the standard Position is (0.0, 0.0, 1.0), which means the camera is set in the PCB, so by default you do not see any parts. I like to use something like that\u00a0camera.position.set( 100.0, 100.0, 200.0 );<\/p>\n<p>This last sample i provided here, outgoing from an with idf-stepper\u00a0generated step-file, opened with\u00a0FreeCAD and saved as <a href=\"http:\/\/mentin-blog.azurewebsites.net\/?attachment_id=2611\" target=\"_blank\">html(webGL)<\/a>\u00a0file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this Tutorial i will show you the few steps needed to generate 3D PCB Information easily. First of all you will have to\u00a0use this tools: EAGLE Layout Editor\u00a0(generate-3d-idf-data.ulp) &#8211;\u00a0for generating idf Information. IDFStepper &#8211;\u00a0for generating STEP Data. FreeCAD\u00a0&#8211; for viewing generated 3D Data and assembly with housing models. If you are using EAGLE, you &hellip; <a href=\"https:\/\/blog.mentin.at\/?p=2381\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">[Tutorial] Generating 3D PCB Data in seconds<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":3511,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,31],"tags":[71],"class_list":["post-2381","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronic-prototyping","category-generating-3d-pcb-data","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/blog.mentin.at\/index.php?rest_route=\/wp\/v2\/posts\/2381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mentin.at\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mentin.at\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mentin.at\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mentin.at\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2381"}],"version-history":[{"count":37,"href":"https:\/\/blog.mentin.at\/index.php?rest_route=\/wp\/v2\/posts\/2381\/revisions"}],"predecessor-version":[{"id":3551,"href":"https:\/\/blog.mentin.at\/index.php?rest_route=\/wp\/v2\/posts\/2381\/revisions\/3551"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mentin.at\/index.php?rest_route=\/wp\/v2\/media\/3511"}],"wp:attachment":[{"href":"https:\/\/blog.mentin.at\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mentin.at\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mentin.at\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}