← Back to team overview

kicad-developers team mailing list archive

Re: vrml_exporter vs 3d-viewer pcbboard polygon generation

 

The 3D Viewer and VRML exporter evolved separately (with the VRML exporter
borrowing code from the 3D viewer at times). When the VRML export was
rewritten a few years ago, the OpenGL canvas was still in its very early
stages of development. If I haven't forgotten too much, the 3D Viewer makes
use of some board outline code from the specctra exporter; I think the VRML
exporter did not reuse a lot of the code because either (a) cylindrical
edges were represented by very many line segments (outline from specttra
code) or (b) holes had too few line segments are were very obviously not
round. Since people were using the VRML exporter to create STL then STEP
models, I had to ensure that the VRML model had some constraints on the
error in the representation of cylindrical surfaces and that not too many
(large file) or too few points (bad mechanical model) were used.

- Cirilo

On Mon, Apr 13, 2015 at 9:58 PM, Mário Luzeiro <mrluzeiro@xxxxx> wrote:

> Hello Cirilo, Lorenzo, Jean-Pierre,
>
> I was trying to understand a bit more how the pcbboard is converted into
> polygons.
> I found that vrml_exporter is doing it in a very different (but similar!)
> way as 3d-viewer (boost based implementation).
>
> The vrml_exporter based is implementation on gluTess while the 3d-viewer
> is using the boost based implementation and looks that it reuses / follow
> the implementation used in other kicad parts, as pcbnew.
>
> Could you elaborate a bit more about this differences?
>
> Why vrml_exporter is using a different approach ? I believe it should get
> the same results in the end? Any story behind that?
>
> Another general question: What are the other renderings (Default/ OpenGL/
> Cairo.. etc) and exporters (GERBERS, Print, SVG, ... etc) are using?
>
> Lets say that I will implement a new rendering / exporter for whatever,
> what approach should I follow? I mean, what are the blocks (code) that I
> can reuse and rely on? (same boost pcbnew based?)
>
> Thank you for your clarifications!
> Regards,
> Mario Luzeiro

References