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.

40 lines
1.1 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 cq_gears import (
SpurGear,
Worm,
HerringboneGear,
RackGear,
HerringboneRackGear,
BevelGear,
BevelGearPair,
)
result = Workplane().cylinder(180, 15)
result = result.workplane(offset=85).sphere(19)
slot = Workplane("ZY").move(90, 0).cylinder(1, 15).cylinder(1, 13.5, combine="cut")
result = result.cut(slot)
result = result.workplane(offset=-(180 / 2)).move(-20, 0).sphere(20)
result = result.workplane(offset=-(180 / 2) + 13).move(20, 0).sphere(20)
result = result.workplane(offset=(-(180 / 2) + 15)).cylinder(30, 50, combine="cut")
cq.exporters.export(result, "/home/deck/model_files/stick.step")
try:
show_object(result)
except NameError:
pass