Skip to content

Commit

Permalink
Handle closed polygons well in substrate
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed Jul 23, 2024
1 parent 7077ed3 commit e19408a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kikit/substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def getEndPoint(geom):
# Rectangle is closed, so it starts at the same point as it ends
point = geom.GetStart()
else:
point = geom.GetEnd()
point = geom.GetStart() if geom.IsClosed() else geom.GetEnd()
return point

class CoincidenceList(list):
Expand Down

4 comments on commit e19408a

@set-soft
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this fails on KiCad 6, for some reason I get:

An error occurred: 'PCB_SHAPE' object has no attribute 'IsClosed'
No output files produced

Not sure why because PCB_SHAPE inherits from EDA_SHAPE, which defines IsClosed(), but looks like Swing wrappers aren't that simple.

@yaqwsx
Copy link
Owner Author

@yaqwsx yaqwsx commented on e19408a Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unfortunate, but I am not planning on further investigation as, for the sake of sanity, I keep the policy of supporting only the two last stable releases of KiCAD. If you find a workaround and submit a PR I am more than happy to merge it.

@set-soft
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I also found you edited the footprints and they became incompatible with KiCad 6.
Some were changed even for 1.5.1, so the last version compatible with KiCad 6 is 1.5.0.

@yaqwsx
Copy link
Owner Author

@yaqwsx yaqwsx commented on e19408a Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, even 1.5.0 officially drops KiCAD 6 support - see https://github.com/yaqwsx/KiKit/releases/tag/v1.5.0

Please sign in to comment.