-
Notifications
You must be signed in to change notification settings - Fork 3
No size is changing #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I see KiCad imports svg as a group, which makes sense. You have to enter the group and select the polygons, make sure you see that polygons are selected in the statusbar of the pcb editor, not the group. Then the plugin works. I'll see what I can do to make group selection work too. |
I tried right now what you suggested. It doesn't work :-( It'a pity because to import Logos and graphics in general, your tool was way helpful than the no-help from KiCAD. |
Can you attach the svg file you tried? Because it works fine for me on a random svg file from the internet with multiple polygons. |
I attached it in my previous comment. |
it doesn't. OBS.16.April.2023.10.37.39.NV12.mp4 |
Hm... I do exactly what you do and it works for me. Can you try manually drawing a single polygon on silkscreen and using the plugin on that? Also post full kicad version info. |
Also can you please provide these 2 things: the original svg zipped up (to eliminate the chance that github optimizes it when you upload it directly) and an empty board file with this svg already imported. |
Single Polygon (a square): not working .SVG in zip file: attached .kicad_pcb file: attached Full KiCAD Info: Version: 7.0.1, release build Libraries: Platform: Windows 11 (build 22000), 64-bit edition, 64 bit, Little endian, wxMSW Build Info: Build settings: |
Thanks. If it doesn't work even for a single manually drawn polygon then it doesn't work at all. If not I'll make a special debug version that generates a log file with details. |
I install all plugins through the plugin manager. |
Please uninstall the plugin, install this file instead, enable debug logging in plugin and try to run it on a simple polygon. TransformIt_v1.1-1-g5c614e6_pcm.zip It should generate |
I installed as you suggested. But I don't see any |
no because I'm dumb! Sorry I didn't notice that checkbox. |
For whatever reason the plugin does not recognize the item you have selected as something it can transform. There should be entry like this in the log: Can you change the line 183 in plugin.py from this
to this (exact number of leading spaces is important):
Then restart kicad and try the plugin again after selecting a polygon. |
I found the way. Bu it doesn't work. Please here the log |
Well this time log is very different, you have obviously made different selection. Can you make exactly same selection as for the last log, then open scripting console and type in following commands: import pcbnew
list(pcbnew.GetCurrentSelection()) What does that print? |
This is the report form the Console. I just did the same I did before: double click on the imported SVG |
This makes no sense. Everything seems right yet the log makes no sense. Last try: I've added even more logging and am attaching a board with simple polygon and your svg. Please uninstall the plugin, install this version: |
Polygon after clicked (no size is changed) .SVG double-clicked |
Ok, wild idea but I think some other plugin is interfering with native python api. Can you try temporarily moving all other plugins out of the plugin manager folder? You can get to that by clicking "open package folder" in plugin manager. You can also uninstall all other plugins but it's easier to move folders. |
Also would be interesting to see what these commands return (select the small polygon from my test board before running them): import pcbnew
import inspect
polygon = list(pcbnew.GetCurrentSelection())[0]
polygon.__class__
inspect.getfile(polygon.__class__)
inspect.getfile(pcbnew.PCB_SHAPE) These last 3 lines should output this:
Path may be different in your case but should be from kicad installation directory on both 2nd and 3rd lines. |
Great. Probably some plugin is overwriting pcbnew module with it's own classes which is a big no-no.
Probably need to restart kicad. |
Did you restart kicad after installing plugins again? If you did and scripting commands I suggested still show same output then the only way to find the bad plugin is to remove them one by one, restart kicad each time and check if plugin works. |
Of course I restarted it. Yes this is what I was fearing. I remove all and I reinstall them one by one. BTW if any plugin is overwriting classes of KiCAD the issue is KiCAD itself. It must not permit this. IMPORTANT ISSUE: When I double click on your .PCB file, KiCAD is opening etc. But when I exit KiCAD, processes till active on the process manager. I have always to kill them manually. |
It's not physically overwriting it, just swapping them in memory. There is no way to prevent it, such is dynamic nature of python and current plugin architecture with shared environment.
That's again one of your plugins not cleaning up after itself.
Somehow I suspected it would be that one. Thanks for finding it, I'll research it on my end and file a bug with more details on their github. |
... that plugin always ... |
Looks like kikit already fixed the pcbnew overwrite issue yaqwsx/pcbnewTransition@eb27d4b Can you update your pcbnewTransition package to 0.3.4 ? |
but there was not any update available... because to ANY update I do it. |
That package is not part of plugin in kicad's plugin manager. It is managed by pip in python environment. Kikit instructions tell you to install kikit package with pip and that pulls in pcbnewTransition as a dependency. You have to manually update it witih pip command. |
ahem not really it IS into the Package Manager :-) EDIT I'm noticing it's not installing the very last version |
Ok I installed the version 1.3.0. No it's blocking your script |
Please read what I wrote, I was talking about pcbnewTransition package. It's NOT in kicad's plugin manager. It's installed as a dependency of Kikit's pypi package which is ALSO NOT in kicad's plugin manager. There is a Kikit plugin package in plugin manager but it's a separate thing, updating it in kicad will not change any of your pypi packages. So I repeat: run
Report that on kikit's github. |
Sorry for the misunderstanding. I applied your suggestion: it doesn't work ... So Fisrt: I installed the KiKIT form the plugin manager I clsoed KiCAD, and reopened it. |
You are right, it's still broken |
Please tell me when it will be sanitized ... so I can immediately test it and use it |
I am using version 7.0.5 of KiCad and have the same issue, Transformit doesn't work at all with any footprint. I also have KiKit installed, is that the issue? Right now I need Transformit more than I need KiKit. I uninstalled KiKit and Transformit works. Is there a fix yet? For now, I guess I can uninstall KiKit whenever I need Transformit. You can never thank someone enough for the effort to create tools like this, so thank you! |
Yes, KiKit still breaks pcbnew api. I linked the bug above, if more people complain there maybe KiKit dev will respond :) |
KiCAD 7.0.1
i import any SVG.
Once imported: 2 clicks on it
then I click on the button.
I change the size, I click ok: no size is changing
The text was updated successfully, but these errors were encountered: