diff --git a/watch_stand.py b/watch_stand.py index db6cb71..679145e 100644 --- a/watch_stand.py +++ b/watch_stand.py @@ -10,10 +10,10 @@ from svgpathtools import svg2paths import cadquery as cq import cqmore -base_diameter = 90 +base_diameter = 100 base_radius = base_diameter / 2 -band_diameter = 40 +band_diameter = 50 band_radius = band_diameter / 2 clock_diameter = 35 @@ -22,28 +22,46 @@ clock_radius = clock_diameter / 2 winding_knob_dist = clock_radius band_width = 18.13 -first_circle_height = 105 # how tall the horizontal circle part will be +first_circle_height = 120 # how tall the horizontal circle part will be Workplane = cqmore.extend(Workplane) Workplane.addSvgPath = addSvgPath -result = Workplane() +stand_base = Workplane() -result = result.cylinder(first_circle_height, band_radius) +stand_base = stand_base.cylinder(first_circle_height, band_radius) -result = result.faces(">Z[0]").sphere(base_radius) -result = result.workplane(offset=base_radius).box( +simple = False + +screw = ButtonHeadScrew( + size="M16-2", fastener_type="iso7380_1", length=50 * MM, simple=simple +) + +scaled_screw = screw.scale(0.90) + +screw_thread = Workplane("YZ").workplane(offset=60).move(0, 40).cylinder(100, 10).threadedHole( + screw, 30, simple=simple, fit="Loose" +) + +screw_thread = screw_thread.workplane(offset=50).center(0, 50).sphere(60, combine="cut") + +stand_base = stand_base.union(screw_thread) + +stand_base = stand_base.faces(">Z[0]").sphere(base_radius) +stand_base = stand_base.workplane(offset=base_radius).box( base_diameter, base_radius * 2, base_radius * 2, combine="cut" ) -result = ( - result.workplane(offset=base_radius - 15) +stand_base = ( + stand_base.workplane(offset=base_radius - 10) .rect(base_radius, base_radius, forConstruction=True) .vertices() .cylinder(5, 5, combine="cut") ) +cq.exporters.export(stand_base, "/home/deck/model_files/watch_stand_base.step") + try: - show_object(result) + show_object(stand_base) except NameError: pass