2. Computer-Aided Design (CAD)#
Software#
The software I used to design 3D models is OpenScad. I chose it because its usage is similar to writing code which made it very easy for me to use.
I installed it with sudo pacman -S openscad
Compliant mechanism#
A compliant mechanism is a single-piece flexible structure that achieves its purpose through the elastic deformation of a single object.
Flexlink Piece#
The flexlink piece I designed is the Fixed-Fixed Beam - Half Circle.
Conception with OpenSCAD#
To show the review of the written code, using Ctrl-S
is a convenient way as it saves the changes to the file
and also automatically start the preview.
Two hole piece#
I started by designing an elliptical object with two holes. The process starts by creating two circles and
linking them using the hulk
module. Then two cylinders are used to create the holes.
The parameters are :
- circle_radius
: The radius of both circles
- height
: The height of the piece
- distance_btwn_circles
: The distance between the two circles
- hole_radius
: the radius of both holes
- offset_y
: The offset on the y axis
module two_hole_piece(circle_radius, height, distance_btwn_circles, hole_radius, offset_y){
offset_x = distance_btwn_circles/2;
difference(){
// Full 3D elipse
hull(){
translate([offset_x,offset_y,0]){
cylinder(h=height,r=circle_radius, center=true);
}
translate([-offset_x,offset_y,0]){
cylinder(h=height,r=circle_radius, center=true);
}
}
// Two holes
union(){
translate([offset_x,offset_y,0]){
cylinder(h=height*2, r=hole_radius, center=true);
}
translate([-offset_x,offset_y,0]){
cylinder(h=height*2, r=hole_radius, center=true);
}
}
}
}
arc#
To join the two base pieces, an arc is needed. I created an arc by deleting the intersection between
two circles and by then deleting half the remaining object using a parallelepiped.
The parameters are :
- r1
: The radius of the bigger circle
- r2
: The radius of the smaller circle
- height
: The height of the arc
- offset_x
: The offset on the x axis
module arc(r1, r2, height,offset_x) {
// make sure the arc touches the pieces
safety_offset = -1;
difference() {
translate([offset_x+safety_offset, 0, 0]){
difference() {
cylinder(h=height,r=r1,center=true);
cylinder(h=height*2,r=r2,center=true);
}
}
translate([-r1/2+offset_x+safety_offset, 0, 0]){
cube([r1, r1*2, height*2], center=true);
}
}
}
Beam half circle#
The end result is a fully parametric module to create the flexlink piece.
module beam_half_circle(circle_radius, height, distance_btwn_circles, hole_radius,
distance_btwn_pieces, arc_width, arc_height){
// r1 is the radius of the outer arc
arc_r1 = distance_btwn_pieces/2+arc_width/2;
union(){
two_hole_piece(circle_radius,height,distance_btwn_circles,hole_radius,
distance_btwn_pieces/2);
two_hole_piece(circle_radius,height,distance_btwn_circles,hole_radius,
-distance_btwn_pieces/2);
arc(arc_r1, arc_r1-arc_width, arc_height,distance_btwn_circles/2+circle_radius);
}
}
Assembling pieces#
The objective of this exercise was to design two different pieces that could be assembled.
I decided to create a base with holes for a “statue” to fit. As this exercise was a proof of concept, I dit not bother making a cool statue and just went with a cylinder.
Design#
Problems#
Circles don’t look perfectly round at start. It’s because by default openscad doesn’t use a lot of polygons to draw figures to draw previews faster. It is thus very important to modify this behabior by using the following command.
$fn = number; // number is the amount of line segments used, generally 30 is a good start
Another problem I was met with was that sometimes, I couldn’t see the piece I was trying to draw.
Preceding the figure with #
gives a red glow to the piece which helps to visualize it even through other
figures.
I also learned that sometimes thinking too hard wasn’t a good solution. When making a piece like a thread, it is better to look for existing models online instead of wasting large amounts of time. The most popular site is Thingiverse.
Finally, I sometimes found it hard to look at the piece with different angles and I would loose sight of it.
I discovered a button “View all” that can be clicked to automatically change the camera’s posistion to see the whole
piece. The shortcut Ctrl+Shift+V
can also be used.
Licensing#
I will use a Creative Commons license because it is simple and suits my needs. In this case, the license should be at the top of the OpenSCAD file.
FILE: scad_beam_half_circle.scad
AUTHOR: El Kazbani Othman
DATE: 12 october 2024
LICENSE: CC BY-NC-SA 4.0
Because I wanted my work to be useful to others, I chose a license that allowed people to reuse my work. However, I only wanted it to be used for educational purposes.
CC BY-NC-SA
This license enables reusers to distribute, remix, adapt, and build upon the material in any medium or format for noncommercial purposes only, and only so long as attribution is given to the creator. If you remix, adapt, or build upon the material, you must license the modified material under identical terms. CC BY-NC-SA includes the following elements: - BY: credit must be given to the creator. - NC: Only noncommercial uses of the work are permitted. - SA: Adaptations must be shared under the same terms.