You can also directly generate VRML files, but this feature has never worked for me and I like using Wings3D to add color attributes to my models. We need to use Princeton's meshconv to make OpenSCADs output STL acceptable for Wings3d. OpenSCAD STL files and Wings3D don't like each other. If you tried to import your OpenSCAD STL file into Wings3D then you will know this causes a crash.
So save your STL as something that makes sense and lets take a road trip to Wings3D world! Pit Stop: OpenSCAD STL Files Crash Wings3D This can be useful for testing placement and pin spacing of expensive parts on PCBs. You can take the STL file and 3d print it. Then you can export it as a STL file by using "Design > Export as STL". First, you need to do "Design > Compile and Render GCAL", which will make our nice mesh model. Now that we have an OpenSCAD model we need to export it. However, use consistent units yourself, because when we go to KiCAD we will scale. Take into account your tolerances appropriately. When adapting a component follow the datasheet as closely as possible.Math can be tricky, make sure you have a good concept of how primitives get moved around.They are similar to functions and can be reused, positioned and if designed right scaled. Use modules for everything, especially pins.
OPENSCAD MANUAL MANUAL
I found the User Manual to be very useful. Learning OpenSCAD, unlike most CAD software, is essentially learning a programming language. I may eventually write a tutorial for using OpenSCAD, but this will not be it. Modeling simple shapes inside of OpenSCAD is pretty easy and there are a few tricks to it. Export component as STL file (and use meshconv).Make Footprint in KiCAD (not covered here).Get Datasheet of Footprint (not covered here).The question now is how does this workflow go down? Workflow This will modify our workflow a little bit, but not by much. I can only vouch for its usability under Linux. To fix this you can use meshconv however, use of meshconv does require use of the command line (in either Windows, OS X or Linux). However, there is one pretty terrible problem: Wings3D can't for the life of it read in STL files read by OpenSCAD.
OPENSCAD MANUAL PLUS
On the plus side Wings3D will allow us to add color elements and surfaces for nice rendering by KiCAD. However, KiCAD expects VRML files which can be easily generated in Wings3D (which can import STL files).
OPENSCAD MANUAL CODE
OpenSCAD allows you to write code that translates directly to a 3D model and export this to an STL. I personally find it convenient to utilize OpenSCAD to make 3D models of most eletrical components, which are simple and easily defined parametrically in OpenSCAD's language. If you use stock PCB symbols this is great however, when you make your own PCB footprints you need to define your own 3d models. Like many other EDA tools that are floating around KiCAD can make 3D renderings of your circuit boards. KiCAD is an Open Source EDA (Electronic Design Automation) suite, which I use for schematic capture and PCB layout.