Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:26 28 Jun 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : 3D printing at JLCPCB...

     Page 2 of 2    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9153
Posted: 10:37am 06 Aug 2022
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 84
Posted: 03:08pm 06 Aug 2022
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 84
Posted: 03:08pm 06 Aug 2022
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 84
Posted: 03:14pm 06 Aug 2022
Copy link to clipboard 
Print this post

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 States
Posts: 3042
Posted: 04:12pm 06 Aug 2022
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9153
Posted: 08:10am 07 Aug 2022
Copy link to clipboard 
Print this post

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: Australia
Posts: 975
Posted: 08:20am 07 Aug 2022
Copy link to clipboard 
Print this post

  Quote  I'd still welcome anyone else's openSCAD code/programs, to give me more things to play with.

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: Australia
Posts: 1869
Posted: 08:34am 07 Aug 2022
Copy link to clipboard 
Print this post

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: Germany
Posts: 960
Posted: 10:25am 07 Aug 2022
Copy link to clipboard 
Print this post

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: Australia
Posts: 975
Posted: 10:46am 07 Aug 2022
Copy link to clipboard 
Print this post

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
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024