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.
38 lines
916 B
38 lines
916 B
import cadquery as cq
|
|
from cqmore import Workplane
|
|
from cqmore.curve import archimedeanSpiral, circle
|
|
from cqmore.polygon import regularPolygon, star
|
|
from random import randint, choice
|
|
import functools as fnc
|
|
import itertools as it
|
|
|
|
|
|
top_rect_len = 6.28
|
|
bottom_rect_len = 21.5
|
|
sides_width = 4
|
|
base_thickness = 7
|
|
|
|
height = 2.5
|
|
|
|
|
|
result = (cq.Workplane().moveTo(-top_rect_len+2, 0)
|
|
.box(sides_width, bottom_rect_len, height)
|
|
.edges("|Z").fillet(1.25))
|
|
|
|
|
|
result = (result.faces(">Z[0]").circle(1.5)
|
|
.workplane()
|
|
.circle(sides_width-1)
|
|
.loft()
|
|
.clean())
|
|
|
|
result = result.faces(">Z[0]").box(bottom_rect_len*6, bottom_rect_len*2, base_thickness)
|
|
result = (result
|
|
.faces(">Z").workplane()
|
|
.rect(bottom_rect_len*5, bottom_rect_len*1, forConstruction=True)
|
|
.vertices()
|
|
.cboreHole(4,8,7, depth=None))
|
|
|
|
|
|
|
|
cq.exporters.export(result, "/home/deck/cad_files/power_bar_holder.step")
|
|
|