Testing needed: new 3D plugin

Cache files will persist to let you a fast loading of the 3d render…
May be a menu option to clean these files on request would be useful to just throw away old cached files and refresh the cache

1 Like

Some method of clearing the cache to avoid stale entry errors is always a good idea

It’s a tricky issue. When you browse for parts now a cache file is created for every model you look at. Deleting after closing the program will cause more computations later to restore the cache files which are needed. For VRML models that’s generally not an issue, but for STEP models that can take a long time. I think maui’s suggestion is best - create some menu item to delete all the cache files.

3 Likes

Why can’t kicad just autoclean it after some time, like when the cahce files are one month old for example?

Then the disk usage would not be monotonically increasing and you not need to take care of it manually.

1 Like

That would be a nice option, but still a manual clean all would be a useful feature

1 Like

Okay so I compiled kicad and I managed to compile kicad_oce_3d, then I moved the libs3d_plugin_oce.so to the /usr/lib/kicad/plugins/3d, next to the ones already there.

I then went to freecad, created a cube and exported to .step. Then I went into a random testproject, added a component and added the exported step file to the 3d settings of the component. I cannot see the 3d model in 3d-viewer.

I also get the error when entering the properties of the schematic component:

/opt/vtk6/lib/libvtkRenderingOpenGL.so.1: undefined symbol: _ZTI23vtkPainterDeviceAdapter

When starting kicad from the command line I get:

13:32:54: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1009,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1010,wx containers,compatible with 2.8).

I am using manjaro-linux and built kicad from the aur package kicad-git, and built the OCE plugin from github by creating my own FindOCE.cmake file

Does kicad itself work? The ABI warning suggests that something was built with different versions of compiler, but it is not clear what (maybe kicad vs wxWidgets).

How was FreeCAD installed and are you using the same OpenCascade or a different one?

The ABI is not the issue. I have that on archlinux, which manjaro are using packages from and I have not seen any issues. It is simply a warning and is not related to the plugin at all. but I don’t understand why @TotalKrill has made his own FindOCE.cmake file. It is a long time since I built it, but I think I just did build it by defining OCE=/opt/oce and OCE_DIR=/opt/oce/lib/oce-0.16 for cmake. I am using the oce package from the AUR.

@nickoe There where no OCE cmake files for manjaro, I did however use the opencascade version from the package manager, so maybe that the issue. The version opencascade version I am using is 6.9.1-2.

Kicad itself works, I have not tested it thorougly since I compiled it last, but ive seen no problems except the warnings mentioned.

Have you associated a footprint with a size similar to the cube and are you sure the cube is near coordinates (0,0,0)? If a model is very far from the origin you may never see it. If a model is too big or too small you may also never see it. I need to do some testing sometime to make sure that the image can always be scaled so that it is visible.

There are some logging options which we can also activate; these are only useful of course if you run pcbnew on the command line. A ridiculous amount of information will be written but it might give you some idea about what is going wrong.

Logging can be activated by exporting the appropriate tags to activate the logging that you need. In this case there are two possible ones:

export WXTRACE=PLUGIN_OCE

That will activate logging on the OCE plugin only; hopefully the output can indicate whether the plugin has processed the STEP file successfully or not.

The other place where there may be problems is the scenegraph library:

export WXTRACE=3D_CACHE

Activating that option will flood the console with messages; it’s best to redirect to a log file and read it later, for example:

pcbnew testfile.kicad_pcb 2>mylog.txt &
tail -f mylog.txt

If it’s helpful for whatever reason you can activate both at once:

export WXTRACE=“3D_CACHE,PLUGIN_OCE”

1 Like

FYI, the OCE plugin that provices STEP and IGES 3D viewer support has recently been merged in the official kicad development branch. I have now enabled in for the windows nightlies, so it should be available tomorrow.

3 Likes

If i build for linux, do i need to enable any flags?

Yes, as documented in the devdocs, you need to enable it with the cmake option -DKICAD_USE_OCE=ON.

EDIT: it is ON not O… I mispelled initially.

Ah, where do i find those devdocs?

Here’s the CMakeList: https://github.com/KiCad/kicad-source-mirror/blob/master/CMakeLists.txt. @nickoe may be referring to something else in a better place, but I can’t find it…

I found this place, I suspect theese are the devdocs mentioned:
http://ci.kicad.org/job/kicad-doxygen/ws/Documentation/doxygen/html/md_Documentation_development_compiling.html

Yes, it should also be in the project directory in Documentation/development/compiling.md, although the original md doc may look a little strange to humans.

Nice, I tested it but found, that real rendering ist not possible without a lot of work.

I used VRML and found problems regarding coulouring and link between objects and colours.
Also a lot of models are missing, although present in the libs.

already the internal 3D viewer did not show them.

Ist there more activity planned?

j

I’m not sure what you mean. The development code has had the plugin system and the new 3DViewer for many months now. If there are specific cases of VRML models that don’t work correctly, you should report these on the bug tracker, include a VRML model which doesn’t work, and some screenshots of what is seen in kicad vs what the model should look like.

Hello, it is direct VRML export. I am not sure what I can adjust there in order to get it running. Interestingly the built in models are missing. See an image here:

http://www.mikrocontroller.net/topic/417380#new