履歴: 3Dプリンタ作例/LEGO互換部品

各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 13 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます

日時タイトル文字数追加削除内容差分基準
2023/1/30 16:22:463Dプリンタ作例/LEGO互換部品 最新版11,028+1 -1表示差分—
2023/1/30 16:22:463Dプリンタ作例/LEGO互換部品 11,034+0 -1表示差分選択
2022/12/9 10:25:553Dプリンタ作例/LEGO互換部品 11,035+0 -19表示差分選択
2022/12/9 10:25:553Dプリンタ作例/LEGO互換部品 11,820+20 -0表示差分選択
2022/3/4 2:29:043Dプリンタ作例/LEGO互換部品 11,034+43 -0表示差分選択
2022/3/4 2:19:363Dプリンタ作例/LEGO互換部品 9,391+28 -0表示差分選択
2021/12/20 23:50:093Dプリンタ作例/LEGO互換部品 8,693+6 -1表示差分選択
2021/12/14 23:55:213Dプリンタ作例/LEGO互換部品 8,514+58 -18表示差分選択
2021/12/11 3:55:253Dプリンタ作例/LEGO互換部品 7,332+256 -0表示表示中選択
2021/12/6 5:00:233Dプリンタ作例/LEGO互換部品 1,255+1 -0表示差分選択
2021/12/4 12:40:293Dプリンタ作例/LEGO互換部品 1,207+18 -0表示差分基準
2021/12/4 12:40:293Dプリンタ作例/LEGO互換部品 868+33 -1表示差分選択
2021/12/4 6:58:553Dプリンタ作例/LEGO互換部品 131— —表示—選択

基準: 3Dプリンタ作例/LEGO互換部品 (2021/12/4 12:40:29) → 比較: 3Dプリンタ作例/LEGO互換部品 (2021/12/11 3:55:25)

