2022-11-24 14:24:38 +00:00
|
|
|
import cadquery2 as cq
|
|
|
|
from cadquery2 import exporters
|
|
|
|
|
|
|
|
lower_stands = (
|
2022-11-24 20:45:59 +00:00
|
|
|
cq.Sketch().push([(0, 0), (58, 0), (58, 23), (0, 23)]).circle(3, mode="a")
|
2022-11-24 14:24:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
higher_stands = (
|
2022-11-24 20:45:59 +00:00
|
|
|
cq.Sketch().push([(0, 0), (58, 0), (58, 23), (0, 23)]).circle(2.65 / 2, mode="a")
|
2022-11-24 14:24:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
model = (
|
|
|
|
cq.Workplane("XY")
|
|
|
|
.workplane()
|
|
|
|
.box(75, 40, 2)
|
2022-11-24 17:44:17 +00:00
|
|
|
.edges("+Z")
|
|
|
|
.fillet(3)
|
2022-11-24 14:24:38 +00:00
|
|
|
.faces(">Z")
|
|
|
|
.workplane(centerOption="CenterOfBoundBox")
|
|
|
|
.center(-29, -11.5)
|
|
|
|
.placeSketch(lower_stands)
|
2022-11-24 17:44:17 +00:00
|
|
|
.extrude(4)
|
2022-11-24 14:24:38 +00:00
|
|
|
.workplane()
|
|
|
|
.placeSketch(higher_stands)
|
2022-11-24 17:44:17 +00:00
|
|
|
.extrude(9)
|
2022-11-24 14:24:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
exporters.export(model, "cpu_holder.stl")
|