-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Plugin fails on components without pads #488
Comments
This solution on file fabrication.py line 102 solves the problem. Original version of method def get_position(self, footprint):
"""Calculate position based on center of bounding box."""
pads = footprint.Pads()
bbox = pads[0].GetBoundingBox()
for pad in pads:
bbox.Merge(pad.GetBoundingBox())
return bbox.GetCenter() Problem fixed with: def get_position(self, footprint):
"""Calculate position based on center of bounding box."""
try:
pads = footprint.Pads()
bbox = pads[0].GetBoundingBox()
for pad in pads:
bbox.Merge(pad.GetBoundingBox())
#self.logger.info(" => %s", bbox.GetCenter())
return bbox.GetCenter()
except:
self.logger.info("WARNING footprint %s: original position used", footprint.GetReference())
return footprint.GetPosition()
`` |
Can you provide a screenshot? I don't get what exactly you try to achieve. |
You get an "Index out of bound" Exception because in fabrication.py#L105 you access The basic "routing" problem (multiple footprints for one component which is not supported by KiCad) is described at the beginning of this issue. I look for any solution in the KiCad community, get some hints but no good solution. The procedure I described above works fine, and it is not a big concern to add a try/catch on proper location in plugin. |
Same problem in my use case: I use pad-less footprints to place silkscreen drawings (polarity hint, warning symbols...) on my pcb. The project is here: https://github.com/klaus-liebler/labathome/tree/master/labathome_pcb15 Regards, Klaus |
I am working on Plugin Version 2024.06.04 and KiCad Version 8.0.3-rc1
I want to use component with multiple footprints, for example an Arduino Nano component consisting of two 15 pin Sockets, and get all production data automatically without manual post processing.
Because this use case is not supported by KiCad at the moment, I solve this demand in the following way:
Inside KiCad everything works perfect. Bill of material and location data ar generated with proper values. No ERC and DRC error or warning is generated.
When starting the JLCPCB Tools plugin, everything works without warning or errors, but no BOM file is generated and the CPL file only has parts with identifiers before the "empty" symbol part.
As soon as I add one pad in the "empty" symbol footprint, the plugin works as desired, but then I get DRC errors because pad is now two times on same location. To move the pad outside of print is also not working, because the plugin is using the wrong pad location and not the correct footprint location.
I see no solution, as long as the plugin needs a footprint with pad for proper run.
The text was updated successfully, but these errors were encountered: