![]() |
Forum Index : Microcontroller and PC projects : 3D printing at JLCPCB...
![]() ![]() |
|||||
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9153 |
Thanks everyone, useful information. I have downloaded openSCAD and will play about with that. If anyone has any simple STL files they would like to share for me to experiment with, please do upload them here. AT THIS STAGE, I am never gonna want anything other then project enclosure/cases that I will get made at JLCPCB to test out their printing abilities. Smoke makes things work. When the smoke gets out, it stops! |
||||
IanT Regular Member ![]() Joined: 29/11/2016 Location: United KingdomPosts: 84 |
Here's a very simple model for you to play with Grogs - it make 'fillers' (for T-slots) to keep swarf getting in. Try changing length, height etc and then perhaps add some more holes.... // // // T-Slot Filler - IanT // L = 75; // T-Slot Length HR = 1.5; // Hole Radius BW = 14; // Bottom (of Slot) Width TW = 8; // Top (of Slot) Width BH = 4; // Bottom (of Slot) Height TH = 9; // Top (of Slot) Height // // difference () { union () { cube ([L,BW,BH], center=false); translate ([0,(BW/2-TW/2),0]) cube ([L,TW,TH]); } translate ([L/2,BW/2,0]) cylinder (TH,HR,HR); } |
||||
IanT Regular Member ![]() Joined: 29/11/2016 Location: United KingdomPosts: 84 |
Here's a very simple model for you to play with Grogs - it make 'fillers' (for T-slots) to keep swarf getting in. Try changing length, height etc and then perhaps add some more holes.... // // // T-Slot Filler - IanT // L = 75; // T-Slot Length HR = 1.5; // Hole Radius BW = 14; // Bottom (of Slot) Width TW = 8; // Top (of Slot) Width BH = 4; // Bottom (of Slot) Height TH = 9; // Top (of Slot) Height // // difference () { union () { cube ([L,BW,BH], center=false); translate ([0,(BW/2-TW/2),0]) cube ([L,TW,TH]); } translate ([L/2,BW/2,0]) cylinder (TH,HR,HR); } |
||||
IanT Regular Member ![]() Joined: 29/11/2016 Location: United KingdomPosts: 84 |
Perhaps of more useful to you - a box (with lid) - Not my work (sorry cannot remember source of code now) been a while. Regards, IanT //cube([94,40,20],center=true); $fn=100; width=40; height=20; length=94; rounding=1; thickness=2; screwHole=0.8; box(); translate([0,width+5,-height+rounding]) lid(); module lid(){ difference(){ hull(){ translate([(length/2)-(rounding*2),(width/2)-(rounding*2),height-thickness]) cylinder(thickness,rounding-0.2,rounding-0.2); translate([-(length/2)+(rounding*2),(width/2)-(rounding*2),height-thickness]) cylinder(thickness,rounding-0.2,rounding-0.2); translate([(length/2)-(rounding*2),-(width/2)+(rounding*2),height-thickness]) cylinder(thickness,rounding-0.2,rounding-0.2); translate([-(length/2)+(rounding*2),-(width/2)+(rounding*2),height-thickness]) cylinder(thickness,rounding-0.2,rounding-0.2); } translate([(length/2)-(rounding*4),(width/2)-(rounding*4),height/2]) cylinder(height-thickness,screwHole,screwHole); translate([-(length/2)+(rounding*4),(width/2)-(rounding*4),height/2]) cylinder(height-thickness,screwHole,screwHole); translate([(length/2)-(rounding*4),-(width/2)+(rounding*4),height/2]) cylinder(height-thickness,screwHole,screwHole); translate([-(length/2)+(rounding*4),-(width/2)+(rounding*4),height/2]) cylinder(height-thickness,screwHole,screwHole); } } module box(){ //box shape difference(){ hull(){ translate([(length/2)-rounding,(width/2)-rounding,0]) sphere(rounding); translate([-(length/2)+rounding,(width/2)-rounding,0]) sphere(rounding); translate([(length/2)-rounding,-(width/2)+rounding,0]) sphere(rounding); translate([-(length/2)+rounding,-(width/2)+rounding,0]) sphere(rounding); translate([(length/2)-rounding,(width/2)-rounding,height-rounding]) sphere(rounding); translate([-(length/2)+rounding,(width/2)-rounding,height-rounding]) sphere(rounding); translate([(length/2)-rounding,-(width/2)+rounding,height-rounding]) sphere(rounding); translate([-(length/2)+rounding,-(width/2)+rounding,height-rounding]) sphere(rounding); } //inner cut hull(){ translate([(length/2)-(rounding+thickness),(width/2)-(rounding+thickness),+thickness]) sphere(rounding); translate([-(length/2)+(rounding+thickness),(width/2)-(rounding+thickness),+thickness]) sphere(rounding); translate([(length/2)-(rounding+thickness),-(width/2)+(rounding+thickness),+thickness]) sphere(rounding); translate([-(length/2)+(rounding+thickness),-(width/2)+(rounding+thickness),+thickness]) sphere(rounding); translate([(length/2)-(rounding+thickness),(width/2)-(rounding+thickness),+(thickness+height)]) sphere(rounding); translate([-(length/2)+(rounding+thickness),(width/2)-(rounding+thickness),+(thickness+height)]) sphere(rounding); translate([(length/2)-(rounding+thickness),-(width/2)+(rounding+thickness),+(thickness+height)]) sphere(rounding); translate([-(length/2)+(rounding+thickness),-(width/2)+(rounding+thickness),(thickness+height)]) sphere(rounding); } //lip hull(){ translate([(length/2)-(rounding*2),(width/2)-(rounding*2),height-thickness]) cylinder(thickness+1,rounding,rounding); translate([-(length/2)+(rounding*2),(width/2)-(rounding*2),height-thickness]) cylinder(thickness+1,rounding,rounding); translate([(length/2)-(rounding*2),-(width/2)+(rounding*2),height-thickness]) cylinder(thickness+1,rounding,rounding); translate([-(length/2)+(rounding*2),-(width/2)+(rounding*2),height-thickness]) cylinder(thickness+1,rounding,rounding); } } //lug difference(){ union(){ translate([(length/2)-(rounding*4),(width/2)-(rounding*4),0]) cylinder(height-thickness,rounding*3,rounding*3); translate([-(length/2)+(rounding*4),(width/2)-(rounding*4),0]) cylinder(height-thickness,rounding*3,rounding*3); translate([(length/2)-(rounding*4),-(width/2)+(rounding*4),0]) cylinder(height-thickness,rounding*3,rounding*3); translate([-(length/2)+(rounding*4),-(width/2)+(rounding*4),0]) cylinder(height-thickness,rounding*3,rounding*3); } translate([(length/2)-(rounding*4),(width/2)-(rounding*4),height/2]) cylinder(height-thickness,screwHole,screwHole); translate([-(length/2)+(rounding*4),(width/2)-(rounding*4),height/2]) cylinder(height-thickness,screwHole,screwHole); translate([(length/2)-(rounding*4),-(width/2)+(rounding*4),height/2]) cylinder(height-thickness,screwHole,screwHole); translate([-(length/2)+(rounding*4),-(width/2)+(rounding*4),height/2]) cylinder(height-thickness,screwHole,screwHole); } } |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3042 |
This is a very timely thread for me. I've found these Aliex boxes in black and white which are a good size for me: https://www.aliexpress.com/item/1005001849742165.html -- 140x82x38mm. ![]() But it takes me an inordinate amount of time to do a not very good job of making the cutouts. ![]() ![]() On that latter box I still have to drill 5 holes for another mini-stereo-jack x5 PCB. So if I can design my own boxes for JLCPCB to print, I'm bound to come out ahead if I value my time at all. Thanks especially, IanT, for posting that enclosure code. It should get me started. I like the procedural code for openSCAD--I do much better if I can see a text representation of what is to be drawn, and I like the precision of laying out the measurements. So I've started in on the tutorials. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9153 |
Thanks very much Ian, for your code examples. They import and work just fine. The 2nd code you posted for the box, produced a very recognizable result in the form of a small project case with a matching lid: ![]() This gives me a basic project box and code, that I can play about with, just to learn how to do things, which I think will be helpful for me to learn the program a bit better. @ lizby - yes, it is the damn hole-cutting and various machining aspects that I hate about building any project. I might even just use the example that IanT posted above, and use that to get JLCPCB to make me a couple of those little cases, so I can examine the finished result and see if it is a process I would like to use moving forward. I'd still welcome anyone else's openSCAD code/programs, to give me more things to play with. Does not even have to be a project case, just anything at all that I can play about with, and see what changing various bits of code does to the result etc, to help me learn it. Smoke makes things work. When the smoke gets out, it stops! |
||||
Revlac![]() Guru ![]() Joined: 31/12/2016 Location: AustraliaPosts: 975 |
I did post some small things a while back,https://www.thebackshed.com/forum/ViewTopic.php?FID=4&TID=13128 Just small stuff, but good to play with. Cheers Aaron Off The Grid |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 1869 |
A bit off topic, but for making square holes any properly equipped cabinet makers shop will have a square drill press. The drill press isn't square, it drills square holes! If only it worked on plastic, I tried but the plastic just shattered. They are essentially an aggressive drill inside a hollow square chisel. |
||||
Martin H.![]() Guru ![]() Joined: 04/06/2022 Location: GermanyPosts: 960 |
simple Example Box in Tinkercad Use the Box Shape ![]() Place and resize it as you whish ![]() select the shape to cut ![]() Resize it and place it inside the Box ![]() merge both Shapes to one ![]() there is the Box. Which can be downloaded as .obj, .stl, .gbl or .svg File imho. for simple Shapes an easy way to construct. Edited 2022-08-07 20:31 by Martin H. 'no comment |
||||
Revlac![]() Guru ![]() Joined: 31/12/2016 Location: AustraliaPosts: 975 |
Works in a similar way. ![]() In Scad difference(){ cube([80,40,20]); translate([2,2,2]) cube([76,36,20]); } Cheers Aaron Off The Grid |
||||
![]() ![]() |
![]() |