← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Fix to closing polylines in DXF imports

 

I can not try the patch here now, but maybe this can fix the issue
mentioned in this thread:

https://forum.kicad.info/t/gerber-to-footprint/435

DXF file linked in https://forum.kicad.info/t/gerber-to-footprint/435/13


2015-06-18 16:29 GMT+02:00 Marco Hess <marco.hess@xxxxxxxxxxxxxx>:
> Following up on recent previous discussions and patches re. DXF import, here
> is a patch that fixes the problem of imported ellipses remaining an open
> shape.
>
> The DXF format polylines and lwpolylines have a 'flags' field of which bit 0
> indicates if the polyline/lwpolyline is to be closed or open. This flags
> field is correctly read during the import but in the conversion to board
> segments, was previously not used.
>
> This patch remembers the start of the polyline and then after processing all
> segments it check bit 0
> of the flags field. If the bit is set to 1, an extra closing segment is
> generated between the last segment endpoint and the remembered polyline
> start point.
>
> Also attached a ellipses DXF in R12 format exported from LibreCAD that I
> used to test this patch. It clearly shows the open segment when imported.
> With the patch in place the DXF imports correctly shows as a closed
> polyline.
>
> Regards,
>
> Marco
>
> --
> Marco Hess
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References