KiCAD photo realistic 3D rendering? - Page 1
Forum section: electronics / general

author: firewalker
author_rank: Super Contributor
timestamp: February 24, 2014, 06:49:41 pm
content: Does anyone knows if the is a schedule for realistic 3d in KiCAD? I have seen some project that adds this feature to pcbnew.Alexander.

author: free_electron
author_rank: Super Contributor
timestamp: February 24, 2014, 06:54:36 pm
content: and the usefullness of such a thing is what exactly ?there's plenty of real problems to be fixed first

author: firewalker
author_rank: Super Contributor
timestamp: February 24, 2014, 07:19:56 pm
content: For me? None. It is for my students.Useful would be to use the 3d rendering to another program. To combine with a case etc.Alexander.

author: free_electron
author_rank: Super Contributor
timestamp: February 24, 2014, 07:46:13 pm
content: rendering are useless. you need dimension accurate step files to do any kind of mechanical work.

author: firewalker
author_rank: Super Contributor
timestamp: February 24, 2014, 07:49:43 pm
content: This is what I wanted to say. But couldn;t recall the "STEP".Alexander.

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 25, 2014, 12:17:10 am
content: Quote from: free_electron on February 24, 2014, 07:46:13 pmi believe any 3d format can be made "dimension accurate". rendering is just that, rendering.

author: free_electron
author_rank: Super Contributor
timestamp: February 25, 2014, 12:43:18 am
content: rendering is making a pretty picture. those are useless ( apart from putting them in marketing material )what we need is mechabnical CAD integration: being able to export and import 3d objects,p place them relative to footprints and export the placed and routed assembly back to the mechanical CAD domain.The prevalent format for this is either STEP or IGES format.

author: AlfBaz
author_rank: Super Contributor
timestamp: February 25, 2014, 12:57:03 am
content: meh... Isometric drawings are for wimps. Don't even get me started with the 3D pussies

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 25, 2014, 11:41:33 am
content: Quote from: free_electron on February 25, 2014, 12:43:18 amso you admitted its not entirely uselessQuote from: free_electron on February 25, 2014, 12:43:18 amlooking at KiCAD style and trend (divide and conquer for each element) you are looking at another beast that deserves a place next to those eeschema, cvpcb and pcbnew buttons.

author: ConnorGames
author_rank: Regular Contributor
timestamp: February 26, 2014, 12:52:28 am
content: I know it's not exactly what you are looking for, but I made this based off a kicad board in blender... It took hours though, more of a "because I can" project than a "Because I actually need to" projectEDIT:You can use file>export>VRML. This used to export ugly meshes (As in, "combine the tracks into one object? Nahh, we'll gust export each segment as its own object!") in previous versions, but with the latest builds (I have BZR 4643 built from source) it looks like it produces a relatively clean and usable mesh -- give it a try. Even if you have an older build, it might still be usable for your purposes. If you want a sample STL or blend file I could upload one.

author: doctormord
author_rank: Regular Contributor
timestamp: December 23, 2014, 08:15:13 am
content: Quote from: free_electron on February 24, 2014, 07:46:13 pmEven this is an old thread, and my posting would be "useless", i just wanted to show my efforts to link KiCAD to POV-Ray using some modified Eagle-3D scripts.

author: AlfBaz
author_rank: Super Contributor
timestamp: December 23, 2014, 08:53:35 am
content: Nice

author: Rerouter
author_rank: Super Contributor
timestamp: December 23, 2014, 09:07:25 am
content: I have not updated for a while, but any silkscreen drawings or text you add are shown in the 3D View, not quite on topic, but something i myself only recently found out,

author: Unknown
author_rank: Unknown
timestamp: December 23, 2014, 10:15:43 am
content: Quote from: doctormord on December 23, 2014, 08:15:13 amThat is really nice!!!

author: firewalker
author_rank: Super Contributor
timestamp: December 23, 2014, 12:21:53 pm
content: Very nice job! Could you giv us some extra infos?Alexander.

