Follow focus ring
This commit is contained in:
parent
f3f49ac06c
commit
2ec11f0901
2
.gitignore
vendored
2
.gitignore
vendored
@ -152,3 +152,5 @@ cython_debug/
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
# CAD Models
|
||||
*.stl
|
||||
|
25
follow_focus_ring.py
Normal file
25
follow_focus_ring.py
Normal file
@ -0,0 +1,25 @@
|
||||
import math
|
||||
|
||||
import cadquery as cq
|
||||
from cq_gears import SpurGear
|
||||
|
||||
# User Settings
|
||||
lens_ring_diameter=100.0
|
||||
lens_name=''
|
||||
follow_focus_width=10.0
|
||||
|
||||
# Constants
|
||||
follow_focus_mod=0.8
|
||||
follow_focus_inner_thickness=5.0
|
||||
follow_focus_num_teeth=int(math.ceil((follow_focus_inner_thickness+lens_ring_diameter)/follow_focus_mod))
|
||||
|
||||
# Create follow focus ring
|
||||
ring = SpurGear(module=follow_focus_mod, teeth_number=follow_focus_num_teeth,\
|
||||
width=follow_focus_width, bore_d=lens_ring_diameter)
|
||||
|
||||
# Render
|
||||
wp = cq.Workplane('XY').gear(ring)
|
||||
show_object(wp)
|
||||
|
||||
# Export STL
|
||||
cq.exporters.export(wp, 'follow_focus_ring{}.stl'.format(lens_name))
|
Loading…
x
Reference in New Issue
Block a user