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.
49 lines
1.2 KiB
49 lines
1.2 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
|
|
|
|
base_diameter = 90
|
|
base_radius = base_diameter / 2
|
|
|
|
band_diameter = 40
|
|
band_radius = band_diameter / 2
|
|
|
|
clock_diameter = 35
|
|
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
|
|
|
|
Workplane = cqmore.extend(Workplane)
|
|
Workplane.addSvgPath = addSvgPath
|
|
|
|
result = Workplane()
|
|
|
|
result = result.cylinder(first_circle_height, band_radius)
|
|
|
|
result = result.faces(">Z[0]").sphere(base_radius)
|
|
result = result.workplane(offset=base_radius).box(
|
|
base_diameter, base_radius * 2, base_radius * 2, combine="cut"
|
|
)
|
|
|
|
result = (
|
|
result.workplane(offset=base_radius - 15)
|
|
.rect(base_radius, base_radius, forConstruction=True)
|
|
.vertices()
|
|
.cylinder(5, 5, combine="cut")
|
|
)
|
|
|
|
try:
|
|
show_object(result)
|
|
except NameError:
|
|
pass
|
|
|