2. Computer-Aided Design#

Goal :

  • Design, model, and document a parametric FlexLinks construction kit that you will fabricate next week using 3D printers.
  • Make it parametric, so you will be able to make adjustments accounting for the material properties and the machine characteristics.
  • Read about Creative Commons open-source Licence and add a CC license to your work.
  • Complete your FlexLinks kit that you made by fetching the code of at least 1 part made by another classmate during this week. Acknowledge its work. Modify its code and get the parts ready to print.

Note : I couldn’t be there at the theory and the practical course for this session.

CAD#

CAD, also known as Computer-Aided Design, is the use of a computer to aid in the creation of designs, more specifically in 3D printer parts. CAD can be in 2D or 3D.

Three softwares were presented during this course : Inkscape, OpenSCAD, FreeCAD.

OpenSCAD#

OpenSCAD is an open-source software used for CAD. I chose OpenSCAD because it uses code and I’m pretty familiar with code. There is a cheatsheet to help us.

Compliant Mechanism#

A compliant mechanism is a flexible mechanism. There is a good video about it that we’ve seen in class.

Plier#

I didn’t have any background in 3D Impression but I wanted to make a plier. I tried to schematize directly on openSCAD and after twenty minutes I obtained this:
drawing
Obviously, we see that it cannot work, it was better to restart from 0 and go steps by steps. So I started by drawing a schema first: drawing
It was better, now I could draw a polygon with the points I drew.

First Design#

Code#
// FILE : plier.scad
// AUTHOR : Moïra Vanderslagmolen
// LICENSE : Creative Commons Attribution 4.0 [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)

$fn = 360;
plier_height = 10;
flexlink_circle = 0.5;
flexlink_width = 0.2;
flexlink_size = 32;
pivot_diameter = 0.4;

// création de la première branche de la pince
module branche1(){
    translate([0, 0, -plier_height/2])
    linear_extrude(height= plier_height, 0){
        difference(){
         polygon(points=[[-13,6],[-5,-2],[-4,-1],[-3,-2],[-2,-1],[-1,-2], [1,0], [2,-1],[0,-3],[-6,-3], [-14,5],[-38,5],[-38,3],[-40,3],[-40,6]]);
            translate([-38.40, 4]) circle(flexlink_circle);
            }}}

// découpage en triangle pour pouvoir ouvrir et fermer la pince
module triangle_pivot()
     {translate([0, 0, -plier_height/2])
    linear_extrude(plier_height/2) polygon([[-7, 0], [-9, 2], [-9, 0], [-7,-2]]);}

// créer la branche 1 + le pivot ainsi que la découpe en triangle
module branche1_pivot(){
    difference(){
    branche1();
    triangle_pivot();
        pivot();}}

// créer la branche 2 à l'aide de la branche 1
module branche2(){
    mirror([0,1,0]) 
    branche1();}

// créer la branche 2 + le pivot ainsi que la découpe en triangle à l'aide d'un miroir de la branche 1
module branche2_pivot(){
    difference(){
    branche2();
    mirror([0,1,0]) mirror([0,0,1]) triangle_pivot();}
    pivot();}


// le mécanisme flexible
module flex_link(){
    linear_extrude(plier_height){
         square([flexlink_width, flexlink_size]);
         circle(flexlink_circle);
        translate([0, flexlink_size]) circle (flexlink_circle);}
        }

// création du pivot
module pivot(){
     translate([-8,0,0]) linear_extrude(height=1, 0) circle(pivot_diameter);}

branche1_pivot();
translate([0,20,0]) branche2_pivot();
translate([10,0,-plier_height/2]) flex_link();

Final Result#

drawing

Second Design#

Adapt your code with the code of another classmate :

Code#

I used the code of Martin Gilles, changed the parameters and removed parameters related to base 1 and 2 and the base of the two springs. I also changed the number of cylinders to adapt it to my code. Martin used a MIT license, thus we can modify it, sell it, publish it, use it but we need to incorporate the copyright and license notice in our code. The code of Martin is at the bottom of the code.

// FILE : plier.scad
// AUTHOR : Moïra Vanderslagmolen
// LICENSE : Creative Commons Attribution 4.0 [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)

