Wrl not taken in footprint properties

I’ve seen a couple of threads about this issue, but not sure if those fit my needs…

I have a small PCB that I want to use as a “daughter board” for my main PCB. So, I used the export function in PCBNew to export to .step and also to .wrl.

.step doesn’t contain all the details, while .wrl does:

.step:

.wrl:

When I use the .step file when I compose my 3D model, I can see it in the 3D preview:
step_result

But when I want to use the .wrl file (because it has much more detail), it ain’t visible at all.

I know I had to give quite a big offset to the .step file to get it into position, but at least I saw it “somewhere” in space around the footprint.
The .wrl file, however, is nowhere visible. Even after several times playing around with offsets and so on…

Both files are generated from KiCAD itself, so one would assume they can both be used, correct?

Is it uberhaupt possible to use .wrl files? I thought it was, since I can see a nice preview when selecting it (see one of the images above).

Best,
–Geert

Can you see the wrl in the footprint preview

There is a 3rd option. Use StepUp with freeCAD and also pull in the track (and even silk) information and then export as STEP

I would probably also do this via FreeCAD (either with or without the StepUp workbench).

FreeCAD is a quite powerful program, but has quite a steep learning curve. It’s much harder to get started in it than with KiCad.

A simple thing you can do is upload your step and vmrl files here. Then I’ll try to open them in FreeCAD to see what they look like.

1 Like

Yes, the 2nd screenshot in my initial writing is the .wrl view in the footprint…

PS: I’ve never used anything like StepUp (read a bit about it though), so I will have to look on how to use this script…

Hi Paul,

I’ve attached both the .step as well as the .wrl file.

pca9548_adapter_gvc_1.step (1.8 MB)

pca9548_adapter_gvc_1.wrl (1.7 MB)

I can open both the .wrl and the .step file in FreeCAD.

The “origin” of both files is with the three RGB arrows (and balls) in the upper left part of the window.

These coordinates look about right for the way KiCad works.
In KiCad (0, 0) is in the upper left corner of the paper size, and your PCB is probably somewhere in the middle of the paper sheet.

Concerning offsets:
According to the KLC the origin of footprints should be the center for SMT parts, and Pin 1 for THT parts.

I also wonder why one of your screenshots has headers (square pins) while other screenshots do not. For this I would link the 2D model for the header to the connector in Eeschema, and then put them on the bottom of the PCB.

One way to fix your offsets is:

  1. Select the whole PCB.
  2. Movie it to the origin in Pcbnew.
  3. Export your files.
  4. Exit Pcbnew without saving.

I had similar problem when I started using Kicad and making models.

The problem (as I see it) is the Scale. As loaded into footprint, it’s far off the screen. If you set the scale to (0.39), that will bring it into view. Then, you can position it and Re-scale it…

[EDIT] Before you ask: The scale is 0.1inch/2.54mm = 0.394

Tried your suggestion but there’s not even remotely any sight of the “invisible” part… But you were successful with the part I created, looks like…
So why do you see the part and I don’t… Using KiCAD 5.1.2, by the way (forgot to mention this in my initial thread creation…).

My steps…

  1. opened the wrl in a viewer (could use FreeCad/other). I saw (as @paulvdh) pointed out, it was far away from the Origin.

  2. Knowing the above, Knowing the 3D-Footprint view shows a Fixed-Limited-Size that does not include stuff far from Origin (even when zoomed out) but, seeing it in a viewer as noted above,

it was a simple test to see if scaling would bring it into view. It did.

Doing a new export with the origin in a better location (preferable KLC compliant) seems a better idea to me.

You should not have to mess with either scaling or adding offsets. In the end the method I proposed is probably more robust and quicker too.

Agreed. My steps were simply to help identify issue (which is, model too far from origin)

@paulvdh: Paul,

What exactly do you mean with “the origin in a better location”?

I only have this:

vrml_export

I experimented a bit with X and Y offsets, but to me it’s for the moment more “shooting in the dark” than really knowing what I’m doing (I’m not a 3D guru as you might have guessed by now)…

The above export was a “lucky shot”: I could see the related PCB in a far distance in the 3D Settings preview of the Footprint editor and with lots of luck and patience, I could bring it to the other item that was in that same view. But I don’t think this is the way forward (I can hardly imagine it is…).

I’m willing to pick up to learn that FreeCAD stuff together with the StepUp tool to get to a decent and easy end result, but my lack of knowlegde of both apps is stopping me from going forward with this…

So, my question: could you - or someone else on the forum - advice me a good tutorial (on paper or on YouTube, it doesn’t matter) that can guide me from the beginning to the end through that process?

I’ve seen already quite a few tutorials on YouTube but the ones I’ve seen are really lacking a consistent ramp-up to go “from zero to hero”. They’re not detailed enough or going forward like crazy and I’m lost quite fast in such tutorials. Hope there’s some better ones out there that really give “noobs” like me the chance to pick up things and learn to understand how the whole mechanism is puzzled together…

I know, lots of requests but I’m afraid that’s the only way I can make progress in this field. It’s not the intention to become a “ninja” in this area, but I would like to be able to master the basic and simple things. At least…

Best,
–Geert

This is one of my “lucky shots”: a 2x 20pins header that will contain a “daughterboard”:

I deliberately left some space between the header and the PCB to show you that it’s really a “composition” of two different items (see the read arrow):

  • a standard header
  • a PCB I designed and then exported through VRML in PCBNew.

With lots of fiddling, I came to the above result. But I’m sure professionals like you guys will do this in a much more efficient way.
And if I could get to half the level you guys are at, I would be more than happy…

Best,
–Geert

I’ll try some .WRL export and document the steps as I go.

The PCB is a clone of the “Blue Pill”.
The project is not completely finished, so some parts are still floating around a bit.

In Pcbnew it looks like:

And in KiCad’s 3D viewer it looks like:
image

According to the KLC (KiCad Library Convention) chapter F7.1 the origin of THT parts should be located at pin 1. This makes sense to me, so I also do this.

(Few minutes experimenting with Pcbnew / Place / Drill and Place Offset but this seems to be a dead end, so abandoned).

Drag a box around your whole PCB:

Then zoom in on pin 1, and set the cursor close to the center of that pin, and press m to move the whole block.

Then zoom out with the scroll wheel, and move the PCB to the upper left corner of your paper (the grey lines).
image

Zoom in to get your PCB close to that corner, note the horizontal and vertical grey line ligning up with the PCB. Place your PCB there.

Pcbnew / File / Export / VRML.


Then to verify:
Start FreeCAD. (I used 0.19)
Start a new drawing in FreeCAD.
Place a Part in the document tree from the Part Design workbench, and make that part active (This adds a coordinate system to what you put in that “part” container.
FreeCAD / File / Import and get your .vrml file.

You can now use the "Transform** tool to verify the origin of your model. The transform tool shows the RGB arrows (for moving) and RGB balls (for rotating). It clearly shows that the origin of the VRML import is now close to the pin 1 mark of the PCB.

Note that this is a first experiment for me.
I’ve never done much with export of 3D form KiCad.
KiCad is also not a 3D drawing program, it’s a PCB design program. So what I did here was a quick tryout to confirm my suspicions (that the origin of the export is actually the paper origin). I’ve also not put the PCB at the exact correct location, I just eyeballed it. That is not what you want to do for a real design.

After this I exited KiCad without saving the (moved) PCB, just as I suggested in my earlier writeup.

There are still two things to experiment with:

  1. To move a block to a predefined coordinate (How do you use snap here?)
  2. Directly use the correct offset during export of the VRML file.

During the VRML export I saw the options to add an offset.
I’ll post this now, and add more infoif I have more to add after some more experiments.

This also works:

Click on pad nr 1 to select it, and press e for edit.
Then make note of the coordinates of that pin. Here it’s (127, 142.24)

Then: Pcbnew / File / Export / VRML and add those coordinates.
image


Method 3:
I’m still struggling a bit with the Move Exactly or the Position relative to from the Right Mouse Button popup menu. I do not like manually entering coordinates. My goal was (and still is) to select the whole PCB, then snap Pin1 of the connector and move that to (0, 0) on the paper before doing the export. I have not yet managed to do so however.

After a bit more experimenting…
I found a method to get the coordinates right.

  1. Select the whole PCB.
  2. Cut the PCB [Ctrl + x] or “Cut” from the popup menu.
  3. KiCad now asks for a Reference point. Snap to Pad 1 of the THT connector.
  4. Paste the PCB, which attaches the selected point to the cursor.
  5. Zoom in at (0, 0) and place it there. Make sure the grid is set to some coarse value (1mm is nice and easy).

@paulvdh: Hi Paul,

I’m… speechless… I don’t know how I can show my gratitude to you for all the work you’ve put in this… One word: fantastic!

I tried all your scenarios, with mixed results… :wink:

Scenario 1:

I tried this, but when I selected my whole PCB and then moved it, I lost all my routing for a reason so far unknown to me… Since I didn’t want to throw away a days work it took to route everything, I abandoned this path.

Scenario 2:

This was, at least for me, hitting the jackpot! It’s the easiest method and I don’t have problems typing over one or two numbers. It takes far less time than messing around with the non-corrected coordinates and then chasing half a day for that board in the footprint preview. And oh boy, if you then have to turn that board around one of its axes… Then all hell breaks loose… No, then I prefer to input two simple numbers…

Scenario 3:

Was also not working for me… Ctrl-x was indeed asking for a “new” reference point but when I pasted the stuff, not only were the routes gone, the whole PCB was gone… :unamused:

Conclusion:

Solution 2 is for me the way to go. The only thing I need to mention is that I had to scale every coordinate to 0.39 (something that someone in this thread also mentioned). Otherwise, the daughterboard was waaaay to big to even fit in the preview screen. But with the scaling, everything fitted perfectly.

Again, thanks very much for your time and effort. Should you ever come to Belgium, I’ll buy you a beer. And believe me, we have lots of different beers in Belgium. Not speaking out of experience (I’m not drinking any kind of alcohol) but that’s what Belgium is famous for (among other things, of course… :smile:).

Unless you’re Belgian, then you know yourself, don’t you…

Best,
–Geert

Both Scenario 1 (move) and 3 (Cut and Paste) rely on you being able to select everything in a single selection. Apparently there is something missing in that department.

A better solution would be to specify an origin (maybe the auxillary thing) for file export.

The beer is … tempting. It’s less than an hour to hop over the border, even with my crummy bicycle. I used to go sports climbing in Dave / Freyr / Les Awirs / Hotton / etc, and those weekends were never without beer. I still don’t care much for dinking beer alone though.

Good to know… :wink:
I’m living near the coast, so that’s more than one hour with my even not-so-crummy bicycle… :slight_smile:

Below are some results using your scenario 2:

The initial image I added to the beginning of this thread has now become like so:

Frontview:

Topview:

and the result now on my Raspberry Pi backplane:

Exactly how I wanted it…

Thanks again!

Best,
–Geert

… forgot to also add my relais backplane with 3 daugherboards on it:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.