← Back to team overview

kicad-developers team mailing list archive

Re: dxf: import 4 arcs

 

Thanks a lot Maurice,
so the solution for a complex outline is to draw it directly in librecad.
Its good to know that exporting to R12 is not bulletproof. I don't see
exporting upgrades coming into freecad, or polyline support coming into
kicad either.

As Cirilo told us, it seems reasonable to me that the mcad could reduce the
representation to a more complex (and simpler at the same time)
representation.

A 'cheap' improvement would be to add a warning in the import dialog saying
"polyline not supported". It would narrow down the problem for the user,
right now all the feedback we have is a shape with lines instead of arcs.

Its interesting that it doesn't totally fail, the import actually manages
to draw lines with the correct start/finish points, it only loses angle
information, see attached.


Marcos

On Wed, Sep 9, 2015 at 6:24 AM, easyw <easyw@xxxxxxxxxxxx> wrote:

> Hi Marcos and Marco,
>
> please find attached the dxf that I did from scratch using 4 arcs in
> LibreCAD
> I copied manually the path from palta2.dxf, then exported in dxf R12
> The result is fine in kicad and I get a closed path also for Edge cuts.
>
> in kicad there are 4 arcs
>   (gr_arc (start 178.564202 123.937945) (end 153.273203 83.107373) (angle
> -26.04011298) (layer Edge.Cuts) (width 0.1))
>   (gr_arc (start 156.68577 88.642784) (end 162.837792 90.749678) (angle
> -140.5586133) (layer Edge.Cuts) (width 0.1))
>   (gr_arc (start 196.246745 102.229265) (end 162.837792 90.749678) (angle
> -22.2858684) (layer Edge.Cuts) (width 0.1))
>   (gr_arc (start 148.500893 105.004408) (end 137.915937 98.354967) (angle
> -215.4739741) (layer Edge.Cuts) (width 0.1))
>
> If you search inside palta2.dxf you find POLYLINE that are not supported
> by kicad
>
> attached a comparison of dxf files
>
> I suspect that the problem is when exporting dxf from FreeCAD...
> I had some trouble with a different board path exported from FreeCAD...
> In FreeCAD you cannot select which version of dxf you want to use, if I
> remember correctly...
>
> Maurice
>
>
>
>
>
>
>
>
> On 09/09/2015 07.43, Marco Hess wrote:
>
>> Definitely a problem with the DXF importer I would say as the resulting
>> data in the PCB file are just  straight line segments:
>>
>>    (gr_line (start 42.68541 28.017695) (end 52.25 35.66) (layer
>> Edge.Cuts) (width 0.1))
>>    (gr_line (start 27.328145 43.265288) (end 42.68541 28.017695) (layer
>> Edge.Cuts) (width 0.1))
>>    (gr_line (start 50.392159 49.187096) (end 27.328145 43.265288) (layer
>> Edge.Cuts) (width 0.1))
>>    (gr_line (start 52.25 35.66) (end 50.392159 49.187096) (layer
>> Edge.Cuts) (width 0.1))
>>
>> Marco
>>
>> On 09-Sep-15 14:58, Marco Hess wrote:
>>
>>> Hi Marcos,
>>>
>>> Apologies, but I did not see your original email where you said you
>>> tried the R12 format alreayd.
>>>
>>> I tried it as well and and it indeed seems to do something strange
>>> with just connecting the end points of the circles or something.
>>>
>>> Regards,
>>>
>>> Marco
>>>
>>> On 09-Sep-15 14:29, Marco Hess wrote:
>>>
>>>> KiCad DXF import for those kind of segments don't work very well. You
>>>> need to re-export the DXF in a DXF R12 format.
>>>>
>>>> You can do that easily by opening the DXF in LibreCAD and then
>>>> reexporting in R12 format.
>>>>
>>>> See http://docs.kicad-pcb.org/Pcbnew/Pcbnew.html#_creating_a_board
>>>>
>>>> Section 6.1.2 and 6.1.3.
>>>>
>>>> Cheers,
>>>>
>>>> Marco
>>>>
>>>>
>>>> On 09-Sep-15 14:24, Marcos Chaparro wrote:
>>>>
>>>>>
>>>>>         Seems that is kind of Berzier Curve, not few arcs. Probably
>>>>>         that shape needs to
>>>>>
>>>>>     split to single arcs before import.
>>>>>
>>>>>
>>>>> Um, I don't know if its converted to a bezier curve, but I'm sure I
>>>>> made it from 4 arcs, see attached.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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. - AUSTRALIA
>>>> www.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
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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. - AUSTRALIA
>> www.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
>>
>>
> _______________________________________________
> 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
>
>

Attachment: arcs2.png
Description: PNG image


Follow ups

References