Commit ef3db34d authored by Frederic GOUALARD's avatar Frederic GOUALARD 💬

Ajout des fichiers du projet 2018/2019.

parent 3b9de14c
// https://www.thingiverse.com/thing:8063/files
$fn=60; //Working
//$fn=720; //Show off
//=======================================================================================
module fan_60mm_x_25mm()
{
difference()
{
linear_extrude(height=25, center = true, convexity = 4, twist = 0)
difference()
{
//overall outside
square([60,60],center=true);
//main inside bore, less hub
difference()
{
circle(r=57/2,center=true);
//hub. Just imagine the blades, OK?
circle(r=31.5/2,center=true);
}
//Mounting holes
translate([+25,+25]) circle(r=3.4/2,h=25+0.2,center=true);
translate([+25,-25]) circle(r=3.4/2,h=25+0.2,center=true);
translate([-25,+25]) circle(r=3.4/2,h=25+0.2,center=true);
translate([-25,-25]) circle(r=3.4/2,h=25+0.2,center=true);
//Outside Radii
translate([+30,+30]) difference()
{
translate([-4.9,-4.9]) square([5.1,5.1]);
translate([-5,-5]) circle(r=5);
}
translate([+30,-30]) difference()
{
translate([-4.9,-0.1]) square([5.1,5.1]);
translate([-5,+5]) circle(r=5);
}
translate([-30,+30]) difference()
{
translate([-0.1,-4.9]) square([5.1,5.1]);
translate([+5,-5]) circle(r=5);
}
translate([-30,-30]) difference()
{
translate([-0.1,-0.1]) square([5+0.1,5+0.1]);
translate([5,5]) circle(r=5);
}
} //linear extrude and 2-d difference
//Remove outside ring
difference()
{
cylinder(r=88/2,h=25-3.6-3.6,center=true);
cylinder(r=64/2,h=25-3.6-3.6+0.2,center=true);
}
}// 3-d difference
//Seven Blades
linear_extrude(height=24, center = true, convexity = 4, twist = -30)
for(i=[0:6])
rotate((360*i)/7)
translate([0,-1.5/2]) #square([57/2-0.75,1.5]);
}
//=======================================================================================
fan_60mm_x_25mm();
//=======================================================================================
/*
Led LZ4-4xxxxx sur radiateur
https://www.mouser.fr/ProductDetail/LED-Engin/LZ4-40B208-0000
https://www.mouser.fr/datasheet/2/228/5412893-LED_2520Engin_Datasheet_LuxiGen_LZ4-00B208-1531969.pdf
*/
$fn=30;
module led() {
epaisseur = 2.6-1.75; // épaisseur led sans le globe
// Base
color("DarkSlateGray") translate([0,0,epaisseur/2])
cube([7,7,epaisseur],center=true);
// Globe
translate([0,0,epaisseur]) difference() {
color("GhostWhite") sphere(d=5.6);
translate([0,0,-5.6/4]) cube([5.6,5.6,5.6/2],center=true);
}
}
module star_mcpcb() {
color("DarkGray") difference() {
intersection() {
cube([19.9,19.9,1.75],center=true);
rotate([0,0,-60]) cube([19.9,19.9,1.75],center=true);
rotate([0,0,-120]) cube([19.9,19.9,1.75],center=true);
}
for (angle = [30:60:330]) {
rotate([0,0,angle]) translate([19/2,0,-.1]) cylinder(d=3.2,h=1.75+.3,center=true);
}
}
// Pads
for (angle = [-120:60:120]) {
rotate([0,0,angle]) translate([19/2-1.7,0,1.75/2+0.1]) color("Gold")
cube([1.7,2.9,0.1],center=true);
}
}
module LZ4_4xxxxx() {
translate([0,0,1.75/2]) star_mcpcb();
translate([0,0,1.75]) led();
}
This diff is collapsed.
nutsnbolts
==========
A OpenSCAD library that allows for simple creation of nuts and bolts and respective nut catches and screw holes.
![Screenshot of examples.scad output](http://i.imgur.com/f0snG.png)
The Library is based iso metric standard screws with hexagon socket head cap and respective nuts (see DIN 912 or DIN EN ISO 4762 for reference). The library allows for easy access to parts and holes of true measures like so: `screw("M5x10")`. For holes and catches all measures can be adjusted by setting additional clearances.
The origin for all parts created in this lib lies on the axis of the hole or screw. For screws on the underside of the head, for holes at top and for catches at the bottom.
And yes this lib can model *threads* on the screws. Beware that this is slow and may create improper stl files. The default is not to create a thread and instead have the outer diameter for bolts or the inner diameter for threaded holes and nuts.
Usage Example
=============
The main file is *cyl_head_bolt.scad*, have a look in there for available modules and parameters (commented).
For more usage examples have a look into *examples.scad*.
### Holes and Nutcatches
The package includes threaded and through holes to screw the bolts in or push them through.
Also nutcatches cut sideways into a body and a catch just parallel to the through-hole axis are available.
difference() {
translate([-15, -15, 0]) cube([80, 30, 50]);
rotate([180,0,0]) nutcatch_parallel("M5", l=5);
translate([0, 0, 50]) hole_through(name="M5", l=50+5, cl=0.1, h=10, hcl=0.4);
translate([55, 0, 9]) nutcatch_sidecut("M8", l=100, clk=0.1, clh=0.1, clsl=0.1);
}
![Screenshot of the resulting model](http://i.imgur.com/8pFyggB.png)
### Screws and Nuts
include <cyl_head_bolt.scad>;
screw("M20x100", thread="modeled"); // screw M20x100 with thread
nut("M20", thread="modeled"); // corresponding nut with thread
screw("M3x12"); // screw M3x12
![Screenshot 1 of screw("M20x100", thread="modeled");](http://i.imgur.com/tIFTW.png)
![Screenshot 2 of screw("M20x100", thread="modeled");](http://i.imgur.com/AfHBo.png)
### Materials and Colors
include <materials.scad>; // this allows you to write stuff like this:
stainless(no="1.4301") nut("M3");
// which colors the parts in the corresponding color and documents the
// intended material. The material number isn't used for anything and can be
// skipped. Sensible defaults are set for stainless/steel/iron.
// Norm Nuts and Bolts - a OpenSCAD library
// Copyright (C) 2012 Johannes Kneer
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// This OpenSCAD File shows all screws and nuts,
// only run this on recent decent hardware or you will wait...
include <cyl_head_bolt.scad>;
include <materials.scad>;
$fn=15;
scri = [ [0:8], [9:17], [18:26], [27:35], [36:45], [46:56],
[57:69], [70:83], [84:98], [99:114], [115:133], [134:153],
[154:171], [172:188], [189:203], [204:222], [223:239], [240:255],
[256:270]];
for (j= [0:25]) {
assign(diao = _get_screw_fam(data_screw[scri[j][0]][_NB_S_DESC])[_NB_F_OUTER_DIA],
dia = 0)
translate([0,j*2*diao,0])
for (i = scri[j]) {
echo(data_screw[i][2]);
assign(name = data_screw[i][_NB_S_DESC],
fam = data_screw[i][_NB_S_FAMKEY],
len = data_screw[i][_NB_S_LENGTH],
dia = _get_screw_fam(data_screw[i][_NB_S_DESC])[_NB_F_OUTER_DIA]) {
echo(name, fam, len, dia, i*2*dia-2*dia*scri[j][0]);
translate([i*2*dia-2*dia*scri[j][0], 0, 0]) {
stainless() screw(name);//, thread="modeled");
translate([0,0,-5/4*len]) stainless() nut(fam);//, thread="modeled");
}
}
}
}
This diff is collapsed.
// Norm Nuts and Bolts - a OpenSCAD library
// Copyright (C) 2012 Johannes Kneer
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// DATABASE ACCESS FUNCTIONS AND CONSTANTS
// == CONSTANTS ==
// screw table access keys
_NB_S_DESC = 0;
_NB_S_FAMKEY = 1;
_NB_S_LENGTH = 2;
_NB_S_NOTHREAD_LENGTH = 3;
_NB_F_DESC = 0;
_NB_F_OUTER_DIA = 1;
_NB_F_INNER_DIA = 2;
_NB_F_LEAD = 3;
_NB_F_KEY = 4;
_NB_F_KEY_DEPTH = 5;
_NB_F_HEAD_HEIGHT = 6;
_NB_F_HEAD_DIA = 7;
_NB_F_NUT_KEY = 8;
_NB_F_NUT_HEIGHT = 9;
// == FUNCTIONS ==
// _get_screw("descriptor") with descriptor = M8x25
// find the line for a general object in the data matrix
function _get_screw(n) = data_screw[search([n], data_screw)[0]];
function _get_screw_fam(n) = data_screw_fam[search([_get_screw(n)[_NB_S_FAMKEY]], data_screw_fam)[0]];
function _get_fam(n) = data_screw_fam[search([n], data_screw_fam)[0]];
// _get_XXXXX("descriptor") functions
// find a single property in the database
function _get_desc(n) = _get_screw(n)[_NB_S_DESC];
function _get_famkey(n) = _get_screw(n)[_NB_S_FAMKEY];
function _get_length(n) = _get_screw(n)[_NB_S_LENGTH];
function _get_nt_length(n) = _get_screw(n)[_NB_S_NOTHREAD_LENGTH];
function _get_outer_dia(n) = _get_screw_fam(n)[_NB_F_OUTER_DIA];
function _get_inner_dia(n) = _get_screw_fam(n)[_NB_F_INNER_DIA];
function _get_lead(n) = _get_screw_fam(n)[_NB_F_LEAD];
function _get_head_height(n) = _get_screw_fam(n)[_NB_F_HEAD_HEIGHT];
function _get_head_dia(n) = _get_screw_fam(n)[_NB_F_HEAD_DIA];
function _get_nut_key(n) = _get_screw_fam(n)[_NB_F_NUT_KEY];
function _get_nut_height(n) = _get_screw_fam(n)[_NB_F_NUT_HEIGHT];
// Norm Nuts and Bolts - a OpenSCAD library
// Copyright (C) 2012 Johannes Kneer
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// USAGE EXAMPLES
include <cyl_head_bolt.scad>;
include <materials.scad>;
// == example nut catches and holes ==
difference() {
translate([-15, -15, 0]) cube([80, 30, 50]);
rotate([180,0,0]) nutcatch_parallel("M5", l=5);
translate([0, 0, 50]) hole_through(name="M5", l=50+5, cl=0.1, h=10, hcl=0.4);
translate([55, 0, 9]) nutcatch_sidecut("M8", l=100, clk=0.1, clh=0.1, clsl=0.1);
translate([55, 0, 50]) hole_through(name="M8", l=50+5, cl=0.1, h=10, hcl=0.4);
translate([27.5, 0, 50]) hole_threaded(name="M5", l=60);
}
// == example nuts and screws ==
$fn=60;
translate([0,50, 0]) stainless() screw("M20x100", thread="modeled");
translate([0,50,-120]) stainless() nut("M20", thread="modeled");
translate([30,50,0]) screw("M12x60");
translate([30,50,-80]) nut("M12");
translate([50,50,0]) screw("M5x20");
translate([50,50,-30]) nut("M5");
//key("M5");
// == example db lookups ==
//echo(_get_fam("M8"));
//echo(_get_screw("M5x8"));
//echo(_get_screw_fam("M5x8"));
// Norm Nuts and Bolts - a OpenSCAD library
// Copyright (C) 2012 Johannes Kneer
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// USAGE EXAMPLES
include <cyl_head_bolt.scad>;
include <materials.scad>;
// == example nut catches and holes ==
difference() {
translate([-15, -15, 0]) cube([80, 30, 50]);
rotate([180,0,0]) nutcatch_parallel("M5", l=5);
translate([0, 0, 50]) hole_through(name="M5", l=50+5, cl=0.1, h=10, hcl=0.4);
translate([55, 0, 9]) nutcatch_sidecut("M8", l=100, clk=0.1, clh=0.1, clsl=0.1);
translate([55, 0, 50]) hole_through(name="M8", l=50+5, cl=0.1, h=10, hcl=0.4);
translate([27.5, 0, 50]) hole_threaded(name="M5", l=60);
}
// == example nuts and screws ==
$fn=60;
translate([0,50, 0]) stainless() screw("M20x100", thread="modeled");
translate([0,50,-120]) stainless() nut("M20", thread="modeled");
translate([30,50,0]) screw("M12x60");
translate([30,50,-80]) nut("M12");
translate([50,50,0]) screw("M5x20");
translate([50,50,-30]) nut("M5");
//key("M5");
// == example db lookups ==
//echo(_get_fam("M8"));
//echo(_get_screw("M5x8"));
//echo(_get_screw_fam("M5x8"));
// Norm Nuts and Bolts - a OpenSCAD library
// Copyright (C) 2012 Johannes Kneer
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// MATERIALS
// all materials take a no-parameter that should be used to document
// the exact material in code, the number is not yet used in the code
module stainless(no="1.4301") {
color([0.45, 0.43, 0.5]) children([0:$children-1]);
}
module steel(no) {
color([0.65, 0.67, 0.72]) children([0:$children-1]);
}
module iron(no="ST37") {
color([0.36, 0.33, 0.33]) children([0:$children-1]);
}
// additional colors
CL_ZINC = [0.4, 0.4, 0.4];
/*
Modélisation d'un photoréacteur.
Projet CMI 2018/2019
*/
use <led_lz4-4xxxxx.scad>;
use <sv-led-1xxE.scad>;
include <nutsnbolts/cyl_head_bolt.scad>;
use <fan_60mm_x_25mm.scad>;
module nylon_washer() {
difference() {
color("AliceBlue") cylinder(d=7,h=1);
cylinder(d=3,h=1);
}
}
module led_drawer() {
ofs = .5; // Gestion des artefacts OpenGL
epaisseur=10;
union() {
difference() {
union() {
translate([-45,-45,0]) cube([90,90,epaisseur]);
// "Runners" à engager dans des rainures
translate([-45,-50,3]) cube([90,100,4]);
}
translate([0,0,-ofs]) cylinder(d=70,h=epaisseur+2*ofs);
}
// zones de vissage
for (angle = [0:90:270]) {
rotate([0,0,angle]) translate([0,63.5/2,0]) difference() {
cylinder(d=15,h=epaisseur);
translate([0,0,-ofs]) cylinder(d=6.35,h=epaisseur+2*ofs);
}
}
// Supports clips + et -
translate([45,-30,0]) difference() {
cube([3,15,epaisseur]);
translate([1,2.5,-ofs]) cube([2+ofs,10,epaisseur+2*ofs]);
translate([1,1.5,-ofs]) cube([.5,12,epaisseur+2*ofs]);
}
translate([45,15,0]) difference() {
cube([3,15,epaisseur]);
translate([1,2.5,-ofs]) cube([2+ofs,10,epaisseur+2*ofs]);
translate([1,1.5,-ofs]) cube([.5,12,epaisseur+2*ofs]);
}
}
// Clips métal
translate([45+1,-30+2,0]) color("Gray") union() {
cube([.5,12,20]);
translate([.5,0,20]) rotate([0,150,0]) cube([.5,12,20]);
}
translate([45+1,15+2,0]) color("Gray") union() {
cube([.5,12,20]);
translate([.5,0,20]) rotate([0,150,0]) cube([.5,12,20]);
}
}
module led_assembly() {
h_sink = 12.7;
sv_led_1xxe(12.7);
translate([0,0,h_sink]) rotate([0,0,15]) LZ4_4xxxxx();
for (angle = [15:60:315]) {
rotate([0,0,angle]) translate([0,19/2,h_sink+1.75]) nylon_washer();
rotate([0,0,angle]) translate([0,19/2,h_sink+1.75+1]) color([0.45, 0.43, 0.5]) screw("M3x20");
rotate([0,0,angle]) translate([0,19/2,0]) color([0.45, 0.43, 0.5]) nut("M3");
}
translate([0,0,-10]) led_drawer();
for (angle = [0:90:270]) {
rotate([0,0,angle]) translate([0,63.5/2,h_sink]) color([0.45, 0.43, 0.5]) screw("M6x30");
rotate([0,0,angle]) translate([0,63.5/2,-10]) color([0.45, 0.43, 0.5]) nut("M6");
}
}
led_assembly();
translate([0,0,-35]) fan_60mm_x_25mm();
\ No newline at end of file
/*
Modélisation d'un pilulier de 50x21 mm
*/
module pilulier() {
color("Ivory") cylinder(d=21,h=50);
}
pilulier();
/*
Radiateur Ohmite.
S series
https://www.mouser.fr/ProductDetail/Ohmite/SA-LED-113E
https://www.mouser.fr/ProductDetail/Ohmite/SV-LED-176E
*/
$fn = 30;
/* sector()
Source: https://openhome.cc/eGossip/OpenSCAD/SectorArc.html
*/
module sector(radius, angles, fn = 24) {
r = radius / cos(180 / fn);
step = -360 / fn;
points = concat([[0, 0]],
[for(a = [angles[0] : step : angles[1] - 360])
[r * cos(a), r * sin(a)]
],
[[r * cos(angles[1]), r * sin(angles[1])]]
);
difference() {
circle(radius, $fn = fn);
polygon(points);
}
}
/*
Radiateur S series
Quatre hauteurs:
h=12.7
h=25.4
h=50.8
h=76.2
*/
module sv_led_1xxe(h=12.7) {
ofs=.5; // Élimination de l'artefact OpenGL lors d'une différence
color("Silver") union() {
difference() {
cylinder(d=69.8,h=h);
// 6 vis #4
for (angle = [15:60:345]) {
rotate([0,0,angle]) translate([0,19/2,-ofs]) cylinder(d=2.845,h=h+2*ofs);
}
// 6 vis #10
for (angle = [45:60:345]) {
rotate([0,0,angle]) translate([0,25.4/2,-ofs]) cylinder(d=4.826,h=h+2*ofs);
}
// Définition des ailettes entourant un trou de #4
for (angle = [15:30:345]) {
rotate([0,0,angle])translate([0,19/2-2.845/2,-ofs]) linear_extrude(height=h+2*ofs) sector(radius=69.8,angles=[75,105]);
}
// Préparation pour les 4 vis de #1/4
for (angle = [0:90:270]) {
rotate([0,0,angle]) translate([0,63.5/2,-ofs])
cylinder(d=6.35+2*2,h=h+2*ofs);
}
}
// 4 vis #1/4
for (angle = [0:90:270]) {
rotate([0,0,angle]) translate([0,63.5/2,0]) difference() {
cylinder(d=6.35+2*2,h=h);
translate([0,0,-ofs]) cylinder(d=6.35,h=h+2*ofs);
translate([-3/2,6.35/2-1,-ofs]) cube([3,3,h+2*ofs]);
}
}
}
}
sv_led_1xxe();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment