Skip to content

Commit

Permalink
Allow for small numerical imprecision in full tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed Oct 5, 2023
1 parent af65555 commit 3a33bba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kikit/panelize.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ def _buildSingleFullTab(self, s: Substrate, a: KiPoint, b: KiPoint,
faceDistances = [(x, np.around(partitionFace.distance(x), 2)) for x in faceSegments]
minFaceDistance = min(faceDistances, key=lambda x: x[1])[1]

cutFaces = [x for x, d in faceDistances if d == minFaceDistance]
cutFaces = [x for x, d in faceDistances if abs(d - minFaceDistance) < SHP_EPSILON]
tabs, cuts = [], []
for cutLine in listGeometries(shapely.ops.unary_union(cutFaces)):
if minFaceDistance > 0: # Do not generate degenerated polygons
Expand Down

0 comments on commit 3a33bba

Please sign in to comment.