Tutorial - solidworks to 3D VRML/wrl or STEP/stp component


#21

It has never happened to me.
I don’t use the github repositories for normal use. I have a copy of the libraries in my hard disk. So I can’t help in that way.
Could you send a picture of the Footprint properties->3D settings of the footprint with the issue?


#22

That doesn’t prove anything to be honest. Solid works could simply have a more powerful wrl viewer than kicad. (But then again it is a good indicator that there is at least something there)

There is not really a global searchpath for 3d models. Every footprint sets up its own model in its “3d preferences” section.
The path setup in the footprints settings can use a path variable.
In kicad 4 the use of a path variable is implicit as it takes relative paths to be relative to whatever directory KISYS3DMOD points to. Absolute paths should however always work. (Using path variables “only” add to flexibility. But they also increase the problems you could face.)

The best way to be sure is by opening your footprint in the footprint editor. View it in the 3d viewer. If you see the 3d model there then the model is ok and the footprint is setup correctly.
If not then we can guess that either the model is not ok for use in kicad or the path is incorrect.
Lets investigate the path.

  • Open the 3d preferences of the footprint (the 3d settings part of the footprint preferences dialog)
  • click the add 3d shape button
  • a file browser opens. Navigate to your 3d model and select it.
    • double click or single left click on name followed by clicking open
    • In kicad 4 if you add a model from somewhere below KISYS3DMOD the resulting path will only contain the relative part compared to that variable.
    • In kicad 4 if you add one outside of where KISYS3DMOD points to you are asked if you want a relative path. (My suggestion would be to say no here as less can go wrong)
  • Click ok on the 3d preferences dialog.
  • Check the 3d viewer again. If you still can not see your model then there must be something wrong with the wrl file. (There are multiple standards for wrl. Only one of them is supported by kicad.)

The safest way to generate a valid wrl file is by using freecad plus kicad-stepup. (Meaning export your model as step from solidwors, import that into freecad and export valid files using stepup.)


Grids, Origins, Offsets, and Pitch
#23

Hello, Rene:

Thanks for working with me on this issue. There is some new information in this reply-

I should note (for the sake of anybody new to this Thread) that I am using KiCad v4.0.7 on an up-to-date Win7 Pro SP1 64-bit platform.

When reading through your reply, I tried to follow the instructions…
“Open the 3d preferences of the footprint (the 3d settings part of the footprint preferences dialog)”

It took some time to figure out that the '“footprint preferences dialog” referred to is in fact the Footprint Properties dialog (accessed via the Edit drop-down menu). [* see related footnote, at end of this Reply]

I have, In fact, been using the Footprint Properties dialog as you suggested. Last night (prior to receiving your Reply) I was continuing to grind through this problem, and discovered that one can view the PCB footprint and its associated 3d model---- independent of the PCBNew board you are creating---- using “View >>> 3D Viewer” .

That discovery was a big step in troubleshooting.

Having said that, I checked some of the 3d *.wrl models and their associated footprints I was having problems with. Viewed independently of the PCBNew project, the footprints and the *.wrl models were properly associated (but, alas, not always correctly scaled and oriented in 3d-space; the latter are details that I am not primarily concerned with in this Thread).

I also went so far as to create a dummy {footprint + *.wrl} association, created an entirely new KiCad project, a simple KiCad EEschema, and converted that into a dummy PCBNew.

At this point, I was able to autoroute the PCBnew using FreeRouting, import the *.ses Session file, and successfully view the routed board with models in place.

So far, so good…

I then fiddled around with the PCBnew project by selecting a footprint (right click; “Footprint on…” >>> Edit with Footprint Editor" .

This is when the process go sour (from my perspective). Let me elaborate:

  1. If I make any edits to the Footprint in this way, save the changes using Close >> Save and Exit, and revert to PCBNew those Footprint Editor changes are NOT reflected in PCBNew when I view the entire board in 3d Viewer.

  2. Returning to the Footprint >> Edit with Footprint Editor dialog, I discover that my changes have not, in fact, been saved – even though there have been no indications of any error in the SAVE process, and even though I am choosing to Edit the footprint that I am seeing locally in this particular PCBNew.

  3. If, having saved the Footprint as I previously noted, I return to any of my other KiCad Projects which use this footprint, the saved changes that I made to the footprint are not reflected in the models. From all indications (paths show during the Edits), I am editing the footprint in my Custom library, which is the path to ALL of the footprints used in each of the KiCad projects where the part changes are not reflected by Footprint Editor changes.

So, what am I missing here?

[ Footnote * : From PCBNew, when selecting a Footprint using right-click, Footprint…>> Footprint Parameters brings up a dialog box titled Footprint Properties (not ‘Parameters’). I know that KiCad is a non-commercial, community project with limited development resources, but I’d say that inconsistencies in terminology such as this add steepness to the learning curve, and contribute to a lot of confusion in the Forum discussions]


#24

I should note that I am not using the KiCad libraries on GitHUB directly. To be clear: I am using those GitHub libraries that were copied over to my hard-drive during the KiCad installation process. What I was trying to refer to in this case are libraries which I, as the end-user, did not create myself.


#25

I think your main problem has been already hinted at above.
Pcb new creates a “cached” footprint inside its file header for every footprint added to the pcb. So if you change a footprint in the library it does not affect any of your projects. (This is on purpose to protect old projects from future library changes.)

The “edit with footprint editor” stuff opens the footprint from the pcb cache. But saving it to a library does not change it in the pcb. For that you would need to use the “update footprint in current board button”.

If you however want the footprints of all your projects updated then the suggested way to do this is by opening the footprint editor from the kicad main menu. In the footprint editor then open the footprint you want to edit. First set the library containing your footprint as active then use the open footprint button to load the footprint from the library. (use list all or the browser option for that.)

Make your changes and save the footprint to the library.

Now for every project where you want to update the footprint you need to do the following. Hover your mouse above the footprint in question, press e (or right-click preferences) -> click change footprint -> select “change footprints [the footprint name]” -> select apply. (In kicad 5 this will be more intuitive as there is a separate dialog to update footprints from the library.)


I assumed you will be doing your changes inside the footprint editor. There it is called Footprint properties.


#26

Ahhhh…
OK, it certainly was not obvious that there is a Cache inside of each project that protects that project from outside influences (such as changes to the footprints and *.wrl files that were made in other Projects, or even at the Library level). I can understand why this might be the case (falling under the general topic of “version control”).
With this new perspective (…thanks for your patience…) I should be able to get my head wrapped around the work-flow for these editorial changes.

It does sound like the ‘soon-to-be-released’ V5 will have significant improvements in many different aspects. Hopefully, the work I’ve put into learning V4 will set me up for a better grasp of V5 (?).


Grids, Origins, Offsets, and Pitch
#27

To clear something up: The wrl files are not cached. only the footprints are. This means if you change the wrl file and after that look at an old project, the 3d view might be broken.


#28

You’ve hit the nail squarely on the head; that is precisely what seems to be happening.

I think the confusion here results from another example of loose terminology, which I will elaborate here:

In the Footprint Editor, the user can associate and edit the 3d model associated with the 2-d footprint and so, in this sense, “the Footprint” implicitly and functionally includes the 3d model.

Now that you’ve explicitly revealed that the cached “Footprint” only contains the 2d information (silkscreen perimeter, hole dimensions, and pad diameter and so forth ---- totally excluding the 3d model that is implicitly & functionally part of the Footprint via application of the Footprint Editor), it is clear that “Footprint” has different definitions, depending on context!


#29

Just to make absolutely clear that you did not misunderstand something again:
Only the 3d model it self is not cached. (The wrl or step file) The settings (path to the model, scaling, offset and rotation) are part of the cached footprint.
It might even be worse with the 3d settings when compared with other parts of the footprint definition. I had problems in the past to get pcb_new to update the footprint if i only changed the 3d settings. The solution then was to also change something else. (Example: Move the reference field by a small amount)


Meaning the wrl file is not part of the footprint. It is completely separate. (Similar to how symbols are separate from footprints.) In fact multiple footprints can reference the same 3d model. And a footprint can also have multiple 3d models assigned.


#30

“Oh, what a tangled web we weave…”