author: doctormord
author_rank: Regular Contributor
timestamp: December 23, 2014, 03:13:21 pm
content: Quote from: Rerouter on December 23, 2014, 09:07:25 amThis can be switched of in the latest BZW builds. (Not sure if it works in stable BZR4022).Quote from: firewalker on December 23, 2014, 12:21:53 pmThe first step is to export the "Module Position File (.pos)". To have everything within, the parts used in the circuit must have the attributes "Normal + Insert". (Module Properties)This will give something like:Code:### Module positions - created on 23/12/2014 06:44:23 ###### Printed by Pcbnew version pcbnew (2013-07-07 BZR 4022)-stable## Unit = mm, Angle = deg.## Side : F.Cu# Ref Val Package PosX PosY Rot SideR24 10k 0402_HD_RES 10.2000 42.3000 180.0 F.CuU1 TPA3132D2 TPA3132D2 9.7000 34.9500 270.0 F.Cu## EndWe care about PosX/PosY/Rot(ation) and package.This then will be translated into Eagle3D macros than POV-Ray can render, so for the 2 parts here:Code:object {RES_SMD_CHIP_0402("10k",)rotate<0,180,0> translate<10.2,0,42.3> translate<0,0.035000,0>} //R24object {IC_SMD_MLF_32_050MM("TPA3132D2")rotate<0,270,0> translate<9.7,0,34.95> translate<0,0.035000,0>} //U1For the parser to work, the parts needs to be named correctly (i actually did everything by hand)The pcb itself is rendered from GERBER data (screenshot) with an alpha-channel to set the mask on a "BOX":Code:box{<0,0,0> <50,50,1.6>texture{pigment{image_map{png "D:\test_copper_red.png"map_type 0interpolate 2//filter 255, 1.0once}scale <50,50,1>}finish {ambient 0.1diffuse 0.3specular 0.01roughness .001reflection {0.2, 0.1 metallic}}}rotate <90,0,0>translate<0,0,0>translate<-17.2,0,15.5>}Most (old) infos are shown here (german):https://translate.google.de/translate?sl=de&tl=en&js=y&ie=UTF-8&u=http%3A%2F%2Fwww.mikrocontroller.net%2Ftopic%2F114555I made a package available in the past to start with:http://www.mikrocontroller.net/topic/114555?page=2#3032004Because the pcb is just an image, there will be no real drills nor vias and pads at the moment. (So automatic solder generation wont work)Edit:I'm actually playing with PoseRay to get valid board data from VRML.

author: doctormord
author_rank: Regular Contributor
timestamp: December 23, 2014, 08:03:09 pm
content: Having some data extracted from the VRML gives a nice drilled board, but the soldermask is wrong in some way (via restring).

author: steve_w
author_rank: Regular Contributor
timestamp: February 10, 2015, 10:30:19 am
content: Nice

author: JohnnyBerg
author_rank: Frequent Contributor
timestamp: February 10, 2015, 10:40:15 am
content: This is how it looks on the latest release (BZR 5376):

author: JohnnyBerg
author_rank: Frequent Contributor
timestamp: February 10, 2015, 10:47:59 am
content: And a zoom:

author: nickoe
author_rank: Contributor
timestamp: April 03, 2015, 10:15:17 pm
content: Quote from: free_electron on February 25, 2014, 12:43:18 amIf you wand to see STEP and IGES support, please respond to Cirilo's request:https://lists.launchpad.net/kicad-developers/msg17386.html

author: easyw
author_rank: Contributor
timestamp: October 09, 2015, 07:52:00 pm
content: Quote from: free_electron on February 25, 2014, 12:43:18 amHi, if you are interested inMCADintegration / collaboration with kicad ECAD you could find useful the script I developed to export kicad pcb and assemblies to mechanical CAD, maintaining the 3D rendering perfectly aligned to the mechanical assembly.The hack is done by a python script and the recent version of FreeCAD (>=0.15) ...The result is aSTEP modelwith color and mechanical objects matching completely the 3D aesthetic rendering.The nicest thing is that you can obtain this feature just with the new standard and official stable kicad version.To model your partsyou can use the standard STEP modelsobtained from manufacturers or libraries or just model your parts in FreeCAD or whatever MCAD software you may prefer.The script is Open Source and works in Windows, Linux and OSXhttp://sourceforge.net/projects/kicadstepup/Here is an example of a kicad board and modules converted to STEP:

author: timofonic
author_rank: Frequent Contributor
timestamp: October 11, 2015, 05:25:29 pm
content: Nice stuff!Are there plans to integrate it further in the future? What are the KiCad scripting abilities compared with other EDA software? And easy to make scripts?

author: easyw
author_rank: Contributor
timestamp: October 11, 2015, 11:05:30 pm
content: Hi @Circuiteromalaguito,kicad developer are planning to integrate IGES and possibly STEP models directly in the 3D viewer, as a plugin, but when this will be available it difficult to say... for sure it will not be available for the upcoming stable release.Kicad scripting at the moment is available only for pcbnew and there are some nice scripts to generate footprints for DIP, QFP, BGA ...they will be available under New Footprint wizard.The used language is python, so it is quite easy to modify or make a script... scripting doc is a lacking feature...Anyway, kicad comes with human readable format, so it is possible to script something from outside (e.g. build a panelized PCB)...Moreover, talking of kicad StepUp script, the script is an external tool for kicad and it is written in python ...It reads the kicad_pcb board and converts it to a mechanical model that can be used in any MCAD software.And you can do also the opposite... if you add an enclosure to your mechanical design, you can display that also in kicad 3D viewer, matching exactly what you'll get in mechanical environment:bi-directional collaboration between ECAD and MCAD worlds!The workflow is very simple and maintains the usual way of working in kicad.Withkicad StepUpscript, kicad hasnowa true parametric 3D MCAD collaboration tool that put beside the 3D photo-realistic rendering of all board elementsand everything is achieved with a single command...One other 'STEP' ahead to compete with the big onesMaurice

