Skip to content

Commit

Permalink
Merge branch 'master' into coasterholder
Browse files Browse the repository at this point in the history
  • Loading branch information
florianfesti authored Nov 28, 2023
2 parents 340d10a + 6ea40ae commit 0d46eaa
Show file tree
Hide file tree
Showing 158 changed files with 202 additions and 201 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]

steps:
- uses: actions/checkout@v4
Expand Down
9 changes: 4 additions & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@ Adding new Dependencies
.......................

Adding new dependencies should be considered thoroughly. If a new
depencendcy is added it needs to be added in all these places:
dependency is added it needs to be added in all these places:

* *documentation/src/install.rst*
* RST files in *documentation/src/install/*
* *scripts/Dockerfile*
* *.travis.yml*

If it is a Python module it also needs to be added:
* *requirements.txt*
Expand All @@ -96,8 +95,8 @@ To check your changes docs need to be build with *make html* in
*documentation/build/html*. You need to have *sphinx* installed for
this to work.

The online documentation gets build and updated automatically by the Travis CI
as soon as the changes makes it into the GitHub master branch.
The online documentation gets build and updated automatically by the Github Actions
as soon as the changes makes it into the GitHub *master* branch.

Provide photos for generators
-----------------------------
Expand Down Expand Up @@ -142,7 +141,7 @@ perfect. We can work on it together.
Running the Code
----------------------------

To serve website, run `scripts/boxesserver` script
To serve website, run :code:`scripts/boxesserver` script.

Reporting bugs
--------------
Expand Down
12 changes: 6 additions & 6 deletions boxes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2394,7 +2394,7 @@ def rectangularWall(self, x, y, edges="eeee",
:param bedBoltSettings: (Default value = None)
:param callback: (Default value = None)
:param move: (Default value = None)
:param label: rendered to identify parts, it is not ment to be cut or etched (Default value = "")
:param label: rendered to identify parts, it is not meant to be cut or etched (Default value = "")
"""
if len(edges) != 4:
raise ValueError("four edges required")
Expand Down Expand Up @@ -2448,7 +2448,7 @@ def flangedWall(self, x, y, edges="FFFF", flanges=None, r=0.0,
:param r: radius of the corners of the flange
:param callback: (Default value = None)
:param move: (Default value = None)
:param label: rendered to identify parts, it is not ment to be cut or etched (Default value = "")
:param label: rendered to identify parts, it is not meant to be cut or etched (Default value = "")
"""

t = self.thickness
Expand Down Expand Up @@ -2508,7 +2508,7 @@ def rectangularTriangle(self, x, y, edges="eee", r=0.0, num=1,
:param bedBoltSettings: (Default value = None)
:param callback: (Default value = None)
:param move: (Default value = None)
:param label: rendered to identify parts, it is not ment to be cut or etched (Default value = "")
:param label: rendered to identify parts, it is not meant to be cut or etched (Default value = "")
"""
edges = [self.edges.get(e, e) for e in edges]
if len(edges) == 2:
Expand Down Expand Up @@ -2578,7 +2578,7 @@ def trapezoidWall(self, w, h0, h1, edges="eeee",
:param edges: (Default value = "eee") bottom, right, left
:param callback: (Default value = None)
:param move: (Default value = None)
:param label: rendered to identify parts, it is not ment to be cut or etched (Default value = "")
:param label: rendered to identify parts, it is not meant to be cut or etched (Default value = "")
"""

edges = [self.edges.get(e, e) for e in edges]
Expand Down Expand Up @@ -2623,7 +2623,7 @@ def trapezoidSideWall(self, w, h0, h1, edges="eeee",
:param radius: (Default value = 0.0) radius of upper corners
:param callback: (Default value = None)
:param move: (Default value = None)
:param label: rendered to identify parts, it is not ment to be cut or etched (Default value = "")
:param label: rendered to identify parts, it is not meant to be cut or etched (Default value = "")
"""

edges = [self.edges.get(e, e) for e in edges]
Expand Down Expand Up @@ -2793,7 +2793,7 @@ def polygonWall(self, borders, edge="f", turtle=False,
:param correct_corners: (Default value = True)
:param callback: (Default value = None)
:param move: (Default value = None)
:param label: rendered to identify parts, it is not ment to be cut or etched (Default value = "")
:param label: rendered to identify parts, it is not meant to be cut or etched (Default value = "")
borders is alternating between length of the edge and angle of the corner. For now neither tabs nor radii are supported. None at the end closes the polygon.
"""
Expand Down
14 changes: 8 additions & 6 deletions boxes/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,18 +847,20 @@ def finish(self, inner_corners="loop"):
path.faster_edges(inner_corners)
num = 0
cnt = 1
ende = len(path.path)-1
if self.dbg:
end = len(path.path) - 1
if self.dbg:
for c in path.path:
print ("6",num, c)
num += 1
num = 0

c = path.path[num]
C, x, y = c[0:3]
if self.dbg: print("ende:" ,ende)
while num < ende or (C == "T" and num <= ende): #len(path.path):
if self.dbg: print ("0", num)
if self.dbg:
print("end:", end)
while num < end or (C == "T" and num <= end): # len(path.path):
if self.dbg:
print("0", num)
c = path.path[num]
if self.dbg: print("first: ", num, c)

Expand All @@ -879,7 +881,7 @@ def finish(self, inner_corners="loop"):
# do something with M
done = False
bspline = False
while done == False and num < ende: #len(path.path):
while done == False and num < end: # len(path.path):
num += 1
c = path.path[num]
if self.dbg: print ("next: ",num, c)
Expand Down
1 change: 0 additions & 1 deletion boxes/edges.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/formats.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/gears.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2007 Aaron Spike (aaron @ ekips.org)
# Copyright (C) 2007 Tavmjong Bah (tavmjong @ free.fr)
# Copyright (C) https://cnc-club.ru/forum/viewtopic.php?f=33&t=434&p=2594#p2500
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/_swtemplate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2019 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/_template.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/abox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/agricolainsert.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2020 Guillaume Collic
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/alledges.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2018 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/angledbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/angledcutjig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/arcade.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/basedbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/bayonetbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2019 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
5 changes: 2 additions & 3 deletions boxes/generators/bintray.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -54,8 +53,8 @@ def __init__(self) -> None:
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
self.argparser.add_argument(
"--front", action="store", type=float, default=0.4,
help="fraction of bin height covert with slope")
help="fraction of bin height covered with slope")

def xSlots(self):
posx = -0.5 * self.thickness
for x in self.sx[:-1]:
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/birdhouse.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2022 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
3 changes: 1 addition & 2 deletions boxes/generators/bottlestack.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2020 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -49,7 +48,7 @@ def front(self, h_sides, offset=0, move=None):
a = 60
nr = self.number
r1 = self.diameter / 2.0 # bottle
r2 = r1 / math.cos(math.radians(90-a)) - r1 # inbetween
r2 = r1 / math.cos(math.radians(90-a)) - r1 # in between
if self.double:
r3 = 1.5*t # upper corners
else:
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/bottletag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/breadbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2022 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/burntest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2019 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/can_storage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
3 changes: 1 addition & 2 deletions boxes/generators/carbonfilter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2023 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -232,7 +231,7 @@ def render(self):
self.rectangularWall(
y, w, "efef",
callback=[self.bottomCB, None, self.bottomCB],
label="botton plate", move="up")
label="bottom plate", move="up")

self.innerRibs(self.pockets * self.ribs * 2, move="up")
self.outerRibs(self.pockets * self.ribs * 2, self.ribs * 2, move="up")
Expand Down
3 changes: 1 addition & 2 deletions boxes/generators/cardbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
# Copyright (C) 2018 jens persson <[email protected]>
# Copyright (C) 2023 Manuel Lohoff
Expand Down Expand Up @@ -66,7 +65,7 @@ class CardBox(Boxes):

description = """
### Description
Versatile Box for Storage of playing cards. Multiple different styles of storage are supportet, e.g. a flat storage or a trading card deck box style storage. See images for ideas.
Versatile Box for Storage of playing cards. Multiple different styles of storage are supported, e.g. a flat storage or a trading card deck box style storage. See images for ideas.
#### Building instructions
Place inner walls on floor first (if any). Then add the outer walls. Glue the two walls without finger joins to the inside of the side walls. Make sure there is no squeeze out on top, as this is going to form the rail for the lid.
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/cardholder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2021 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/castle.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/closedbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/coffeecapsulesholder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2021 Guillaume Collic
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/coindisplay.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/concaveknob.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2017 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/console.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/console2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2020 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
5 changes: 2 additions & 3 deletions boxes/generators/desksign.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand All @@ -17,9 +16,9 @@
from boxes import *

class Desksign(Boxes):
"""Simple diagonal plate with stands to show name or mesage"""
"""Simple diagonal plate with stands to show name or message."""

description = """Text to be engraved can be genarated by inputing the label and fontsize fields.
description = """Text to be engraved can be generated by inputting the label and fontsize fields.
height represents the area that can be used for writing text, does not match the actual
height when standing. Generated text is put in the center. Currently only a single
line of text is supported."""
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/dicebox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2022 Erik Snider ([email protected])
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/dinrailbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2020 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/discrack.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2019 chrysn <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/dispenser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/display.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/displaycase.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
# Copyright (C) 2018 Alexander Bulimov
#
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/displayshelf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2016 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/dividertray.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/doubleflexdoorbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
1 change: 0 additions & 1 deletion boxes/generators/drillbox.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# This program is free software: you can redistribute it and/or modify
Expand Down
Loading

0 comments on commit 0d46eaa

Please sign in to comment.