Re: [Kicad-developers] Segfault in X3D module parser (build 5041, did not happen in 5034) [PATCH]

2014-08-02 Thread jp charras
Le 01/08/2014 23:35, Mário Luzeiro a écrit : Sorry I found that too last night but I didnt had time to upload a fix. Would you (merger masters) would like to update my path attached in the trunk? it fixes the X3D missing color issue and add some small fixes and improvements. It added the

[Kicad-developers] Very inefficient loading of 3D models

2014-08-02 Thread Andrew Zonenberg
So I added a few print statements to my copy of the 3D viewer in order to figure out why the 3D viewer was so slow... The results were very interesting. http://pastebin.com/7s8gXVjY 1) There is no caching whatsoever! The VRML/X3D files are loaded from scratch each time they're instantiated in

Re: [Kicad-developers] Very inefficient loading of 3D models

2014-08-02 Thread Mário Luzeiro
Hi Andrew, You are right, it will be special noticeable for very large ( 10K faces) models. The major time consuming are now in normal calculation. The algorithm I had implemented IMO is good (probably can be optimized a little more) but it is a nature slow algorithm. (you can see lots of for

Re: [Kicad-developers] Very inefficient loading of 3D models

2014-08-02 Thread Andrew Zonenberg
I think one of the easiest optimizations is to add some kind of application-wide cache in RAM such that individual models are only loaded once (but still of course reloaded when kicad is restarted). It's OK to have O(n) load time for N distinct models, even with a large constant factor. What's

Re: [Kicad-developers] Very inefficient loading of 3D models

2014-08-02 Thread Andrew Zonenberg
The attached patch parallelizes per-vertex normal calculation using OpenMP. I see a nearly 4x speedup of model loading on my quad-core machine. This does not address the fact that models are constantly reloaded in lots of places they don't need to be. It's a band-aid on top of that problem but it

Re: [Kicad-developers] Very inefficient loading of 3D models

2014-08-02 Thread Mário Luzeiro
You can have a look the way the materials are implemented. (It create some kind of list with the material string name, and it will look for that string name when the tag USE are used in materials) I guess something can be make same way. for all modules if model.filename is not in the model

Re: [Kicad-developers] Very inefficient loading of 3D models

2014-08-02 Thread Tomasz Wlostowski
On 02.08.2014 20:30, Andrew Zonenberg wrote: The attached patch parallelizes per-vertex normal calculation using OpenMP. I see a nearly 4x speedup of model loading on my quad-core machine. Hi Andrew, Caching the meshes including normals on disk could speed up loading even further: - take

Re: [Kicad-developers] Very inefficient loading of 3D models

2014-08-02 Thread Andrew Zonenberg
Good idea. Let me work on getting a RAM cache working first, then we can update the load file from disk code later on. On Sat, 2014-08-02 at 21:35 +0200, Tomasz Wlostowski wrote: On 02.08.2014 20:30, Andrew Zonenberg wrote: The attached patch parallelizes per-vertex normal calculation using

[Kicad-developers] underlay for reconstructing boards

2014-08-02 Thread Cirilo Bernardo
I received a request for a feature some months ago.  The idea is to provide an underlay image to help people duplicate existing board designs, for example when duplicating old circuits to refurbish a device or to recreate the PCB artwork when all you have are old gerber files or perhaps printouts

[Kicad-developers] [PATCH] Anti-aliasing for the 3D-Viewer

2014-08-02 Thread Martin Janitschke
Heyho, please feel free to test and apply the attached patch for the 3D viewer. It'll enable anti-aliasing - if the renderer supports it with up to factor 8 (beyond this there was no difference in the subtracted images). The code also deals with the possible changes to the attributes array

Re: [Kicad-developers] underlay for reconstructing boards

2014-08-02 Thread Blair Bonnett
On 3 August 2014 12:09, Cirilo Bernardo cirilo_berna...@yahoo.com wrote: I received a request for a feature some months ago. The idea is to provide an underlay image to help people duplicate existing board designs, for example when duplicating old circuits to refurbish a device or to

[Kicad-developers] PATCH: export IDF without empty PLACEMENT section

2014-08-02 Thread Cirilo Bernardo
The attached patch prevents the IDF exporter from creating a file with an empty PLACEMENT section. Although not really a bug (the IDFv3 specification does not prohibit empty sections), SolidWorks/CircuitWorks segfaults on an empty PLACEMENT section. The patch was prepared against rev. 5044 but

Re: [Kicad-developers] underlay for reconstructing boards

2014-08-02 Thread Cirilo Bernardo
From: Blair Bonnett blair.bonn...@gmail.com To: Cirilo Bernardo cirilo_berna...@yahoo.com Cc: Kicad Developers kicad-developers@lists.launchpad.net Sent: Sunday, August 3, 2014 11:24 AM Subject: Re: [Kicad-developers] underlay for reconstructing boards On 3