VRML Export filter has born

Yes, PCB – the friend of gEDA can produce 3D model of your design. It can produce 3D board layout and it can assemble it with components (if the library of 3D component models is available).

VRML Export Filter is implemented as standard HID export filter. It creates single file (very big file) containing complete 3D model, without any external reference.

If you want to test it right now, please visit the Downloads and follow the download and installation instructions. To get better overview, to read the usage instructions and to check possibilities we offer to create 3D component library, please visit the VRML Export filter page. To see some nice images, please visit our gallery.

If you want to know more about the history and background, just continue reading…

Short history

The idea to implement VRML filter came to my mind in middle of 2010. I did some research and – thanks to very clear HID concept – I found the VRML export filter for board layout is easy to implement. The problem was with 3D models of parts:

  • there is no reliable mapping between component placed on board and its footprint definition located in library
  • there is no information about component rotation

This information is vital for populating the 3D model of board with components – we have first to identify, which model to use and we have to know, how to place the model on the board.

Several months later I tried to overcome these problems using very coarse methods:

  • scan footprint libraries for footprints, using name stored in one of text fields in component
  • identify the rotation by comparing the position of first pin/pad of component placed on board and it’s definition in the library

This method seems to be quite reliable, with minor issues.

The first board with some components was generated soon. Good time to test it with several VRML viewers.

The test results were – let’s say – disaster. The only working VRML viewer I found is Cortona3D VRML viewer, which I used to test the models. Unfortunately, this viewer is Windows-only. I did not find any Linux or multi-platform viewer, which implements VRML97 specification at acceptable level. Some viewers do not implement certain constructs at all, another viewers implement them with bugs (the most affected are extrusions and PROTO constructs). Most of viewers have limited number of child nodes.

Finding that after 15 years we still do not have reliable VRML viewer was very disappointing. It was good reason to stop work on VRML export filter. I was not very obliging to redesign it completely (replace all extrusions by facesets or replace the hierarchical structure by flat model), and because I could not be sure that I will get working model afterwards, I did not eager to waste my limited time. So I stopped.

But several months later I took the filter out of basement again. Well, we have only one functional viewer, but we have it. No Linux version? That’s bad, but lot of people has access to windows machine or Wine can help them.

So here it is.

Current status

VRML export filter is almost complete.

Model library contains model scripts to create several part types (and it will grow over the time). The scripts used to generate the library should be considered as examples only. I do not plan to create some kind of complete library which will fit the footprint library distributed with PCB. I do not use them and I guess that most of people do not use it either.

Due the limitations of VRML model (no CSG support) there are some workarounds implemented. For example the solder mask covers everything (PCB export draws the openings in mask, not the mask itself), all holes are visually simulated by dark cylinders penetrating the board.

The filter was not tested on very big boards, so I cannot guarantee that complex layouts will work properly and if such big models will be displayed by Cortona3D VRML viewer.

Future

I have some ideas to improve the VRML export filter:

  • better parametrization, possibly via preferences configuration file
  • extend the model/footprint library

The VRML 3D world is very coarse. Yes, it is interactive – it is its unique feature. It’s perfect to review your design in 3D. But the quality of image is unsatisfactory for presentation purposes. So next step is to improve the quality of the output using high quality renderer – povray.

The planed povray export filter will be very similar to VRML export filter. Similar concept, similar usage, common map files, compatible (at parameter level) model generators. Thanks to CSG (constructive solid geometry), rich material options and high quality rendering we should obtain quality images, suitable for printed documentation.

Stay tuned

Print Friendly