Implementation of FlexSettings

Addding of FlexSettings to RoundedBox to adjust the flexibility setting for the corners
This commit is contained in:
jomjol 2020-12-29 20:44:38 +01:00 committed by Florian Festi
parent e6dccc4135
commit eea27ee74d
1 changed files with 6 additions and 5 deletions

View File

@ -14,17 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from boxes import *
import boxes
class RoundedBox(Boxes):
class RoundedBox(boxes.Boxes):
"""Box with vertical edges rounded"""
ui_group = "FlexBox"
def __init__(self):
Boxes.__init__(self)
self.addSettingsArgs(edges.FingerJointSettings)
boxes.Boxes.__init__(self)
self.addSettingsArgs(boxes.edges.FingerJointSettings)
self.addSettingsArgs(boxes.edges.FlexSettings)
self.buildArgParser("x", "y", "h", "outside")
self.argparser.add_argument(
"--radius", action="store", type=float, default=15,
@ -34,7 +35,7 @@ class RoundedBox(Boxes):
choices=[1, 2, 3, 4], help="# pieces of outer wall")
self.argparser.add_argument(
"--edge_style", action="store",
type=ArgparseEdgeType("fFh"), choices=list("fFh"),
type=boxes.ArgparseEdgeType("fFh"), choices=list("fFh"),
default="f",
help="edge type for top and bottom edges")
self.argparser.add_argument(