import cadquery as cq from cqmore import Workplane from cqmore.curve import archimedeanSpiral, circle from cqmore.polygon import regularPolygon, star from random import randint, choice import functools as fnc import itertools as it picture_height = 178.3 length = picture_height + 5 picture_length = 4.2 width = picture_length + 10 picture_width = 127 height = picture_width + 10 triangle_size = 25 triangle_width = width + 15 def makeTriangle(self, width, height, x_offset=0, y_offset=0): return self.moveTo(x_offset - (width), y_offset).makePolygon( [ (width, height, 0), (width * 2, 0, 0), (width * 2, width * 2, 0), ] ) def add_triangle(plane, width, height, offset): return plane.triangle(width, height, y_offset=offset) Workplane.triangle = makeTriangle result = Workplane("front").box(length, width, height) result = result.workplane().box(length - 20, width, height - 15, True, "cut") result = result.workplane().box( length - 2, picture_length, picture_width + 2, True, "cut" ) result = result.faces("