Export Board VRML, then Re importing, not quite right

Hello, I’m well in to my first multi-board project, and i have been checking the fit of components by the 3D Veiwer,
To accomplish this, i have been exporting 1 board as a VRML, then assigning that model to a pad component,

So far the board displays fine, and any model that was not aligned to the model in freecad (stepuptools) shows up fine, but all the others appear to be spaced 2.54 times furthur apart than the board and the rest of the models.

To clarify the models are scaled correctly, but there spacing is far larger.

Any thoughts on how i can get around this quirk, I’m using Kicad 4.0.6, and Freecad 0.16

Why not use Step models of your board and check it in MCAD?

Kicad does not appear to have a step export option for the board?

“MCAD” i have only been able to find in relation to freecad, could you point me at which program your referring to.

The vrml for the board does display correctly in freecad if that makes any difference.

Use freecad in combination with kicad stepup
(This is an extension to freecad and allows you to import a pcb into freecad. It needs your components in step format of course.)

You can then simply export everything as step and import it to any MCAD tool you like.

1 Like

I am using Freecad, with the stepup tools, however for this, it seems to be a quirk related to either the part source files or kicad interpretation of the translation of its own export.

I would greatly prefer to get it working in Kicad internally, Because at this point all that i have to do is re-export a board vrml and it updates in the veiwer, rather than dancing through converting and shuffling after each change.

At this point i would ask if anyone knows of where the supported / unsupported features of the .VRML format are for kicad, I am more than willing to dig through my source models, as resaving them under freecad does not appear to resolve the problem, and i would assume kicad supports any part of the format it exports.

To clarify in the attached image, they appear fine and aligned in the original boards veiwer, but once exported and added to another board as a model it goes wrong.

in your image I see you have the daughter board with parts detached…
KiCad is not a multi-board EDA, then if you want to have the daughter board as a model inside the main board project, you need to export all the daughter board from FC with StepUp, not only the pcb.

2 Likes

I dug in to the source files and found the issue, its directly caused by a difference in how freecad saves vrml vs how wings3d does it,

Freecad does not assign an object or define children to that object, all that need to happen to correct it is to add under the comments.

To correct your freecad exported vrml files, open it in notepad++ and change the top from

#VRML V2.0 utf8
#kicad StepUp wrl exported

to

 #VRML V2.0 utf8
 #kicad StepUp wrl exported
 DEF cube Transform {
 	children [

Then add the matching brackets on the end of the file.
]}

I Understand this is not how the program is designed to behave, but it can be, and so it will be, I hope this info can help others.

To me its far easier to export a board as VRML with components, assign it and the enclosure to a fiducial as a model and offset. each time i update a sub board and re-export it updates on the main veiwer making for a very fast revision time. Now with this info i can fix my part library and continue with it.

1 Like

As a followup, now all my sub-boards parts show in the correct positions.

1 Like

Your issue is related to KiCad internal VRML parser.

But in general you cannot get distance and mechanical constraints using VRML

No ECAD is using VRML for mechanical integration.
The way is to collaborate from ECAD and MCAD through STEP models.
VRML is a format for just aesthetic purposes.

3 Likes

It does in the nighties

1 Like

But you have to have the STEP model not the WRML model defined for the footprint. StepUp will automatically exchange the WRML for a step model if it exists. (I hope this can be improved in KiCad).