Le 02/01/2014 22:33, Cirilo Bernardo a écrit : > ----- Original Message ----- > >> From: jp charras <jp.char...@wanadoo.fr> >> To: kicad-developers@lists.launchpad.net >> Cc: >> Sent: Thursday, January 2, 2014 8:29 PM >> Subject: Re: [Kicad-developers] various patches >> >> Le 02/01/2014 04:27, Cirilo Bernardo a écrit : >>> Hi folks, >>> >>> I have put two sets of patches onto github for anyone to review or apply. >>> >>> The (bzr) patches: >>> export_idf3.patch : Adds basic IDF3 export (board and cutouts / holes >> only) >>> >>> export_vrml.patch : Improved VRML export; includes more realistic >> coloring scheme, zone fills, improved eye candy. This patch is better than >> the >> patch I previously posted here; this patch fixes a number of bugs, >> eliminates a >> redundant class, and provides features such as the zone fills and silver >> pads. >>> >>> URL: https://github.com/cbernardo/kicad-patches >>> >>> The patches are against Rev 4598. >>> >>> I would appreciate any comments on the patches. Personally I would like >>> to >> see the patches incorporated with the bzr source. The vrml patch includes a >> major rewrite of export_vrml.cpp and I'm confident users will find the >> results to their liking. >>> >>> - Cirilo >> >> I committed the IDF patch >> >> vrml patch needs to be tested. >> >> Thanks. >> >> -- >> Jean-Pierre CHARRAS >> > > > Thanks Jean-Pierre, > > What kind of testing is required for the VRML patch? I'm happy to do > whatever I can. > > I tested the VRML export on 3 boards which I designed, some test boards to > ensure certain features are tested such as oval pad at angles different from > 0, 90, and on all the boards in the demo directory. Almost everything is OK > except for a few erratic issues with rendering some features, but so far I > can find no big problems. The erratic features I noticed so far include: > > 1. On the pic_programmer demo board, some of the resistor silkscreen outlines > have a cone at the end rather than being flat. > > 2. On one of my own boards, the silk outline of a connector has a line > forming a triangle rather than a rectangle; all other of the same connectors > on the board have the outline rendered correctly. I suspect this is related > to (1) > > 3. On the video demo board some of the thru holes and pads are rendered > strangely - the track extends two points into the pad and the pad has a 'V' > shape cutout on either side of the track. > > I have been looking into these issues and will spend more time trying to > create a simple board which replicates the problems. In general the erratic > features are not very obvious and will not harm the appearance. The resulting > files load into the whitedune viewer and Blender. > > - Cirilo > >
In fact it needs 2 changes in vrml_board to be compiled on mingw (I exactly use TDM-GCC-32, with differs slightly from mingw 4.7, and uses gcc 4.8.1) 1 - in void SetGLError( GLenum errno ), errno collides a define in some mingw header. So change all occurrences of errno to something like error_id 2 - the callback functions like: void vrml_tess_begin( GLenum cmd, void* user_data ) are incorrectly defined. they must use the CALLBACK type modifier (see for instance 3d_basic_functions.cpp): static void CALLBACK vrml_tess_begin( GLenum cmd, void* user_data ) I included fctsys.h to define CALLBACK (defined in a mingw include file) #include <fctsys.h> I changed them to: #ifndef CALLBACK #define CALLBACK // On linux, CALLBACK is not used, and not defined #endif #define GLCALLBACK(x) (( void (CALLBACK*)() )&(x)) static void CALLBACK vrml_tess_begin( GLenum cmd, void* user_data ) { VRML_LAYER* lp = (VRML_LAYER*) user_data; lp->glStart( cmd ); } and later for each callback function: // set up the tesselator callbacks gluTessCallback( tess, GLU_TESS_BEGIN_DATA, GLCALLBACK(vrml_tess_begin) ); After that, all works fine for me. I suggest you to add holes defined by the board outlines. If you are using: BOARD::GetBoardPolygonOutlines() returns the external outline polygon, and a separate list of holes (polygons) (see 3d_draw.cpp) Thanks. -- Jean-Pierre CHARRAS _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp