kicadStepUpMod icon indicating copy to clipboard operation
kicadStepUpMod copied to clipboard

ksuToolsPushMoved failes based on the value field

Open jbayer05 opened this issue 11 months ago • 2 comments

Hello,

I have no deep understanding of the code therefore I can just report what I found - but unfortunately I have not a solution. I stumbled over an issue which leads to an Python-Error in push3D2pcb: At line 21822 a check is performed "if ('at' in ln)" which wrongfully resolves true in the case a component has 'at' in its value.

In the attached example board, I have an LED with value 'Status' which triggers the if and then the "ln.index(') ')" fails with "substring not found". After renaming the LED-Value to something else (which does not contain 'at'), the position-push works as expected. As this check appears at other places in the code, I assume there could be other issues.

In order to reproduce the issue:

  • load the attached Status-LED.kicad_pcb.zip (KiCAD v8.0.7) with KiCadStepUp
  • select the LED
  • use the "ksu Push 3D moved model(s) to PCB" tool
  • select the "Status-LED.kicad_pcb"

thanks a lot for the extremely useful workbench!

jbayer05 avatar Jan 16 '25 17:01 jbayer05

hi @jbayer05 thanks for your detailed feedback... I've pushed some code https://github.com/easyw/kicadStepUpMod/commit/05ca2b70dafe89563e443af404f18ce3a0cd1320 to make the parser a bit more robust... Please have a try.

easyw avatar Jan 16 '25 20:01 easyw

Hi @easyw,

thanks for the quick fix - works for me. Of course you can still fool it by changing the value accordingly (e.g. "St(atus") - but of course this is much more unlikely now ;-)

Greetings

jbayer05 avatar Jan 17 '25 11:01 jbayer05