Skip to content

Commit

Permalink
Add photo frame generator
Browse files Browse the repository at this point in the history
Refactor to Dimensions dataclass, add golden ratio matting

Add label parameter to roundedPlate

Tidy stuff up, redo docs
  • Loading branch information
Fop authored and marauder37 committed May 28, 2024
1 parent b77d29d commit d008aaa
Show file tree
Hide file tree
Showing 2 changed files with 514 additions and 7 deletions.
25 changes: 18 additions & 7 deletions boxes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2132,12 +2132,22 @@ def _splitWall(self, pieces, side):
(True, True, True, True, True),
][pieces][side]

def roundedPlate(self, x, y, r, edge="f", callback=None,
holesMargin=None, holesSettings=None,
bedBolts=None, bedBoltSettings=None,
wallpieces=1,
extend_corners=True,
move=None):
def roundedPlate(
self,
x,
y,
r,
edge="f",
callback=None,
holesMargin=None,
holesSettings=None,
bedBolts=None,
bedBoltSettings=None,
wallpieces=1,
extend_corners=True,
move=None,
label=None,
):
"""Plate with rounded corner fitting to .surroundingWall()
For the callbacks the sides are counted depending on wallpieces
Expand All @@ -2154,6 +2164,7 @@ def roundedPlate(self, x, y, r, edge="f", callback=None,
:param wallpieces: (Default value = 1) # of separate surrounding walls
:param extend_corners: (Default value = True) have corners outset with the edges
:param move: (Default value = None)
:param label: (Default value = None)
"""
corner_holes = True

Expand Down Expand Up @@ -2218,7 +2229,7 @@ def roundedPlate(self, x, y, r, edge="f", callback=None,
self.hexHolesPlate(x - 2 * holesMargin, y - 2 * holesMargin, r,
settings=holesSettings)

self.move(overallwidth, overallheight, move)
self.move(overallwidth, overallheight, move, label=label)

def surroundingWallPiece(self, cbnr, x, y, r, pieces=1):
"""
Expand Down
Loading

0 comments on commit d008aaa

Please sign in to comment.