kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #01906
Re: Gerber problem
2008/10/24 izioot <iziot@...>:
>
> Hello
>
> I have a problem with 'user' rotated components.
> When a pad is rotated it will be plotted as a polygon to the gerper file,
> and the polygon shows as a triangle in batchPCB's DRC-bot. Dont know if it
> will make it to the board, but it can be fixed by appending first coordinate
> to the polygon.
>
> I cannot get kicad to build because of some linking errors.
> Could someone build a fixed pcbnew so I can proceed with my board?
>
> Kind regards
> iziot
>
>
> DOESN'T WORK
>
> G36*
> X48341Y-37741D02*
> X48659Y-38059D01*
> X48483Y-38235D01*
> X48165Y-37917D01*
> G37*
>
> plotgerb.cpp
> /***************************************************************/
> void PlotPolygon_GERBER(int nb_segm, int * coord, bool fill)
> /***************************************************************/
> {
> int ii;
> wxPoint pos;
>
> fputs("G36*\n", dest);
> pos.x = *coord;
> coord++;
> pos.y = *coord;
> coord++;
> UserToDeviceCoordinate(pos);
> fprintf( dest, "X%5.5dY%5.5dD02*\n", pos.x, pos.y );
> for( ii = 1; ii < nb_segm; ii++ )
> {
> pos.x = *coord;
> coord++;
> pos.y = *coord;
> coord++;
> UserToDeviceCoordinate(pos);
> fprintf( dest, "X%5.5dY%5.5dD01*\n", pos.x, pos.y );
> }
>
> fputs("G37*\n", dest);
> }
>
>
>
> SEEMS TO WORK
>
>
> G36*
> X48341Y-37741D02*
> X48659Y-38059D01*
> X48483Y-38235D01*
> X48165Y-37917D01*
> X48341Y-37741D01*
> G37*
>
>
> /***************************************************************/
> void PlotPolygon_GERBER(int nb_segm, int * coord, bool fill)
> /***************************************************************/
> {
> int ii;
> wxPoint pos;
> char firstLast[50];
>
> fputs("G36*\n", dest);
> pos.x = *coord;
> coord++;
> pos.y = *coord;
> coord++;
> UserToDeviceCoordinate(pos);
> sprintf( firstLast, "X%5.5dY%5.5d", pos.x, pos.y );
> fputs(firstLast, dest);
> fputs("D02*\n", dest);
> for( ii = 1; ii < nb_segm; ii++ )
> {
> pos.x = *coord;
> coord++;
> pos.y = *coord;
> coord++;
> UserToDeviceCoordinate(pos);
> fprintf( dest, "X%5.5dY%5.5dD01*\n", pos.x, pos.y );
> }
> fputs(firstLast, dest);
> fputs("D01*\n", dest);
>
> fputs("G37*\n", dest);
> }
You should publish code changes as patches. For of a patch is much
easier to review and to implement in repository.
--
Manveru
jabber: manveru@...
gg: 1624001
http://www.manveru.pl
References