Closed Xyntexx closed 1 year ago
Thanks for your PR, I will try to test it tomorrow if I have time.
I corrected the if statement, as the data[11] is a string, in needed to be cast to int to be compared to 0. I checked on a few other components that uses oval pad holes, and it works as expected.
It would be great if in the future, before pushing, you could double-check your code formatting to ensure it follows the project's guidelines. I personally use Black for code formatting, and I think it would be helpful for you to use it as well for future contributions. (I don't have clear contributions guidelines on this repo , so in this case, this is my fault).
Thank you again for your work ! ;)
Also, the connector shape rectangle is drawn filled for some reason. Maybe we need to recognize if the rectangle is filled and use KicadModTree.nodes.specialized.RectLine?
Here is some example data: Filled:
"RECT~3985.87~2984~28~17~3~gge45~0~0~~~~"
, Not filled:"RECT~3985.87~2984~28~17~3~gge45~0~1~none~~~"
,
Do you have an example of a component with a filled rectangle ? I looked at tens of components with rectangles, none of them were filled :/
For example: C13453 C6649
I fixed this in a commit that ended up also in the my_ARC_fixes branch by accident. So this should also be fixed now. You can revert to an earlier version to test the difference.
Yes indeed, I didn't noticed it. Both C13453 and C6649 only have unfilled rectangles, I am trying to find a component with filled rectangles to check both cases.
Plus, this is something I did wrong from the beginning, but KicadModTree has RectFill to handle the filled Rectangle instead of using Polygon. Even so it works with it, I will clean this.
Oh sorry I misread. No I haven't seen a filled rectangle in the library. I used the easyEDA footprint editor to check the code but there is no way to import them.
Well, I am 700 components in, without any filled rectangles yet. I will let it run during the night to see if it finds one. In the meantime, I will consider you are right and keep this change. It shouldn't cause any issue.
Issue: oval pad holes not recognized. Solution: data[11] seems to carry to the length of the hole
Tested only using C13453 so some more testing required that I didn't have time to do.
Before:
Same in EasyEDA:
After:
Also, the connector shape rectangle is drawn filled for some reason. Maybe we need to recognize if the rectangle is filled and use KicadModTree.nodes.specialized.RectLine?
Here is some example data: Filled:
"RECT~3985.87~2984~28~17~3~gge45~0~0~~~~",
Not filled:"RECT~3985.87~2984~28~17~3~gge45~0~1~none~~~",