Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions 3d/leds_holder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""
This script defines the LEDS holder
"""
import cadquery
from Helpers import show

HOLDER_X = 14
HOLDER_Y = 8
HOLDER_Z = 8

LED_D = 6.1
LED_POS_X = -2.5
SENSOR_D = 4.1
SENSOR_POS_X = 3.5

LINK_X = 1
LINK_Y = 1

LINK_POS_X = HOLDER_X/2 + LINK_X/2 + 0.5

# LEDs holder body
leds = cadquery.Workplane('XY')\
.rect(HOLDER_X, HOLDER_Y)\
.center(LED_POS_X,0).circle(LED_D/2).center(-LED_POS_X,0)\
.center(SENSOR_POS_X,0).circle(SENSOR_D/2).center(-SENSOR_POS_X,0)\
.center(LINK_POS_X,0).rect(LINK_X, LINK_Y)\
.extrude(HOLDER_Z)

show(leds)
76 changes: 76 additions & 0 deletions 3d/mount.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
"""
This script defines the mount for the wheels and motor.
"""
from math import asin
from math import cos
from math import sin
from math import radians

import cadquery
from Helpers import show


def circle_points(number, circle, shift=0):
radius = circle / 2.
step = 360 / number
points = [(radius * sin(radians(i * step + shift)),
radius * cos(radians(i * step + shift)))
for i in range(number)]
return points


# Gears
MODULE = 0.3
Z_PINION = 18
Z_GEAR = 60
GEARS_MARGIN = 0.1

# Motor
MOTOR_SHIFT = 1.25
MOTOR_DIAMETER = 17
MOTOR_HOLE_DIAMETER = 6.3
MOTOR_MOUNT_THICK = 2
MOUNT_MINIHOLES_CIRCLE = 10
MOUNT_MINIHOLES_DIAMETER = 1.7

# Mount
MOUNT_THICK = 5
MOUNT_HEIGHT = MOTOR_DIAMETER
MOUNT_WIDTH = 40
MOUNT_FILLET = 1

# Holes
SCREW_SPACE = 34
SCREW_DIAMETER = 2
AXIS_DIAMETER = 2


# Basic mount structure
mount = cadquery.Workplane('XY').box(MOUNT_WIDTH, MOUNT_HEIGHT, MOUNT_THICK)

# Base screws
mount = mount.faces('<Y').workplane()\
.pushPoints([(-SCREW_SPACE / 2., 0), (SCREW_SPACE / 2., 0)])\
.hole(SCREW_DIAMETER)

# Motor holes
miniholes = circle_points(number=6, circle=MOUNT_MINIHOLES_CIRCLE)
mount = mount.faces('<Z').workplane()\
.pushPoints(miniholes)\
.hole(diameter=MOUNT_MINIHOLES_DIAMETER)
mount = mount.faces('>Z').workplane().cboreHole(
MOTOR_HOLE_DIAMETER,
MOTOR_DIAMETER + 1,
MOUNT_THICK - MOTOR_MOUNT_THICK)

# Axis
axis_shift = (MODULE * (Z_PINION + Z_GEAR)) / 2. + GEARS_MARGIN
axis_shift *= cos(asin(MOTOR_SHIFT / axis_shift))
mount = mount.faces('<Z').workplane()\
.pushPoints([(axis_shift, -MOTOR_SHIFT), (-axis_shift, -MOTOR_SHIFT)])\
.hole(AXIS_DIAMETER)

# Fillet
mount = mount.edges('|Z').fillet(MOUNT_FILLET)

show(mount)
25 changes: 25 additions & 0 deletions 3d/rim.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
This script defines the rim body.
"""
import cadquery
from Helpers import show

FDM_MARGIN = 0.1
REEL_H0 = 8
TIRE_W = 2.5
WHEEL_D = 20.5
PINION_D = 6.70

OUTER_D = WHEEL_D - TIRE_W * 2 - FDM_MARGIN

PINION_D = 6.70
INNER_D = PINION_D + FDM_MARGIN


# Rim body
rim = cadquery.Workplane('XY')\
.circle(radius=OUTER_D/2.).extrude(distance=REEL_H0)\
.faces('>Z').workplane()\
.hole(diameter=INNER_D)

show(rim)