plier_height = 10;
flexlink_circle = 0.5;
flexlink_width = 0.2;
flexlink_size = 32;
pivot_diameter = 0.4;
$fn=360;
l_e=3;
adj=6.5;
calcul_hyp=(pow(adj,2)+pow(l_e,2));
hyp = sqrt(calcul_hyp);
angle_1=acos(adj/hyp);
joint=hyp/5;
n_etages =6;
radius=2;
width_r = 0.27;
corr = l_e/12;
height=10;

module rotate_about_pt(z, pt) {
    translate(pt)
        rotate([0, 0, z])
            translate(-pt)
                children();}

// création de la première branche de la pince
module branche1(){
    linear_extrude(height= plier_height, 0){
         polygon(points=[[-13,6],[-5,-2],[-4,-1],[-3,-2],[-2,-1],[-1,-2], [1,0], [2,-1],[0,-3],[-6,-3], [-14,5],[-38,5],[-38,3],[-40,3],[-40,6]]);}}

// découpage en triangle pour pouvoir ouvrir et fermer la pince
module triangle_pivot(){
    linear_extrude(plier_height/2) polygon([[-7, 0], [-9, 2], [-9, 0], [-7,-2]]);}

// créer la branche 1 + le pivot ainsi que la découpe en triangle
module branche1_pivot(){
     rotate_about_pt(20, [-35, 5, 0]) {
    difference(){
    branche1();
triangle_pivot();}
        pivot(pivot_diameter);}}

// créer la branche 2 à l'aide de la branche 1
module branche2(){
    mirror([0,1,0])
    branche1();}

// créer la branche 2 + le pivot ainsi que la découpe en triangle à l'aide d'un miroir de la branche 1
module branche2_pivot(){
     rotate_about_pt(-20, [-35, -5, 0]) 
    difference(){
    branche2();
    mirror([0,1,0]) mirror([0,0,1])     translate([0, 0, -plier_height]) triangle_pivot();
    pivot(pivot_diameter+0.2);
        }}

// création du pivot
module pivot(diameter){
         translate([-8,0,plier_height/2-1    ]) linear_extrude(height=1, 0)        #circle(diameter);}



translate([15.5,33.4,0])
rotate_about_pt(112.5, [0,0,0]){
rotate_about_pt(-45, [-8, 0, plier_height/2]) branche1_pivot();branche2_pivot();}



/*
    * File : Flexor link
    *Author : Martin Gilles
    * Date : 10-03-23
    *Copyright (c) 2023 Martin Gilles
    * Licensed under the MIT License
*/

// Code by Mats Bourgeois from "Fixed-Slotted-Beam-Straight" under the MIT License

module cyl_g(joint){
    translate([joint-1,adj-0.2,0])
    cylinder(height,width_r,width_r);
}

// boucle afin d'obtenir tous les joints

    for (i=[(n_etages-corr):l_e*2:(l_e*2)*n_etages-1]){
    cyl_g(joint+i);
}
// meme idée pour les cylindres droits

module cyl_d(l_e){
    translate([l_e+0.2,0,0])
    cylinder(height,width_r,width_r);}

    cyl_d(l_e);

for (i2 =[0:n_etages:(n_etages-1)*n_etages]){
    cyl_d(l_e+i2);}

// creation de 2 boucles pour obtenir les parties centrales du ressort

for (i=[3*l_e:n_etages:n_etages*5+l_e]){
    translate([i,0,0])
    rotate([0,0,angle_1])
    cube([width_r,hyp,height]);
}

for (i=[l_e:(2*l_e):(n_etages-1)*n_etages]){

    translate([i,0,0])
    rotate([0,0,-angle_1])
    cube([width_r,hyp,height]);
}
Final Result#

Licence Creative Commons#

For my two codes, I used the CC BY-SA, which means that everyone can use my code but needs to credit me and also use CC BY-SA 4.0.

They are different version as seen in the table. 7 are regularly used : BY, BY-SA, BY-NC, BY-NC-SA, BY-ND, BY-NC-ND

Image Acronym Description
BY Credit must be given to creator
SA(Share-Alike) Adapting is allowed but credit must be given to creator
NC(Non-Commercial) The user cannot use this work for commercial purpose
ND(No Derivatives) The user cannot change or adapt this work
CC0 No rights reserved