Doc string for Boxes.flex2D()

This commit is contained in:
Florian Festi 2018-08-23 22:35:52 +02:00
parent 6c43f4a382
commit 897fc23029
1 changed files with 7 additions and 0 deletions

View File

@ -1336,6 +1336,13 @@ class Boxes:
self.hole(j * 2 * w + i * w, -i * 2 * dist, r) self.hole(j * 2 * w + i * w, -i * 2 * dist, r)
def flex2D(self, x, y, width=1): def flex2D(self, x, y, width=1):
"""
Fill a rectangle with a pattern allowing bending in both axis
:param x: width
:param y: height
:param width: width between the lines of the pattern in multiples of thickness
"""
width *= self.thickness width *= self.thickness
cx = int(x // (5 * width)) cx = int(x // (5 * width))
wx = x / 5. / cx wx = x / 5. / cx