← Back to team overview

kicad-developers team mailing list archive

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

 

I find it strange that the DXF import dialog will not allow import as
tracks on the copper layers.  I think that can be usefull, and it would
also be good to be able to import it as a zone somehow. It does not look
like a zone can be locked like footprints can. But I think that is not that
important, it is still usable without that constraint.   And to keep the
exact shape for the antenna case, it is of course up to the designer to
make sure other zones and whatever does not disturb the fill.

2015-06-18 17:21 GMT+02:00 Marco Hess <marco.hess@xxxxxxxxxxxxxx>:

>  Looking at this some more, currently DXF polylines import as line
> segments that end up as gr_line items in the
> PCB file.  I don't think that can be used for copper.
>
> For a proper copper area, it will need to be imported as something else
> and that needs changes in the dxf2brd handling.
>
> Question is more about what the best copper type item is to use for
> something like that.
>
> A polygon fill area? But this possibly needs to able to be locked in shape
> so not to mess up the dimensions by accident.
>
> Then other than a copper layer selection, it may also needs a net
> selection on the import?
>
> Is there something better than copper fill?
>
> Marco
>
>
> On 19-Jun-15 00:36, Marco Hess wrote:
>
> I can successfully import that DXF. It shows as an outline.
>
> I guess that for its intended purpose as an antenna, it would need to be
> able to be imported on a copper layer as a fill area?
>
> Marco
>
>
> Currently copper layers are not avaia
>
>
>
> On 19-Jun-15 00:22, Nick Østergaard wrote:
>
> 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> <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
>
>
> --
> Marco Hess
> Through IP Pty. Ltd. - AUSTRALIAwww.through-ip.com  | marco.hess@xxxxxxxxxxxxxx
> p: +61 407 78 55 66 | f: +61 8 8121 6191
>
>
>
> _______________________________________________
> 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
>
>
> --
> Marco Hess
> Through IP Pty. Ltd. - AUSTRALIAwww.through-ip.com  | marco.hess@xxxxxxxxxxxxxx
> p: +61 407 78 55 66 | f: +61 8 8121 6191
>
>
> _______________________________________________
> 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
>
>

PNG image


Follow ups

References