https://i.ebayimg.com/images/g/rIwAAOSwPrZlguxw/s-l1600.webp
try with http://nicescad.bitplan.com/
// title : Minitrix ICE-for Kids Kupplung
// author : Wolfgang Fahl
// license : Apache License
// revision : 0.1.0
// Original ICE4Kids Kupplung
module kupplung_ice4kids() {
l = 8.1;
w = 3.6;
h = 2.28;
r = 3.13 / 2;
dx = 5.0 / 2;
dz = -0.15;
union() {
translate([l/2, w/2, h/2])
cube([l, w, h], center=true);
for (fz = [-1, 1])
for (fx = [-1, 1])
translate([l/2 + fx * dx, w/2, h/2 + fz * dz])
sphere(r, $fn=36);
}
}
// Real-world ICE Kupplung (based on image)
module kupplung_ice() {
l = 5.9/2+2; // length
w = 2.4; // width
h = 2.0; // height
pin_r = 0.45; // radius = 0.9 diameter
pin_h = 4.03; // pin total
// offset
pdx = -2+1.3;
pdy = pin_h/2;
pdz = h/2;
union() {
translate([-l/2, -w/2, 0])
cube([l, w, h]);
translate([pdx,pdy,pdz]) {
rotate([90, 0, 0])
cylinder(r=pin_r, h=pin_h, $fn=36);
}
}
}
// Combined assembly
module kupplung() {
union() {
kupplung_ice4kids();
translate([-1, 1.7, 0.1]) kupplung_ice(); // offset to avoid overlap
}
}
// orient and render
//rotate([90, 0, 0])
kupplung();