Export WRL for KiCad 4.0.6 so Kicad understands colour info?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
Post Reply
sjb
Posts: 60
Joined: Thu Apr 27, 2017 10:40 am

Export WRL for KiCad 4.0.6 so Kicad understands colour info?

Post by sjb »

Is there a way to tweak the FreeCad WRL export so KiCad sees the correct colours?

I can export/import WRL into FreeCad, and colours are consistent.

Also, existing KiCad WRL files look correct in FreeCAD (same colours seen in FreeCadf and KiCad).

However, if I create a shape in FreeCad, then export to WRL, KiCad does not respect the colours.

There must be a format difference / WRL version which KiCad cannot handle?
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Export WRL for KiCad 4.0.6 so Kicad understands colour info?

Post by easyw-fc »

sjb wrote:Is there a way to tweak the FreeCad WRL export so KiCad sees the correct colours?

I can export/import WRL into FreeCad, and colours are consistent.

Also, existing KiCad WRL files look correct in FreeCAD (same colours seen in FreeCadf and KiCad).

However, if I create a shape in FreeCad, then export to WRL, KiCad does not respect the colours.

There must be a format difference / WRL version which KiCad cannot handle?
have a look at kicad StepUp
this is a Macro & WB to manage at best FC & KiCad interchange

have a look at the forums
https://forum.freecadweb.org/viewtopic.php?t=14276
https://forum.kicad.info/search?q=step
and here a post on 3D mechanical lib
https://forum.freecadweb.org/viewtopic.php?f=24&t=20892

and some instruction on KiCad site about WRL
https://github.com/KiCad/packages3D/blo ... /README.md

Maurice
sjb
Posts: 60
Joined: Thu Apr 27, 2017 10:40 am

Re: Export WRL for KiCad 4.0.6 so Kicad understands colour info?

Post by sjb »

Hi Maurice,

(Thanks for your suggestion. I already have StepUp - nice tool, I look forward to the ability to render tracks - especially if the currently highlighted net could be made to highlight!)



However - for this question, I'm after a solution which does not involve StepUp - just FreeCad and KiCad.

I find that a .STP file downloaded from Würth Elektronik
http://katalog.we-online.de/led/downloa ... 8-rev1.stp
which is firstly opened in FreeCad, then exported to WRL looks fine in KiCad

However, my own part (created in FreeCad), and exported to WRL seemed to lack colour information (or something...)

What I think is happening is this:
The direct export (select FreeCad object | Export to WRL) turns the object "inside out" (!). However - If you first export the FreeCad object to .STEP, then import and finally re-export to WRL, it is correct.

Here is the view in the Kicad 3D engine
Direct and indirect WRL exports.png
Direct and indirect WRL exports.png (13.39 KiB) Viewed 2492 times
Last edited by sjb on Fri Apr 28, 2017 1:40 pm, edited 2 times in total.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Export WRL for KiCad 4.0.6 so Kicad understands colour info?

Post by easyw-fc »

sjb wrote:Hi Maurice,
(Thanks for your suggestion. I already have StepUp - nice tool, I look forward to the ability to render tracks - especially if the currently highlighted net could be made to highlight!)
there will be the ability to render tracks... not useful for mechanical collaboration ... so probably that will be considered only for thermal analysis
sjb wrote: However - for this question, I'm after a solution which does not involve StepUp - just FreeCad and KiCad.

I find that a .STP file downloaded from Würth Elektronik
http://katalog.we-online.de/led/downloa ... 8-rev1.stp
which is firstly opened in FreeCad, then exported to WRL looks fine in KiCad :)

However, my own part (created in FreeCad), and exported to WRL lacks colour information :(

What is the explanation for this?
1) quite difficult not having the 3D STEP file and the WRL file...
and which FC version are you using?

2) please consider that StepUp can be used to convert the board and models to STEP, but also you can use StepUp to convert the STEP/MCAD model to WRL with a wrl fully compliant to KiCad 3D viewer
https://forum.kicad.info/t/alignment-of ... int/6231/8
here a video to align a STEP model to footprint inside FC and export STEP & WRL aligned to kicad fp, ready for kicad 3D viewer
https://www.youtube.com/watch?v=O6vr8QFnYGw
(the new Gui is much easier to be used)
Maurice

EDIT:
would you mind to share the model

EDIT2:
what do you select when exporting the model?
sjb
Posts: 60
Joined: Thu Apr 27, 2017 10:40 am

Re: Export WRL for KiCad 4.0.6 so Kicad understands colour info?

Post by sjb »

not useful for mechanical collaboration
It is useful (to me anyhow)...

In my case, I have a Kicad prototyping board where I need to show how to use the various features (example: the solder-bridge pads). Also, I'd like to show the end-user the route a selected track makes (including vias). In particular, it would be useful to be able to show a highlighted, 3D view of the D+ (or D-) track on the USB connector. This would help me illustrate how to use the board.

OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
SBlob4.FCStd
(14 KiB) Downloaded 33 times
ZM_SMD_r01_Usage.png
ZM_SMD_r01_Usage.png (61.01 KiB) Viewed 2467 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Export WRL for KiCad 4.0.6 so Kicad understands colour info?

Post by easyw-fc »

sjb wrote:In my case, I have a Kicad prototyping board where I need to show how to use the various features (example: the solder-bridge pads). Also, I'd like to show the end-user the route a selected track makes (including vias). In particular, it would be useful to be able to show a highlighted, 3D view of the D+ (or D-) track on the USB connector. This would help me illustrate how to use the board.
StepUp is aimed to ECAD/MCAD collaboration, not for making documentation...
you can achieve something like what you need just producing a screenshot in KiCad and fill the tracks you need to highlight with a different color in an image editor...

There will be a tracking conversion maybe later on because that feature can be useful in thermal analysis, but this will not be in little time...
PS the file size would increase tremendously because of tracks and pads presence
Post Reply