-
Notifications
You must be signed in to change notification settings - Fork 0
/
postItBox.scad
72 lines (54 loc) · 2.05 KB
/
postItBox.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/****************************************************/
/* Project name: postItBox */
/* File: postItBox.scad */
/* Version: 1.1 */
/* Create by: Rom1 <[email protected]> */
/* CANEL - https://www.canel.ch */
/* Date: 22 avril 2017 */
/* License: GNU GENERAL PUBLIC LICENSE v3 */
/* Programme: openscad */
/* Description: Boîte pour ranger des post-it ou */
/* ou des cartes de visites. */
/****************************************************/
/*************/
/* Variables */
/*************/
thickness = 2; // Épaisseur de la boîte
paper_width = 57; // Dimension du papier (post-it, cartes, etc)
paper_length = 87;
box_height = 50; // Hauteur de la boîte
slit = true; // Prévoir l'ouverture
slit_width = 20; // Largueur de l'ouverture
base_width = 67; // Dimension du socle de la boîte
base_length = 97;
base_height = 2;
box_length = paper_length + thickness * 2;
box_width = paper_width + thickness * 2;
/***********/
/* Modules */
/***********/
// Module dessinant l'ouverture
module slit(){
translate([0, slit_width/2, 0]) cylinder(d=slit_width, h=thickness*3, center=false);
translate([-slit_width/2, slit_width/2, 0]) cube([slit_width, box_height-slit_width/2, thickness*3]);
}
// Module dessinant le socle
module base(){
cube([base_length, base_width, base_height]);
}
// Module dessinant la boîte
module container(){
difference(){
cube([box_length, box_width, box_height + thickness]);
translate([thickness, thickness, thickness]) cube([paper_length, paper_width, box_height]);
if (slit){
rotate([90, 0, 0]) translate([(box_length/2), base_height, -(base_width - box_width)/2]) slit();
}
}
}
/********/
/* Main */
/********/
base();
translate([(base_length - box_length)/2, (base_width - box_width)/2, 0]) container();
// vim: ft=openscad tw=100 et ts=4 sw=4