from cadquery import exporters from cq_warehouse.extensions import Workplane from cq_warehouse.fastener import * from cq_warehouse.thread import * from cqmore.curve import archimedeanSpiral, circle from cqmore.polygon import regularPolygon, star from cqmore.polyhedron import polarZonohedra, Polyhedron, superellipsoid from svg_path import addSvgPath from svgpathtools import svg2paths import cadquery as cq import cqmore from math import ceil, floor ticket_width = 40 ticket_height = 95 Workplane = cqmore.extend(Workplane) Workplane.addSvgPath = addSvgPath result = Workplane() result = result.box(ticket_width + 5, ticket_height + 5, 30) result = ( result.workplane(offset=11) .move(0, 0) .box(ticket_width - 2, ticket_height, 50, combine="cut") ) result = ( result.workplane(offset=(ticket_width / 2.0) - 5) .move(0, 1) .box(ticket_width, ticket_height + 5, 1.5, combine="cut") ) cq.exporters.export(result, "/home/deck/model_files/ghibli_ticket_holder.stl") try: show_object(result) except NameError: pass