From 1515c884ced1de8f4e8aceb33123dad41c1ce0e5 Mon Sep 17 00:00:00 2001 From: sasza Date: Sat, 23 Aug 2025 22:37:02 +0200 Subject: [PATCH] =?UTF-8?q?celownuik2=20-=20przej=C5=9Bcier=20na=20bibliot?= =?UTF-8?q?ek=C4=99=20BOSL2,=20ulepszenia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sasza/celownik/celownik2.scad | 50 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/Sasza/celownik/celownik2.scad b/Sasza/celownik/celownik2.scad index 828edfb..c06f3f3 100644 --- a/Sasza/celownik/celownik2.scad +++ b/Sasza/celownik/celownik2.scad @@ -1,5 +1,8 @@ use use +include +include + // To jest model celownika do karabinu CZ Varmint // Koncepcyjnie składa się z 3 części - na górze jest szyna @@ -7,29 +10,27 @@ use // wystaje pałąk do przykręcenia (post) // parameters -length = 3; // ustaw poniżej 5 do testów wymiarów -c_s = length>5 ? 1 : 0.4; // chamfer_size używane tylko do testów -rail_height = 15; +length = 26; // ustaw poniżej 5 do testów wymiarów -clamp_inner = 22; +clamp_inner = 22.15; clamp_inner_acurracy = 50; clamp_thickness = 4; +c_s = length>5 ? 1 : 0.4; // chamfer_size używane tylko do testów +rail_height = -9.4 + clamp_inner/2 + 6.8; // -9.4 is to center the picatinny + post_thickness=15; -post_length=20; +post_length=15; post_slit=2; +post_chamfer = 1.665; -m3 = [6,3,5.7]; // M3 -m2 = [4.3,2,3.3]; // M2 -m2_5 = [5.5, 2.5, 4.68]; // M2.5 +nut_wall_t = 0.4; -screw = m2; +screw = "M2"; +info = screw_info(name=screw, head="socket"); +hh = struct_val(info, "head_height"); +screw_head_h = post_thickness - hh - nut_wall_t; -hex_size=screw[0]; // rozmiar nakrętki od rogu do rogu -screw_thread=screw[1]; // rozmiar gwintu -screw_head=screw[2]; // rozmiar główki śruby - -sink_depth = 3; // jak głęboko w pałąk powinny się wtopić główka oraz nakrętka difference() { // celownik @@ -40,7 +41,7 @@ difference() { // na górze picatinny if (length > 5) { rotate([90,0,-90]) translate([0,0,rail_height]) - picatinny_rail(l=length, d=rail_height, c=1.5, n=1, a=10); + picatinny_rail(l=length, d=rail_height, c=1.5, n=1, a=length/2); } // na dole wystający trzpień do przykręcenia translate([clamp_inner/2, post_thickness*-0.5, 0]) @@ -62,19 +63,16 @@ difference() { for (i = [length*1/4, length*3/4]) { translate([(clamp_inner + post_length)/2,0,i]) rotate([90,90,0]) - union() { - // Miejsce na nakrętkę - translate([0,0,post_thickness/2-sink_depth]) - cylinder(r=hex_size, h=sink_depth+0.1, $fn=6); - // dziura na wylot na gwint - translate([0,0,(-post_thickness-0.5)/2]) - cylinder(r=screw_thread, h=post_thickness+0.5, $fn=20); - // miejsce na główkę śruby - translate([0,0,(-post_thickness/2)-0.1]) - chamferCylinder(r=screw_head, h=sink_depth+0.1, ch=-0.5, ch2=0); - } + screw_hole(spec=screw, length=screw_head_h, head="socket", thread=0, $fn=100); + translate([(clamp_inner + post_length)/2,post_thickness/2 - nut_wall_t,i]) + rotate([90,90,0]) + nut_trap_inline(spec=screw, h=hh); + } } + // chamfer for slit + translate([clamp_inner/2 - post_slit/4,0,length/2-0.5]) rotate([0,0,45]) + cube([post_slit*post_chamfer,post_slit*post_chamfer,length+2], center=true); // debug - wyświetl rozmiar if(length < 5) {