by fabberking 1 year, 11 months ago
5 times 1.14s avg. build time

Washer for fixing posts and tubes

"Radienscheibe" in German... what is the correct English name of this thing?

License: CreativeCommons-ShareAlike Publicly Listed: True Tags: None

Log in to download models or make your own copy!

Auto Apply Changes

  1. # Radienscheibe
  2. #
  3. # (c) 2015 fabberking.com
  4. # Important MetaData
  5. #
  6. UOM = "mm"
  7. # PARAMETERS and PRESETS
  8. # These parameters can be manipulated by end users.
  9. #
  10. DEFAULT_PRESET = 'concave'
  11. post_diameter = FloatParam( min=10.0, max=500.0, presets={'concave':50}, desc="diameter of post")
  12. washer_outer_diameter = FloatParam( min=4.0, max=150.0, presets={'concave':30}, desc="diameter of washer")
  13. washer_hole_diameter = FloatParam( min=1.0, max=130.0, presets={'concave':10}, desc="diameter of hole")
  14. washer_center_height = FloatParam( min=1.0, max=150.0, presets={'concave':5}, desc="thickness of washer")
  15. # Your build method. It must return a solid object.
  16. #
  17. def build():
  18. max_height = washer_center_height.value + post_diameter.value / 2.0
  19. # basic washer, is a cylinder with a hole
  20. washer = Workplane("XY").circle(washer_outer_diameter.value / 2.0).extrude(max_height)
  21. washer = washer.faces(">Z").workplane().circle(washer_hole_diameter.value / 2.0).cutThruAll()
  22. # the post which shall be fixed by the washer
  23. post = Workplane("YZ").workplane(offset = washer_outer_diameter.value / 2.0).center(0, max_height).circle(post_diameter.value / 2.0).extrude(-washer_outer_diameter.value)
  24. # special washer = basic washer - post
  25. return washer.cut(post)