Open topherbuckley opened 2 years ago
Hi even if it does not answer your question. In some libraries, even the needed rotation and translation is included. But it is ignored in your lib.
Sorry, I haven't touched this is quite a while. Can you reference an example where such rotation and translation is included and where it is ignored in the lib?
https://componentsearchengine.com/part-view/744043151/W%C3%BCrth%20Elektronik WE-TPC_4818_482892.kicad_mod
(model 744043151.stp
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz -90 0 -90))
)
https://componentsearchengine.com/part-view/XPGDWT-N1-0000-00XPP/Wolfspeed XPGDWTN1000000XPP.kicad_mod
(model XPGDWT-N1-0000-00XPP.stp
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz -90 0 0))
)
https://github.com/topherbuckley/kicad_remote_import/blob/master/kicad-import.py#L319 This should be relatively easy to insert into the code. If the model entry is present, the string must be replaced by: "${KICAD6_3RD_PARTY}/" + found_model.name
Thanks! I think I see your point. Offset, scale and rotate are all currently hardcoded in a string rather than extracted from the kicad_mod file. Happy to merge a PR if you wanted to fix this. I won't have time for a while to pick this back up and am not recalling off the top of my head how the parsing was working.
I have added this to my repository. I hope it is recognizable which change the feature realizes.
Anyone know how to use FreeCAD to auto-align the pins to the holes/pads? It doesn't seem the is any particular fixed offset/rotation that I can hard code in so wondered if there was any auto-align tools out there. Not sure how that'd work, but thought I'd at least ask.