Created
June 8, 2016 13:37
-
-
Save eddieliberato/1802b5d939828398357f89aab4e63613 to your computer and use it in GitHub Desktop.
CadQuery Scriber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cadquery as cq | |
from Helpers import show | |
l1 = 20 | |
d1 = 7 | |
l2 = 90 | |
d2 = 10 | |
l3 = 25.4 | |
d3 = 8 | |
hole_diameter = 3 | |
hole_depth = 20 | |
hole4screw = 3 | |
needle_radius = 1.5 | |
needle_lenght = 60 | |
scriber_body = cq.Workplane("XZ").circle(d1).extrude(l1)\ | |
.faces(">Y").workplane().circle(d2).extrude(l2)\ | |
.faces(">Y").workplane().circle(d3).extrude(l3)\ | |
.faces("<Y").workplane().hole(hole_diameter, hole_depth)\ | |
.faces("<Y").workplane()\ | |
.transformed(offset=cq.Vector(0, 0, -l1/2), rotate=cq.Vector(90, 0, 0)) \ | |
.hole(hole4screw) | |
needle = cq.Workplane("XZ").circle(needle_radius).extrude(needle_lenght-20)\ | |
.faces("<Y").workplane().circle(needle_radius)\ | |
.workplane(offset=20).circle(0.001).loft(combine=True)\ | |
show(scriber_body, (204, 204, 204, 0.4)) | |
show(needle, (204, 204, 0, 0.0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment