inputlabs / prototypes_cad

Other
2 stars 5 forks source link

Add wheel assmebly #1

Closed tomas-pecserke closed 1 year ago

tomas-pecserke commented 1 year ago

Groundwork

I tried to establish some sort of organization and standards:

1) Use BOSL2 attachments system to assemble the modules. 2) Use global parameters.scad file to configure variants. This file could be auto-generated by some configuration wizard in the future, similar to OpenFlexure Microscope Configurator. 3) Use common_references.scad file to share parameters across files. 4) Use one file per primary module. 5) Provide cutouts (including tolerances and clearances) as a module to go along the primary module. 3) Documentation. 4) Use of private modules with _ prefix.

Wheel

This PR implements wheel, wheel shaft, wheel holder, and entire wheel assembly. The default variant is exact re-implementation of original blender design.

I added also added a second variant using regular polygon profile. I made both designs parametrized to allow defining custom number of vertices. It can be used for example to create round wheel.

Assembly

use <wheel_assembly.scad>

wheelAssembly();
right(25) wheelAssembly(type=WHEEL_TYPE_POLYGON);
right(50) wheelAssembly(type=WHEEL_TYPE_POLYGON, n=128);

image

Print orientation

use <wheel.scad>
use <wheel_shaft.scad>
use <wheel_holder.scad>

wheel(anchor="print");
right(25) wheel(type=WHEEL_TYPE_POLYGON, anchor="print");
right(50) wheel(type=WHEEL_TYPE_POLYGON, n=128, anchor="print");
right(70) wheelShaft(anchor="print");
right(85) wheelHolder(anchor="print");

image

Global parameters

// parameters.scad
include <constants.scad>

// Tolerance to add between moving parts
// Default: 0.1
Tolerance = 0.1;

// Encoder wheel type
// Option: WHEEL_TYPE_STAR, WHEEL_TYPE_POLYGON
// Default: WHEEL_TYPE_STAR
WheelType = WHEEL_TYPE_STAR;

// Encoder wheel vetex count
// Default: 24
WheelVertices = 24;
use <wheel_assembly.scad>

wheelAssembly(type=WheelType, n=WheelVertices);