We could see that the below functions of pcbnew module, which was working in the older versions of KiCad stopped working with the new KiCad 6.0 Windows version. It will be awesome if anyone can please help us with the alternative functions of these in KiCad 6.0 or any documents suggesting the new changes in KiCad 6.0?
Functions of pcbnew Python module that is not working in KiCad 6.0
There is pcbnew.pad.GetEffectivePolygon nowβ¦not sure what the difference is really.
and board. GetBoardPolygonOutlines still exists.
I donβt think theres a replacement for GetKicadConfigPath the paths and settings sytem got completely reworked but this old swig api isnt well maintained
**This is what I was doing in KiCad 5 ** and it was working fine
poly = pcbnew.SHAPE_POLY_SET()
inflate = pcbnew.wxSize(0,0)
pad.BuildPadShapePolygon(poly, inflate, 16, 1.0 / math.cos(math.pi / 16))
outline = poly.COutline(0)
if (d < min_ring_size):
min_ring_size = d
min_ring = pad
And this in KiCad 6
poly = pcbnew.SHAPE_POLY_SET()
inflate = pcbnew.wxSize(0,0)
pad.BuildEffectivePolygon()
outline = poly.COutline(0)
d = outline.Distance(pcbnew.VECTOR2I(pad.GetOffset()), True) - max_size / 2
if (d < min_ring_size):
min_ring_size = d
min_ring = pad
Used pad.BuildPadShapePolygon in KiCad 5 and pad.BuildEffectivePolygon in Kicad 6