diff --git a/air_quality_sensor_enclosure.py b/air_quality_sensor_enclosure.py new file mode 100644 index 0000000..5a99fa8 --- /dev/null +++ b/air_quality_sensor_enclosure.py @@ -0,0 +1,44 @@ +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 diff --git a/curtain_holder.py b/curtain_holder.py index 086915a..51798db 100644 --- a/curtain_holder.py +++ b/curtain_holder.py @@ -19,7 +19,7 @@ rod_female = rod_female.cylinder(rod_height, rod_radius) rod_female = rod_female.workplane( offset=(rod_height / 2.0) - female_hole_height / 2 -).cylinder(female_hole_height, (rod_radius / 2.0) + 0.15, combine="cut") +).cylinder(female_hole_height, (rod_radius / 2.0) + 0.12, combine="cut") rod_female = rod_female.workplane( offset=-(rod_height / 2.0) - (female_hole_height / 2) + 20 @@ -37,7 +37,7 @@ result = result.box(length, width, height) result = ( result.workplane(offset=-13) .center(0, 0) - .box(length / 2, width, height + 7.73, combine="cut") + .box(length / 2, width, height + 13.61, combine="cut") ) result = ( result.workplane(offset=-30)