initial commit

This commit is contained in:
2021-02-12 22:34:01 +01:00
commit 0263b37bad
11 changed files with 41842 additions and 0 deletions

52
first_cadquery_test.py Normal file
View File

@@ -0,0 +1,52 @@
import cadquery as cq
result = cq.Workplane("XY" ).box(3, 3, 0.5).edges("|Z").fillet(0.125)
height = 60.0
width = 80.0
thickness = 10.0
diameter = 22.0
padding = 12
# make the base
result = cq.Workplane("XY").box(height, width, thickness)\
.faces(">Z").workplane().hole(diameter)\
.faces(">Z").workplane() \
.rect(height - padding,width - padding,forConstruction=True)\
.vertices()\
.cboreHole(2.4, 4.4, 2.1)\
.edges("|Z").fillet(2.0)
#show_object(result)
(L,H,W,t) = ( 100.0, 20.0, 20.0, 1.0)
pts = [
(0,H/2.0),
(W/2.0,H/2.0),
(W/2.0,(H/2.0 - t)),
(t/2.0,(H/2.0-t)),
(t/2.0,(t - H/2.0)),
(W/2.0,(t -H/2.0)),
(W/2.0,H/-2.0),
(0,H/-2.0)
]
result2 = cq.Workplane("front").polyline(pts).mirrorY().extrude(L)
# Render the solid
#show_object(result2)
result3 = (
cq.Workplane("front")
.box(2, 2, 2)
.color("red")
.faces("+Z or -X or +X")
.shell(0.1)
)
show_object(result3)
#cq.exporters.export(result,'result.stl')
#cq.exporters.export(result.section(),'result.dxf')
#cq.exporters.export(result,'result.step')