@@ -15,6 +15,7 @@
&ref(gcode0.png,,33%);
&ref(model1.png,,20%);
+&attachref(WIN_20211206_10_34_56_Pro.jpg,,33%);
四角い部分、15.80 mm の設計が、X 方向は 15.90 mm, Y 方向は 15.65 mm となっていた。
Y 方向のバックラッシュが少し大きくなってきているのかもしれない、とも思ったのだけれど、
@@ -57,3 +58,259 @@
このあたりは寸法で調整もできなくはないのだけれど、本来はやはりリニアアドバンスなどで対応するべきなんだよなあ。。。
ファームウェアの書き換えも含めて、もう少し本腰を入れて調べてみようかしら。
+
+#ref(lego4x10x0.png,around,right,25%);
+
+** こういうのは OpenSCAD が良いみたい [#ge2e0a89]
+
+パラメータで与えたサイズのブロックを生成できる。
+
+lego_block.scad
+
+#clear(all);
+
+ LANG:scad
+ // 鏡像を複製する
+ module sym_m(d=[1,0,0], p=[0,0,0]) {
+ children();
+
+ translate(p)
+ mirror(d)
+ translate(-p)
+ children();
+ }
+
+ // 直交する鏡2枚分の鏡像を複製する
+ module sym_2m() {
+ children();
+ mirror([0,1,0]) children();
+ mirror([1,0,0]) {
+ children();
+ mirror([0,1,0]) children();
+ }
+ }
+
+ // 回転対称で複製する
+ module sym_c(n, axis=[0,0,1]) {
+ for(r=[1:n])
+ rotate(r*axis*360/n)
+ children();
+ }
+
+ // 単純なレゴブロックを作る
+ // 面積 n x m 高さ l
+ // シートを作るには l = 1/3 にする
+ module lego_block(n=2,m=2,l=1,
+ width_delta=0.08,
+ width_unit=8,
+ wall_thick=1.55,
+ wall_bevel = 0.4,
+ corner_bevel = 0.8,
+ height_unit=9.6,
+ ceil_thick=1,
+ prot_diameter=4.9 + 0.1,
+ prot_height=1.7,
+ prot_bevel = 0.15,
+ bottom_d1 = 6.5,
+ bottom_d2 = 4.9,
+ bottom_d3 = 3.1 + 0.18,
+ epsilon = 0.01,
+ fn = 80,
+ bottom_lp = 0.42,
+ bottom_bevel = 0.2
+ ) {
+
+ if(n < m) {
+ mirror([-1,1,0])
+ lego_block(n=m, m=n, l=l,
+ width_delta=width_delta,
+ width_unit=width_unit,
+ wall_thick=wall_thick,
+ wall_bevel = wall_bevel,
+ height_unit=height_unit,
+ ceil_thick=ceil_thick,
+ prot_diameter=prot_diameter,
+ prot_height=prot_height,
+ prot_bevel = prot_bevel,
+ bottom_d1 = bottom_d1,
+ bottom_d2 = bottom_d2,
+ epsilon = epsilon,
+ fn = fn,
+ bottom_lp = bottom_lp,
+ bottom_bevel = bottom_bevel
+ );
+ } else {
+
+ // 以降は必ず n > m になっているはず
+ translate([
+ width_unit*n/2,
+ width_unit*m/2, 0]) {
+
+ // 四角い枠
+ difference(){
+ // 外枠の直方体
+ translate([0, 0, -l*height_unit]/2)
+ cube([
+ width_unit*n - width_delta,
+ width_unit*m - width_delta,
+ l*height_unit],
+ center=true
+ );
+
+ // 裏側の抜き
+ translate([0, 0, -l*height_unit-ceil_thick]/2)
+ cube([
+ width_unit*n - wall_thick*2,
+ width_unit*m - wall_thick*2,
+ l*height_unit],
+ center=true
+ );
+
+ // 面取り
+ sym_2m() {
+ // 縦の辺の面取り
+ translate([
+ width_unit*n - width_delta,
+ width_unit*m - width_delta,
+ -l*height_unit]/2)
+ rotate([0, 0, 45])
+ cube([wall_bevel,wall_bevel,l*height_unit+0.1],
+ center=true);
+
+ // 下面の角の面取り
+ translate([
+ width_unit*n/2 - width_delta,
+ width_unit*m/2 - width_delta,
+ -l*height_unit])
+ rotate([0,0,1]*45)
+ rotate(atan(2/sqrt(2))*[0, 1, 0])
+ cube([1,2,2]*corner_bevel,
+ center=true);
+ }
+ }
+ }
+
+ // 上部
+ for(i=[0:n-1]) {
+ for(j=[0:m-1])
+ translate([
+ width_unit*(i+1/2),
+ width_unit*(j+1/2), 0])
+ intersection() {
+ // 上のポッチ
+ cylinder(
+ prot_height,
+ d=prot_diameter,
+ $fn=fn);
+
+ // 上部の面取り
+ cylinder(
+ prot_height,
+ r1=prot_diameter-prot_bevel,
+ r2=prot_diameter/2-prot_bevel,
+ $fn=fn);
+ }
+ }
+
+ // 内部に筒を持つ場合
+ if(m>=2) {
+ // 外枠からはみ出さないようにする
+ intersection(){
+ translate([
+ width_unit*n/2,
+ width_unit*m/2,
+ 0])
+ translate([0, 0, -l*height_unit]/2)
+ cube([
+ width_unit*n - width_delta,
+ width_unit*m - width_delta,
+ l*height_unit],
+ center=true
+ );
+
+ union () {
+ for(i=[1:n-1])
+ for(j=[1:m-1]) {
+ difference() {
+ union() {
+ // 下向きの筒の外側
+ translate([
+ width_unit*i,
+ width_unit*j,
+ -l*height_unit])
+ cylinder(
+ l*height_unit,
+ d=bottom_d1,
+ $fn=fn);
+
+ // 下部筒の「足」
+ translate([
+ width_unit*i,
+ width_unit*j,
+ 0])
+ sym_c(4)
+ translate([(bottom_d1+bottom_d2)/4,0,0])
+ rotate([0,45,0])
+ cube([bottom_lp,0.2,bottom_lp]*width_unit,center = true);
+ }
+
+ // 下向きの筒の内側
+ translate([
+ width_unit*i,
+ width_unit*j,
+ -l*height_unit])
+ translate([0,0,-0.1])
+ cylinder(
+ l*height_unit+0.2,
+ d=bottom_d2,
+ $fn=fn);
+ }
+
+ }
+
+ // 壁から生える足
+ sym_m([0,1,0], [0,width_unit*m/2,0])
+ for(i=[1:n-1]) {
+ translate([
+ width_unit*i,
+ wall_thick,
+ 0])
+ rotate([0,0,90])
+ rotate([0,45,0])
+ cube([bottom_lp,0.2,bottom_lp]*width_unit,center = true);
+ }
+
+ // 壁から生える足
+ sym_m([1,0,0], [width_unit*n/2, 0,0])
+ for(j=[1:m-1]) {
+ translate([
+ wall_thick,
+ width_unit*j,
+ 0])
+ rotate([0,45,0])
+ cube([bottom_lp,0.2,bottom_lp]*width_unit,center = true);
+ }
+ }
+ }
+ }
+ // 内側に棒を持つ場合
+ if(m==1) {
+ for(i=[1:n-1])
+ translate([i,1/2,0]*width_unit)
+ translate([0,0,-height_unit*l]) {
+ difference(){
+ cylinder(height_unit*l, r=bottom_d3/2, $fn=fn);
+
+ rotate_extrude($fn=80)
+ polygon([
+ [bottom_d3/2+epsilon-bottom_bevel,-epsilon],
+ [bottom_d3/2+epsilon,+bottom_bevel-epsilon],
+ [bottom_d3/2+epsilon,-epsilon]
+ ]);
+ }
+ }
+ }
+ }
+ }
+
+ lego_block(4,10,1/3);