Testing needed: new 3D plugin

For those people who can build from source, and especially those with some programming experience, the KiCad development branch has recently introduced a plugin system to support 3D models. The current plugins support VRML1/2, X3D, and IDF formats and the 3D model browser now has a preview panel for these models.

There is also an out-of-tree plugin project to support STEP and IGES models via Open Cascade Community Edition (OCE):

I need some help from developers to ensure that the OCE plugin builds on MSWin and OSX. Methods need to be established for installing OCE and building the plugin on these systems; depending on whether or not suitable OCE installers are already available for those systems, we may need to build OCE for distribution as well.

At the moment the 3DViewer itself cannot display all of the models available via the plugin system since it needs to be rewritten to use the data structures which are used by the plugins. Mario Luzeiro is working on the new 3DViewer and we need some feedback on his branch:

https://code.launchpad.net/~mrluzeiro/kicad/kicad_new3d-viewer

Within Marioā€™s branch you will actually see the STEP/IGES/IDF/VRML{1,2}/X3D models within the 3DViewer. Since this is a complete rewrite of the viewer, it does not quite have all the features of the current viewer and of course needs people to test and help find bugs. This is a very large change in the code base so extensive testing will be necessary before a proposal can be made to merge the changes with the main KiCad branch. Volunteers are working on an automated build of this branch for a number of systems (OSX, MSWin, maybe a few variants of Linux) so hopefully in the near future we can make an announcement of prebuilt installer packages.

5 Likes

:heart_eyes:

ā€¦and here are your 20 characters.

On Linux is very easy to build,
if you want to build it in a temporary path, here are my guidelines:

bzr branch lp:~mrluzeiro/kicad/kicad_new3d-viewer
mkdir -p kicad_new3d-viewer/build/release
cd kicad_new3d-viewer/build/release

cmake -DCMAKE_BUILD_TYPE=Release
-DKICAD_SCRIPTING=OFF
-DKICAD_SCRIPTING_MODULES=OFF
-DKICAD_SCRIPTING_WXPYTHON=OFF
-DMAINTAIN_PNGS=ON
ā€¦/ā€¦/
make DESTDIR=/tmp/kicad install -j4
(change 4 for the nr of CPUs you have)

Then you can run individually:

LD_LIBRARY_PATH=/tmp/kicad/usr/local/lib:$LD_LIBRARY_PATH /tmp/kicad/usr/local/bin/pcbnew
or
LD_LIBRARY_PATH=/tmp/kicad/usr/local/lib:$LD_LIBRARY_PATH /tmp/kicad/usr/local/bin/kicad

This similar approach will work for the kicad_oce_3D (you need to use same paths for the DESTDIR) but just use the appropriate cmake file as described in the Cirilo project.

Iā€™m running Mario release on windows 64, without any issuesā€¦ I donā€™t see any feature missing, the only 3d-viewer feature I cannot see in the new 3d-viewer is the Render Texture option, related to some minor visual aspect of the pcb boardā€¦ Am I missing something?
Moreover the new 3d-viewer offers some new features like a movable pivot center of rotation and selection of 3d models to be displayed (SMD, TH, Virtual) and raytracing view for a nicer rendering :slight_smile:
@cbernardo unfortunately, at the moment, Iā€™ve not found a way to build kicad_oce_3D plugin under windows
I can build python oce in mswin, but not the pluginā€¦ suggestions would be appreciate :smiley:

The only feature I believe is missing is the Grid.
I was wondering what people thing of the Grid. Personally it doesnā€™t work for me. How are other CADs are implementing the Grid?
With the Kicad Grid I cannot have any meaning / size looking in the grid.(there is also no visual scale, numberingā€¦ )
Any suggestions?

Let me know if other important features are missing.

I didnā€™t implemented some visual things from old viewer on this openGL target. (eg: textures, shadows, etc)
Since that are a visual enhancements, I was thinking to apply the efforts in the Raytracing render targetā€¦ as it should result in a better improvements .

that I missed ā€¦ I donā€™t use the grid but I think someone may use it to have a quick idea of the dimensions


I have it off and never use it.

@kammutierspule
Usually there is a ruler tool in CAD software, where you can click on planes/cylinders/circles/edges/vertices and then to the next and depending on the algorithm it will try to give you perpendicular spacing or just shortest distance or if you didnā€™t click on something else then the determining value for circle (radius) and line (length).

PS: I donā€™t have a grid active in Inventor eitherā€¦ at least it would be in the way if it was snapping and itā€™s not needed for visualization - everything is constructed using constraints and dimensionsā€¦ grid is way to restrictive.

There is a build available for windows on http://downloads.kicad.org/windows/testing/kicad_new3d-viewer/, but I have not yet made it build the out of tree https://github.com/cbernardo/kicad_oce_3D plugin. I will have to checkup on that later, but at least Marioā€™s work can be tested meanwhile.

1 Like

Thanks @nickoe!
You can try it now @Joan_Sparky :wink:

1 Like

I downloaded, but didnā€™t had time todayā€¦ will give it a whirl tomorrow.
Thanks to everyone involved for making this possible!
:thumbsup:

Marioā€™s latest changes use his new 3DViewer to provide the preview in the Footprint Properties dialog. This means the preview now has a board with the componentā€™s footprint on it so you can adjust the location (and scaling of VRML/X3D models). For those of you who may be using the OCE plugin, just remember that scaling an MCAD model is not a Good Thingā„¢. Wait a day or so for the nightly builds to catch up, or if you build your own code you can just pull in the latest.

1 Like

Here is a screenshoot of the feature:

4 Likes

Does these 3D Viewer have a Defaults option?
I kinda screwed colors and views.

Hi @luftek, what do you mean by default option?
The first time it starts the 3d-viewer it will run on default options, then you can change your option.
The footprint preview, is running in a fixed default options (you cannot change it)

What do you mean with the colors and views?

which 3d models are you using?
many official 3d models have bad material properties, and if they are enabled, youā€™ll get ā€˜badā€™ appearance


EDIT it seems you are not in realistic mode :smiley:

I want Default settings for 3d Viewer. Settings that are now in my case:


:slight_smile: I want back default green colour of pcb and reset settings for view.

I see there are a lot of new options. I will explore them. But want a dedicated button to reset to Default (First run) settings for 3D Preview

check realistic mode

maybe I could delete settings for preview?
I donā€™t want these ugly red no more

At this moment there are no reset defaults.
However, you can go to choose again the colors and you will find the default pallet, so you can choose your color from the defaults.

The ā€œPalette:ā€ have the default colors used by 3d-viewer:

1 Like