You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB

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
Workplane = cqmore.extend(Workplane)
Workplane.addSvgPath = addSvgPath
bottom = Workplane()
w = 26
h = 26
t = 2
screw_diameter = 3.3
screw_radius = screw_diameter / 2.0
hole_dist_from_side = 1.36
bottom = bottom.box(w, h, t)
bottom = (
bottom.faces(">Z[1]")
.rect(
w - hole_dist_from_side - screw_diameter,
h - hole_dist_from_side - screw_diameter,
)
.vertices()
.hole(screw_diameter, t)
)
cq.exporters.export(bottom, "/home/deck/model_files/air_quality_enclosure_bottom.step")
try:
show_object(lower_box)
except NameError:
pass