tompi / cheapino

An affordable split 36 keys keyboard
624 stars 23 forks source link

Modifying the heat inserts on 3D case #98

Open azzamsa opened 2 days ago

azzamsa commented 2 days ago

Hi,

This is the only local shop here that sells heat inserts with flanges. Sadly, the length is limited, and I have to modify the OpenSCAD file. I chose the one with the flange because people said it is cleaner to work with a soldering iron.

image

Do you have any recommendations on which one I have to pick?

I think M2 x 4 (inner diameter) x 4 (length) is a good candidate here.


I tried opening the file, but I'm still struggling to find the code to change to M2 x 4 (inner diameter) x 4 length. I used the development version (appimage), but the rendering time is slow (on the powerful machine) and the rendered image is distorted, even though I have followed your guide.

I think I will modify using FreeCAD. Rotating the rendered image in OpenSCAD is super slow. I can't even zoom properly.

image

tompi commented 2 days ago

Hey, did you read the readme file that is in the case folder? There are some options to drastically speed up rendering.

Also, if you render it using F6, it will look smoother and be quicker to interact with.

To change heat inserts, you will want to tweak the "mounting_hole_insert()" function in "modules.scad"

Check alignement of holes carefully after changing them!

tompi commented 2 days ago

I THINK it should be enough to change line 383 to:

cylinder(h=4, r=1.9);

azzamsa commented 2 days ago

Hey, did you read the readme file that is in the case folder? There are some options to drastically speed up rendering.

Ah, I only doing the 3 million, and somehow skip the manifold. It is not in Feature tab anymore. The docs doesn't say anything about this and google doesn't help. So I went to the IRC and they point me to https://fosstodon.org/@OpenSCAD/113256867413539398. I will make a related PR to Cheapino doc.

Btw, the original measurements are:

// M2 heat inserts. 3mm outer diameter.  4mm length
cylinder(h=4, r=1.4); 

I wanted to use M2 heat inserts. 4mm outer diameter. 4mm legth, how do you come up with 1.9 where do you get this number?

@@ -380,7 +380,7 @@ module mounting_hole_insert() {
     color("#bcbd22")
     translate([45.85, -23, 0]) {
       translate([0,0,4.1])
-      cylinder(h=4, r=1.4);
+      cylinder(h=4, r=1.9);
     }
 }

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder

tompi commented 2 days ago

The current recommended size is outer diameter 3mm, radius 1.4 means 0.2 "too tight".

Too make 4mm fit with same snugness you need radius 1.9, which translates to 3.8 diameter, leaving same 0.2mm too tight hole, so you melt it in the same way. You might experimen with e.g. 1.85 or 1.95, but 1.9 should be a good starting point.