Created
January 14, 2021 20:43
-
-
Save TomyCesaille/9742571276409d0b1d16db2115f17f21 to your computer and use it in GitHub Desktop.
OpenSCAD Lens cap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A lens cap. | |
* Units in mm, default values are for | |
* a PENTACON auto 2.8/135 MC lens. | |
* | |
* 2021, Joris La Cancellera | |
* License: CC-BY-SA | |
* | |
*/ | |
/* [primary] */ | |
// Total height of the cap | |
height = 8; // [2:40] | |
// Inner (mechanical) diameter of the cap | |
inner_dia = 60; // [40:300] | |
// Wall thickness | |
thickness = 2.0; // [1:0.5:5] | |
/* [Hidden] */ | |
$fn=100; | |
outer_dia = inner_dia + 2 * thickness; | |
/* [Code] */ | |
difference() | |
{ | |
cylinder(d=outer_dia, h=height, center=true); | |
translate([0,0,thickness]) | |
cylinder(d=inner_dia, h=height, center=true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From the blog post https://jorislacance.fr/blog/2021/01/14/bahtinov.