by fabberking 2 years, 7 months ago
2 times 1.38s avg. build time

IKEA ENJE roller blind mount kit

Zwei Montageteile passend zu IKEA Rollo ENJE, mit anpassbarer Länge. Ersetzt die Original-Montagewinkel, welche das Rollo in grossem Abstand (ca 2cm weit weg) von der Montageebene fixieren.

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

Log in to download models or make your own copy!

Auto Apply Changes

  1. # IKEA ENJE roller blind mount kit
  2. #
  3. # (c) 2014 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 = '3x20 screw'
  11. #
  12. base_width = FloatParam(min=30.0,max=500.0,presets={'3x20 screw':50.0,'3.5x25 screw':50.0},group="Part size", desc="full width of the base of the part")
  13. axis_height = FloatParam(min=20.0,max=500.0,presets={'3x20 screw':26.0,'3.5x25 screw':26.0},group="Part size", desc="distance from base to center of axis hole")
  14. head_diameter = FloatParam(min=16.0,max=500.0,presets={'3x20 screw':26.0,'3.5x25 screw':26.0},group="Part size", desc="diameter of the head of the part")
  15. thickness = FloatParam(min=10.0,max=500.0,presets={'3x20 screw':16.0,'3.5x25 screw':16.0},group="Part size", desc="thickness of the part")
  16. #
  17. screw_head_hole_diameter = FloatParam(min=5.0,max=500.0,presets={'3x20 screw':8,'3.5x25 screw':9},group="Screw holes", desc="diameter of hole for screw head")
  18. screw_bolt_hole_diameter = FloatParam(min=1.0,max=500.0,presets={'3x20 screw':3.3,'3.5x25 screw':3.8},group="Screw holes", desc="diameter of hole for screw bolt")
  19. screw_bolt_hole_length = FloatParam(min=3.0,max=500.0,presets={'3x20 screw':5,'3.5x25 screw':6},group="Screw holes", desc="distance from part base to screw head")
  20. #
  21. axis_hole_diameter = FloatParam(min=5.0,max=500.0,presets={'3x20 screw':11.3,'3.5x25 screw':11.3},group="Axis holes", desc="diameter of the round hole for the axis of the rollo")
  22. axis_hole_depth = FloatParam(min=3.0,max=500.0,presets={'3x20 screw':8,'3.5x25 screw':8},group="Axis holes", desc="depth of the round hole for the axis")
  23. axis_hole_small_diameter = FloatParam(min=2.0,max=500.0,presets={'3x20 screw':4,'3.5x25 screw':4},group="Axis holes", desc="diameter of the small helper hole for removing the rollo")
  24. axis_hole_square_side = FloatParam(min=5.0,max=500.0,presets={'3x20 screw':10.3,'3.5x25 screw':10.3},group="Axis holes", desc="side length of the square hole for the axis of the rollo")
  25. # Your build method. It must return a solid object
  26. #
  27. def build():
  28. # part1: the rollo holder with the round hole
  29. #
  30. # create the raw part
  31. part1 = build_base_part()
  32. # bore the axis round hole
  33. hole = Workplane("XY").center(base_width.value / 2, axis_height.value) \
  34. .workplane(offset = -thickness.value, invert = True) \
  35. .circle(axis_hole_diameter.value / 2).extrude(axis_hole_depth.value) \
  36. .faces("<Z").workplane() \
  37. .circle(axis_hole_small_diameter.value / 2).extrude(thickness.value - axis_hole_depth.value)
  38. part1 = part1.cut(hole)
  39. # move part1 to the side, make space for part2
  40. part1 = part1.translate((base_width.value + 2, 0, 0))
  41. # part2: the rollo holder with the square hole
  42. #
  43. # create the raw part
  44. part2 = build_base_part()
  45. # bore the axis square hole
  46. hole = Workplane("XY").center(base_width.value / 2, axis_height.value) \
  47. .workplane(offset = -thickness.value, invert = True) \
  48. .transformed(rotate = Vector(0, 0, 45)) \
  49. .rect(axis_hole_square_side.value, axis_hole_square_side.value, centered = True) \
  50. .extrude(axis_hole_depth.value)
  51. part2 = part2.cut(hole)
  52. # return both parts together
  53. return part1.union(part2)
  54. # helper function to build the base body of the part, including the screw holes
  55. #
  56. def build_base_part():
  57. a = base_width.value / 2
  58. b = axis_height.value
  59. r = head_diameter.value / 2
  60. c = math.sqrt(math.pow(a, 2) + math.pow(b, 2))
  61. alpha1 = math.atan(b / a)
  62. alpha2 = math.asin(r / c)
  63. alpha3 = alpha1 + alpha2
  64. # create the raw body of the part
  65. part = Workplane("XY").lineTo(2 * a, 0) \
  66. .lineTo(a + r * math.sin(alpha3), b + r * math.cos(alpha3)) \
  67. .threePointArc( (a + 0, b + r), (a - r * math.sin(alpha3), b + r * math.cos(alpha3)) ) \
  68. .lineTo(a - a, 0) \
  69. .close()
  70. part = part.extrude(thickness.value)
  71. # bore the 2 screw holes
  72. part = part.faces("-Y").workplane(offset = (b + r), invert = True) \
  73. .center(- (a + r) / 2, 0).cboreHole(screw_bolt_hole_diameter.value, screw_head_hole_diameter.value, b + r - screw_bolt_hole_length.value, depth = None) \
  74. .center((a + r) / 2, 0) \
  75. .center((a + r) / 2, 0).cboreHole(screw_bolt_hole_diameter.value, screw_head_hole_diameter.value, b + r - screw_bolt_hole_length.value, depth = None)
  76. return part