author: easyw
author_rank: Contributor
timestamp: February 13, 2016, 11:22:25 pm
content: Hi,I just developed a new Macro to export VRML models from FreeCAD in a smaller size and with a kicad and Blender compatibility...That Macro will be included in the new kicad StepUp GUI coming soon at:https://sourceforge.net/projects/kicadstepup/here the 3D photorealist result

author: firewalker
author_rank: Super Contributor
timestamp: February 14, 2016, 12:16:49 am
content: Excellent!

author: CatalinaWOW
author_rank: Super Contributor
timestamp: February 14, 2016, 12:25:49 am
content: I know free_electron finds these things useless, but they are useful beyond marketing.While the 3D cad programs can also provide these (in large shops that have those tools), the renderings also are useful in repair/calibration manuals. If the product is to be produced in kit form they can be used in the assembly instructions. And for low budget hobby people and very small shops they can even assist in visualizing how it will be mounted and packaged. I am sure there are other worthwhile functions they can perform.

author: easyw
author_rank: Contributor
timestamp: February 16, 2016, 09:29:55 am
content: Hi,I just released the new kicad StepUp GUI:https://sourceforge.net/projects/kicadstepup/here another 3D photo realistic resultfully aligned to the 3D mechanical MCAD modelfor a real ECAD MCAD collaboration, with a touch of artistic passion

author: MarkF
author_rank: Super Contributor
timestamp: February 16, 2016, 10:41:16 am
content: Here are a few samples I've done with DipTrace. The last two pics I imported from Eagle files. Sorry, I don't have any experience with KiCad.I don't find the 3-D image useless. I have found a few subtle problems in layouts I'm working on.

author: timofonic
author_rank: Frequent Contributor
timestamp: February 24, 2016, 09:47:41 pm
content: @easyw Thanks a lot for your work!Will STEP be too difficult to achieve?

author: easyw
author_rank: Contributor
timestamp: March 01, 2016, 09:31:49 pm
content: Quote from: timofonic on February 24, 2016, 09:47:41 pmif you mean STEP inside kicad, it will be a quite long run to achieve...but if you use kicad StepUp you can have this panorama:1) 3D of VRML board and models in kicad for ECAD designing2) 3D of VRML board and models in blender for photo realistic rendering3) 3D of STEP board and models in FreeCAD or any other mechanical CAD for mechanical designingI just updated kicad StepUp with a user friendly GUI, so the only thing to do is just click a button to load board and models in MCAD worldhttps://forum.kicad.info/t/kicad-stepup-new-exporter-for-3d-mcad-feedbacks-are-welcome/1048/59and don't forget the visual 3D aligner to align kicad footprint and 3D STEP modelhttps://youtu.be/O6vr8QFnYGwThe requirement is a MCAD library, that would be also a must also for having a STEP viewer inside kicad...so I don't miss so much at the moment and I think this panorama is even more better in respect of a direct STEP integration; in fact you can have the 3D viewer with materials in kicad because of VRML, which would not available for STEP formatMaurice

author: ElektroQuark
author_rank: Unknown
timestamp: March 02, 2016, 08:32:45 am
content: Hi Maurice,Do the alignment tools change 3D model properties in KiCad?

author: easyw
author_rank: Contributor
timestamp: March 02, 2016, 08:54:40 am
content: Quote from: EdoNork on March 02, 2016, 08:32:45 amwhen you have aligned your 3D model to footprint in FreeCAD with StepUp tools, just click on the "Export STEP & VRML scaled" and you will get both STEP and VRML models to be used in kicad 3D viewer ... alignment parameters in footprint would be as in the kicadStepUp-starter-Guide filescale 1 1 1offset 0 0 0rotation 0 0 z-anglethose parameters are not changed by the tools, it user's responsibility to check those in pcbnew board file and in footprintThe new StepUp GUI would warn you in case of wrong parametersplease have a look at the new video tutorialhttps://youtu.be/h6wMU3lE_sAMaurice

author: ElektroQuark
author_rank: Unknown
timestamp: March 02, 2016, 09:03:54 am
content: Oh, I see. I thought you do the alignment in KiCad not in Freecad.Those unknown icons in KiCad's 3d Viewer confused me.Thank you.

author: easyw
author_rank: Contributor
timestamp: March 02, 2016, 01:55:01 pm
content: I moved all my StepUp code in FreeCAD because of its powerful APIs...Moreover you can use all the StepUp tools functions as a single FC Macro (>5K sloc)...That improved kicad compatibility of the tools (compatible from 4.0 onwards), and let users to approach MCAD without almost anything knowledge of it, faciliting ECAD MCAD collaboration for a better enclosure and mechanical design

author: thommo
author_rank: Frequent Contributor
timestamp: March 11, 2016, 10:46:20 pm
content: Hi guys,I am neither an elec engineer, nor an industrial designer, but I am project managing a situation where we need to bring the output from Kicad (all the models are in place already I believe), across to Solidworks, for inclusion into the mechanicals for, among other things, interference checking.Does anyone out there have a proven, efficient workflow, and preferably a step by step instruction set for us to do this?Would really appreciate the help.The Kicad guy has no 3D CAD experience and the IndDes no electronics design.We'd love a simple path to go back in the reverse direction also if possible. SWorks components into Kicad.First attempts have produced some massive file sizes from Kicad's output (STEP) of several GBsThanks in advance.

author: easyw
author_rank: Contributor
timestamp: March 12, 2016, 08:00:06 am
content: Quote from: thommo on March 11, 2016, 10:46:20 pmHi, at the moment the only full solution for bidirectional ECAD MCAD integration is kicad StepUpYou can download the tools herehttps://sourceforge.net/projects/kicadstepup/files/latest/downloada good point to start ishttps://sourceforge.net/projects/kicadstepup/files/kicadStepUp-starter-Guide.pdf/downloadYour requirements areKicad stable or devFreeCAD 0.15 or 0.16Quote from: thommoa minimum experience in both environment is required to better understand the collaboration processQuote from: thommokicad StepUp will let you have a bidirectional ECAD MCAD collaboration... you need to use FreeCAD as a MCAD sw for an easier interchange.here a nice pdf on the collaboration processhttp://www.prostep.org/fileadmin/freie_downloads/Guidlines-UseCases/UseCases/ProSTEP-iViP_Use-Case_ECAD-MCAD-Collaboration_1.0.pdfI would suggest to have a look at kicad forumhttps://forum.kicad.info/t/kicad-stepup-new-exporter-for-3d-mcad-feedbacks-are-welcome/1048https://forum.kicad.info/t/how-to-interactive-align-3d-model-to-pcbnew-footprint-new-tool-for-kicad-in-altium-style/1711An other requirement is a library of MCAD 3D models to be used in kicad ECAD and in MCAD (FreeCAD and Solidworks)At the forum you can get a lot of useful infohttps://forum.kicad.info/t/3d-new-library-for-mechanical-cad-exporting-and-enclosure-design/1763Quote from: thommothat may depend on board size, number of components, size of enclosure, size of 3D MCAD models etc...I don't get normally more then ten MB with medium board and full 3D MCAD components...Consider you can convert to MCAD only relevant 3D parts (i.e. connectors or big parts, discard i.e. small resistors capacitors etc) and/or you can use bounding boxes for some 3D partshttps://hackaday.io/project/7926-kicad-stepup-script-hacks-mcad-worldfeel free to ask if you require any further informationMaurice

author: thommo
author_rank: Frequent Contributor
timestamp: March 14, 2016, 04:56:22 am
content: Thanks Easyw,Your instructions are crystal clear, and the first test worked perfectly.Another question that you may be able to answer from your practical experience;When creating a 'pair' of library items such as a Footprint and a 3D Model, what is the industry standard in relation to the Global Reference Position - eg 0.0 for the x.y axis?Can is be placed almost anywhere - eg. at the middle of say Pin 1, or the Top Left corner or, is it essential to place it in the middle of the component?The reason I ask this question is not so much to do with creating a PCB Layout, but rather when it comes time to manufacture the PCA.Is it important to place 0.0 in the center of the component so the the PnP machine knows where to 'place' the component on the board?If not, then how does it know the correct offsets?Thanks

author: easyw
author_rank: Contributor
timestamp: March 14, 2016, 08:47:16 am
content: Quote from: thommo on March 14, 2016, 04:56:22 amI'm glad my kicad StepUp tools worked fine for youQuote from: thommohave a look at herehttps://github.com/KiCad/kicad-library/wiki/Kicad-Library-Conventionhttps://github.com/KiCad/kicad-library/wiki/Kicad-Library-Convention#6-general-rules-for-footprintsPad 1 is on the left first, then at the top, except at the top for PLCC (IPC-7351).For through-hole components, footprint anchor is set on pad 1.For surface-mount devices, footprint anchor is placed in the middle with respect to device lead ends (IPC-7351).IPC-7351 is the refhttp://pcbget.ru/Files/Standarts/IPC_7351.pdfhttp://electronics.stackexchange.com/questions/44883/designing-pick-and-place-friendly-cad-library-partshttps://github.com/waynegramlich/pcb_footprints/raw/master/IPC-7351BNamingConvention.pdfCheersMaurice