Problems with Arcs in Edge Cut using StepUp

Hi,
i have problems, when i try to import a PCB to FreeCAD using Step up, when there are arcs in the Edgecut.
I’m using currently KiCAD 7.0.2, FreeCAD 0.20.2 and StepUp V10.21.0
Here’s the Message i get:
09:56:22 Running the Python command ‘ksuToolsOpenBoard’ failed:
Traceback (most recent call last):
File “C:\Users\maxhaa01\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\kicadStepUpCMD.py”, line 1206, in Activated
kicadStepUptools.onLoadBoard()
File “C:\Users\maxhaa01\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\kicadStepUptools.py”, line 6731, in onLoadBoard
modules,nsk = DrawPCB(mypcb,SketchLayer,override_pcb,keep_pcb_sketch)
File “C:\Users\maxhaa01\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\kicadStepUptools.py”, line 11987, in DrawPCB
l = len(lp.pts.xy)
File “C:\Users\maxhaa01\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\fcad_parser\sexp_parser\sexp_parser.py”, line 180, in getattr
raise AttributeError(‘{}: key “{}” not found’.format(self._line,name))

2527: key “xy” not found

If i create an Edge Cut in basically the same form, but without rounded corners, it works just pretty fine with all components. Maybe anyone knows how to tackle this Problem or someone has a workaround for this. Sadly i’m not good enough in programming to solve this problem on my own.

Thanks in Advance :slight_smile:

Very strange… Would you please post a failing example?

sadly i can’t upload the file, because i’m new to the Forum. I also tried a PM, but it’s also not possible
Edit: now i can upload files, but i’d prefer sending this to you via PM

This FAQ explains how to raise your level to be able to post.

You have just self promoted yourself to “basic” from “new member”, so, post away :smiley:

Also. it may be worth updating your Kicad version to the current 7.0.9. There may have been a problem in 7.0.2.

Hi,

your board is using arcs within polylines …

  (gr_poly
    (pts
      (arc (start 87.814214 78.95) (mid 87.431532 78.87387) (end 87.107107 78.657107))

instead of the old method which had poylines only with lines

  (gr_poly
    (pts
      (xy 74.15 121.7)

I need to update the parser…
Could you post the method you used to obtain a polyline with arcs in kicad pcbnew?

EDIT:
the gr_poly new format it is very weird… adding arcs to polyline, and omitting lines connecting the arcs…

1 Like

Hi,
that’s also what i assumed. I used a Solid Works DXF from a Kolleague an imported that to KiCAD. But now i need to edit that Outline and want to place the connectors related to a mechanical model in FreeCAD.

I’m not shure if that kind of Problem will also occure by creating an outline in FreeCAD an import that to KiCAD 7. I just assume KiCAD will correct the format by importing.

There are no duplicate points allowed, so if you have two arcs next to each other in the polyline, a segment can be inferred between the end point of one and start point of the other.

You can draw various lines and arcs inside the PCB editor and then use “create from selection” to create polygons for testing.

@GoneVision
your workflow is not taking all advantages of kSU…
if you would import your dxf in kSu, then you could push it to kicad and obtain a bidirectional push pull workflow.

thanks, what I’ve noticed is that if I edit a polyline made with arcs in kicad, the arcs will be converted to segments, so I never used this method… AFAIK there is no method ATM to edit in kicad a polyline mixed with arcs and line to keep the arc structure inside.
EDIT:
if I plot the Edge.Cuts to DXF or SVG, the result is only with polyline segments (no arcs)…
EDIT2
even exporting the pcb to step, the curve is converted to polylines and it doesn’t maintain arcs

yes, the exporters all need to be updated at some point. the STEP exporting used to work correctly but got broken through some refactoring, someone is working on fixing it. I’m not sure there are bug reports for DXF or SVG.

And yes, they can’t be edited very easily in KiCad today. But the idea is to round-trip, i.e. if you import a DXF with arcs, the arcs will be preserved.

1 Like

oh, now I see why I didn’t get much issue on this topic… editing the imported shape ATM is degrading the shape geometry.

@maui thanks for your effort. I will try to use your suggested workflow to get around that problem in the future

1 Like

if you upload the dxf file to me, I will provide you the FC file to push the shape inside kicad

thanks for the offer, but thats not needed. I can do that by myself :+1:

1 Like

@GoneVision
could you please test the new release of kSU?
It should now support gr_poly for arcs in reading for a push & pull mechanical integration.

3 Likes

@maui
awesome, works perfect now. I tested it with two different layouts.

best regards

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.