Using OpenSCAD to produce drawings for 3D Printing

A place where discussions are about 3D printing.
User avatar
SimonWood
Trainee Driver
Trainee Driver
Posts: 655
Joined: Tue Apr 07, 2015 9:46 pm
Location: West Wales
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by SimonWood » Tue Dec 28, 2021 12:48 pm

ge_rik wrote: Tue Dec 28, 2021 12:28 pm Wow, that looks so cool (I believe that is the parlance these days ;) ).
I am sure you must be right. After all, there can't be many who are as hip as those of us who build model trains in our gardens ;)
ge_rik wrote: Tue Dec 28, 2021 12:37 pm I was wondering if I could use this to produce wheels for my 0-16.5 models. Their wheel diameter is 10.5mm, but the minimum seems to be 16mm.
I don't see why you shouldn't - I've not done anything as fancy as tuning this to ensure the parameters make sensible wheels. I'm sure you could already set parameters that would produce wheel profiles that performed really badly without altering the constraints, and the robustness will depend on the printer anyway. It's more that I've tried to constrain it for the likely ranges for 16mm because that just makes it quicker and less fiddly to churn out a wheel. As long as it is in those ranges!

Code: Select all

// Diameter of the wheel in mm
Diameter=20; //[10:0.5:32]
As you've spotted, you can change the constraints. In this case if you set the minimum to 10mm and the step size to 0.5mm you'd allow the diameter you're after. There are probably other parameters to adjust for 0-16.5 besides that!

User avatar
ge_rik
Administrator
Administrator
Posts: 6497
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by ge_rik » Tue Dec 28, 2021 3:41 pm

Thanks. I'll have a play and see what develops...

Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

User avatar
SimonWood
Trainee Driver
Trainee Driver
Posts: 655
Joined: Tue Apr 07, 2015 9:46 pm
Location: West Wales
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by SimonWood » Fri Dec 31, 2021 5:59 pm

SimonWood wrote: Sat Apr 10, 2021 12:49 pm I'll also put the OpenSCAD file up on Thingiverse in due course as CC-BY-NC-SA. In theory you can access all the Customizer stuff on there as a web form and then download an STL directly - in practice I've always found this functionality is broken and you need to download the .scad file to a local copy of the program anyway so you might as well just copy and paste...
I have now posted the wheels code up on Thingiverse (and it's only taken me 8 months to get round to it). Alas the Customizer still seems to be broken as far as I can see, so for now you still need to download OpenSCAD to render an STL file.

So... where next? I mentioned strapping but I haven't had a play with that yet. Instead I turned my attention to headboards. I liked the idea of being able to knock out a headboard on the printer, it's a cheap and cheerful and fast way to run a named train, and it seems that if the lettering is big enough it works ok even on a filament printer - and the ABS withstands the heat on a live steamer (not sure if resin would?) My first effort - last Christmas - was in TinkerCAD and getting the curved lettering was something of a nightmare... there's no curved lettering function so each letter has to be created as an individual text item and to ensure all of the letters were positioned correctly copied pairs of letters diametrically opposite (with the notional centre of the circle around which the lettering was curved at the midpoint). This let me move and rotate the letters at the same time to get the orientation correct...

Image

Mind you it worked...

Image

But making any changes to the lettering to make a new headboard was a nightmare, with each letter needing to be created and positioned individually, and I didn't want to spend all that time recreating it from scratch. I had a look for a vector graphics package that could generate curved lettering as an SVG which I believe you can then extrude in TinkerCAD, but it was hard to tell which packages might offer that option - and I didn't particularly want to learn a new package just for this! So, of course, this is where OpenSCAD came it - as I figured since you can easily change the parameters, why not make the text one of those, along with the radius of the curvature and the width of the headboard, etc. etc.

So the first thing is getting some text - this is pretty easy - using text() with the text you want and the height of the letters in mm:

Code: Select all

text("SANTA SPECIAL",6);
Image

But of course to be properly 3D you also want to be able to control how thick the letters are, this is where linear_extrude() comes in:

Code: Select all

linear_extrude(3)
    text("SANTA SPECIAL",6);
The argument 3 is the how thick to make it, i.e. how far to extrude the 2D shape into the third dimension...

Image

Of course so far, this is just a more difficult way of doing something I could have done in TinkerCAD.

But now if I use a for loop like I did with the spokes, I can iterate through the letters, rotating them 10° each time and translating them out to a radius of 30mm. (I've also centred the text to make it symmetrical about the y-axis centred on the origin.)

Code: Select all

// The text itself
the_text="SANTA SPECIAL";
// The number of degrees to rotate each letter through
degrees_per_letter=10;
// The radius of the curve for the lettering
radius = 30;
number_of_letters=len(the_text);
for (i = [0:number_of_letters-1]) { 
  rotate(((number_of_letters-1)*degrees_per_letter/2-i*degrees_per_letter))
      translate([0,radius,0])
          linear_extrude(3)
                text(the_text[i],halign="center",6); 
}
Image

So now if I want to change the lettering, I just need to edit the text string right at the beginning

Image

So now I had my curved text, I just needed a headboard to put it on.

User avatar
SimonWood
Trainee Driver
Trainee Driver
Posts: 655
Joined: Tue Apr 07, 2015 9:46 pm
Location: West Wales
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by SimonWood » Sat Jan 01, 2022 9:14 am

My headboard is a bit of a kludge and could do with some tidying up, but here it is.

Code: Select all

// Upper row text
Upper_row_text="SANTA";
//  Lower row text
Lower_row_text="SPECIAL";
//  The angle of the arc forming the headboard
angle=100; // [30:5:120]
//  How thick the board on which the lettering is placed should be
backboard_thickness=2; // [1:0.5:5]
//  How high the letters should be
font_size=6; // [4:12]
//  The thickness of the letters above the board
lettering_thickness=1; // [0.5:0.5:5]
//  The radius of arc forming the outer edge of the headboard
outer_radius=50;  // [30:100]
//  How big the border around the edge of the board should be
border_height=1; // [0.5:0.5:2]
//  The number of letters in the row with the most letters
max_letters=max(len(Upper_row_text),len(Lower_row_text));
//  The height of the headboard (i.e. the difference between the inner and outer radii)
board_height=font_size*3+border_height*2;
// Create the backboard
back_board(backboard_thickness,outer_radius,board_height,angle,lettering_thickness,border_height);
// Add the text
// Upper row
translate([0,0,backboard_thickness])
    text_arc(Upper_row_text,max_letters,font_size,lettering_thickness,outer_radius-board_height/2+font_size/2-2,0.75*angle);
// Lower row
translate([0,0,backboard_thickness])
    text_arc(Lower_row_text,max_letters,font_size,lettering_thickness,outer_radius-board_height+font_size/2,0.75*angle);
module text_arc(the_text,max_letters,font_size,lettering_thickness,radius,angle) {
    number_of_letters=len(the_text);
    letter_difference=max_letters-number_of_letters;
        for (i = [0:number_of_letters]) { 
        letter_angle=angle/2-((i+1+letter_difference/2)*(angle/(max_letters+1)));
        rotate(letter_angle)
            translate([0,radius,0])
                linear_extrude(lettering_thickness)
                    text(the_text[i],halign="center",font_size); 
    }
}
module back_board(thickness,radius,height,angle,border_thickness,border_width){
    difference() {
        union(){
        cylinder(thickness,radius,radius);
        circ(thickness+border_thickness,radius,border_width);
        circ(thickness+border_thickness,radius-height+border_width,border_width);
        rotate(90-angle/2)
            cube([radius,border_width,thickness+border_thickness]);
        rotate(-90+angle/2)
            translate([-radius,0,0])
                cube([radius,border_width,thickness+border_thickness]);
        offset_cylinder(thickness+border_thickness,height/2+border_width,radius,angle/2);
        offset_cylinder(thickness+border_thickness,height/2+border_width,radius,-angle/2);

    }
    translate([0,0,-1])
        cylinder(thickness+border_thickness+2,radius-height,radius-height);
                    translate([0,0,-1])
        circ(thickness+border_thickness+2,2*radius,radius);
            rotate(-angle/2)
        translate([0,0,-1])
            cube([radius,2*radius,thickness+border_thickness+2]);
                rotate(angle/2)
        translate([-radius,0,-1])
            cube([radius,2*radius,thickness+border_thickness+2]);
        translate([0,0,-1])
        offset_cylinder(thickness+border_thickness+2,height/2,radius,angle/2);
            translate([0,0,-1])
        offset_cylinder(thickness+border_thickness+2,height/2,radius,-angle/2);
                    translate([-radius,-radius,-1])
cube([radius*2,radius+2,thickness+border_thickness+2]);
    }
}
module circ(thickness,radius,width) {
    difference(){
        cylinder(thickness,radius,radius);
        translate([0,0,-1])
            cylinder(thickness+2,radius-width,radius-width);
    }
}
module offset_cylinder(height,radius,distance,angle){
    rotate(angle)
        translate([0,distance,0])
            cylinder(height,radius,radius);
}
module two_offset_cylinders(height,radius,distance,angle){
    offset_cylinder(height,radius,distance,angle);
    offset_cylinder(height,radius,distance,-angle);
}
module sector(thickness,radius,angle) {
    difference(){
        cylinder(thickness,radius,radius);
        translate([0,0,-1])
            two_offset_cubes(thickness+2,radius,radius,angle);
    }
}
module offset_cube(thickness,length,width,angle){
    rotate(45+angle)
       cube([length,width,thickness]);
}
module two_offset_cubes(thickness,length,width,height){
    offset_cube(thickness,length,width,angle);
    offset_cube(thickness,length,width,-angle);
}
module arc(thickness,radius,angle,width) {
    difference(){
        sector(thickness,radius+width,angle);
        translate([0,0,-1])
            sector(thickness+2,radius,angle+2);
    }
}
$fn=100;
Much like in TinkerCAD creating complex shapes is just a case of taking some simple shapes and combining them or subtracting one from another. For example a sector (or whatever the 3D equivalent of a sector is!) I made by taking a cylinder and then chopping off the bits I didn't want with some large cubes... crude, but exactly what I'd do in TinkerCAD. And arc (or 3D arc) is then just a sector with a sector subtending the same angle but a smaller radius subtracted from it.

I've used my curved text code from above but called it twice, once for each row. Rather than set the angle for each individual letter to rotate through I've set an angle for the arc of the whole headboard, and spaced the letters out within that. I'm not really sure whether this is a better approach. I also wanted the spacing for each row to be the same so I needed to base it on the number of letters in the longest row - OpenSCAD's max() makes it really easy to find the largest of the inputs you give it.

Image

As you can see you can change the text and various other parameters. Because it will use whatever space is available, if you try to cram too many letters in they will overlap, so you need to be careful when choosing your combination of text/angle/radius. It's currently set up more for fiddling than guaranteeing a good result every time - but it's still quicker than editing my headboard in TinkerCAD!

Here's a print from the code back in the summer for our first meet-up since 2019. It's a prototype for a headboard in memory of our friend in the South West Wales area group.

Image

Even after fiddling the parameters you can see the letter spacing is a problem more generally - since really having each letter spaced evenly never works. An 'I' is much narrower than a 'W'. I haven't found anything in OpenSCAD to solve this, although I think from Googling around there may be libraries other people have developed which I can use - I need to look into this more... So when I have a moment to refine this code I'm going to try to improve this - or at least make the various parameters 'interlock' a bit more so it's quicker to get something that just works, whatever the length of the text.

Oh and here's a bracket to glue to the back for mounting it on the lamp iron.

Code: Select all

difference(){
    cube([14,8,3]);
    translate([5,-1,-1])
        cube([4,10,2]);
    translate([-1,-1,1])
        cube([4,10,3]);
    translate([11,-1,1])
        cube([4,10,3]);
}
Image

User avatar
ge_rik
Administrator
Administrator
Posts: 6497
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by ge_rik » Sat Jan 01, 2022 1:30 pm

Hi Simon
Have you figured out a way of getting the flare at the base of a loco dome or chimney with OpenSCAD? It's one of the trickiest things to do in TinkerCAD and I've still not yet mastered it.

Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

User avatar
-steves-
Administrator
Administrator
Posts: 2412
Joined: Thu Jul 28, 2011 1:50 pm
Location: Cambridge & Peterborough

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by -steves- » Sat Jan 01, 2022 4:05 pm

In Tinkercad for curved words I just use this, it's built in and simple to use.
delete.JPG
delete.JPG (46.1 KiB) Viewed 4942 times
The buck stops here .......

Ditton Meadow Light Railway (DMLR)
Member of Peterborough and District Association
http://peterborough.16mm.org.uk/

User avatar
SimonWood
Trainee Driver
Trainee Driver
Posts: 655
Joined: Tue Apr 07, 2015 9:46 pm
Location: West Wales
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by SimonWood » Sat Jan 01, 2022 4:54 pm

ge_rik wrote: Sat Jan 01, 2022 1:30 pm Have you figured out a way of getting the flare at the base of a loco dome or chimney with OpenSCAD? It's one of the trickiest things to do in TinkerCAD and I've still not yet mastered it.
This is a great question. But not an easy one! Especially as I've never made a dome virtually or physically. I've had a look at the way you did it in TinkerCAD (cutting into a disc with a Taurus) and I guess physically you'd do it on a lathe (and a mill?) which seems like a good excuse to look at OpenSCAD's rotate_extrude() which is sort of like a virtual lathe... although the outcome is really just going to be the same as what you did in TinkerCAD, nothing more.

But out of curiosity...

If I draw a square and cut a circle out of it I get the shape I'm after (this is the 2D equivalent to cutting the torus out of the disc).

Code: Select all

difference(){
    square([3,3]);
    translate([0,3,0])
        circle(3);
}
$fn=100;
Image

Now I rotate_extrude() it

Code: Select all

rotate_extrude()
    translate([-10,0,0])
            difference(){
                square([3,3]);
                translate([0,3,0])
                    circle(3);
            }
$fn=100;
Image

And then if I want I can stick a dome inside it.

Code: Select all

dome();
module dome() {
cylinder(10,7,7);
translate([0,0,10])
    sphere(7);
flare();
}
module flare() {
rotate_extrude()
    translate([-10,0,0])
            difference(){
                square([3,3]);
                translate([0,3,0])
                    circle(3);
            }
}
$fn=100;
Image

Still left with the problem of wrapping it round the boiler curve though...
-steves- wrote: Sat Jan 01, 2022 4:05 pm In Tinkercad for curved words I just use this, it's built in and simple to use.
Well that could have saved me a lot of work! (Although I'd have learned a lot less...) I looked for something like that - and couldn't find it - and indeed I still can't find it!

User avatar
-steves-
Administrator
Administrator
Posts: 2412
Joined: Thu Jul 28, 2011 1:50 pm
Location: Cambridge & Peterborough

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by -steves- » Sun Jan 02, 2022 9:36 am

The dome looks fantastic, however it's only good for a flat boiler. The dome for a round boiler needs the flare to change inline with the size of the curve of the boiler.

If you can do the code for that, it would be extremely useful, especially for those of us who struggle with any type of programming :thumbup:
The buck stops here .......

Ditton Meadow Light Railway (DMLR)
Member of Peterborough and District Association
http://peterborough.16mm.org.uk/

User avatar
SimonWood
Trainee Driver
Trainee Driver
Posts: 655
Joined: Tue Apr 07, 2015 9:46 pm
Location: West Wales
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by SimonWood » Sun Jan 02, 2022 10:01 am

-steves- wrote: Sun Jan 02, 2022 9:36 am The dome looks fantastic, however it's only good for a flat boiler. The dome for a round boiler needs the flare to change inline with the size of the curve of the boiler.

If you can do the code for that, it would be extremely useful, especially for those of us who struggle with any type of programming :thumbup:
This definitely has the feel of a 3 pipe problem…

I think there may be ways to do it… Googling suggests I need to understand how it handles minkowski() addition - I don’t - and there may be less computationally intensive ways to do it, but I probably need other OpenSCAD transformations and keywords I don’t know about. Which is why I’m enjoying the puzzle (especially as I have no need to print a dome!) I found an online book Mastering OpenSCAD which is excellent (I’ve already identified errors in my techniques, and discovered things e.g. submodules that could make my ‘code’ much neater).

User avatar
philipy
Moderator
Moderator
Posts: 5033
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by philipy » Sun Jan 02, 2022 10:28 am

SimonWood wrote: Sun Jan 02, 2022 10:01 am
-steves- wrote: Sun Jan 02, 2022 9:36 am The dome looks fantastic, however it's only good for a flat boiler. The dome for a round boiler needs the flare to change inline with the size of the curve of the boiler.

If you can do the code for that, it would be extremely useful, especially for those of us who struggle with any type of programming :thumbup:
This definitely has the feel of a 3 pipe problem…

I think there may be ways to do it… Googling suggests I need to understand how it handles minkowski() addition - I don’t - and there may be less computationally intensive ways to do it, but I probably need other OpenSCAD transformations and keywords I don’t know about. Which is why I’m enjoying the puzzle (especially as I have no need to print a dome!) I found an online book Mastering OpenSCAD which is excellent (I’ve already identified errors in my techniques, and discovered things e.g. submodules that could make my ‘code’ much neater).
Cor blimey...my brain 'urts just reading wot you've rit, let alone trying to understand it!

Hats off to you though Simon. :D
Philip

User avatar
SimonWood
Trainee Driver
Trainee Driver
Posts: 655
Joined: Tue Apr 07, 2015 9:46 pm
Location: West Wales
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by SimonWood » Sun Jan 02, 2022 10:29 am

This doesn't help with the dome problem... but I did find, in Mastering OpenSCAD, both the mirror transformation and a neat trick with a for loop that helps with symmetrical objects - such as my headboard above.

Take for example the cylinders I used for the cutouts in the headboard. I can take this piece of code, which basically involves a copy and paste job on the cylinder with 1 parameter changed for its reflected counterpart:

Code: Select all

//  How thick the board on which the lettering is placed should be
backboard_depth=2;
//  How high the letters should be
font_size=6;
//  The thickness of the letters above the board
lettering_depth=1;
//  The radius of arc forming the outer edge of the headboard
outer_radius=50;
//  How big the border around the edge of the board should be
border_width=1;
backboard_height=3*font_size+2*border_width;

rotate(-120/2)
    translate([0,outer_radius,-1])
        cylinder(backboard_depth+lettering_depth+2,backboard_height/2,backboard_height/2);
rotate(120/2)
    translate([0,outer_radius,-1])
        cylinder(backboard_depth+lettering_depth+2,backboard_height/2,backboard_height/2);
Image

I can just use one instance of the code - and because if you give mirror() the zero vector as the direction to mirror in, it won't mirror - just use a for loop from 0 to 1 to draw both the original and the reflected copy:

Code: Select all

//  How thick the board on which the lettering is placed should be
backboard_depth=2;
//  How high the letters should be
font_size=6;
//  The thickness of the letters above the board
lettering_depth=1;
//  The radius of arc forming the outer edge of the headboard
outer_radius=50;
//  How big the border around the edge of the board should be
border_width=1;
backboard_height=3*font_size+2*border_width;

for (i=[0:1])
    mirror( [i, 0, 0] )
        rotate(120/2)
            translate([0,outer_radius,-1])
                cylinder(backboard_depth+lettering_depth+2,backboard_height/2,backboard_height/2);
Image

Shorter, neater, and easier to maintain.

User avatar
ge_rik
Administrator
Administrator
Posts: 6497
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by ge_rik » Sun Jan 02, 2022 2:51 pm

SimonWood wrote: Sun Jan 02, 2022 10:01 am I found an online book Mastering OpenSCAD which is excellent (I’ve already identified errors in my techniques, and discovered things e.g. submodules that could make my ‘code’ much neater).
As Philip says - it looks like quite a steep initial learning curve. I skimmed through the 'Basics' section and got brain meltdown about half way through. No doubt, if I put my mind to it with a specific outcome in sight, I might be able to make some progress. My trouble is that I'm a bit impatient and want to start seeing results quickly. I suspect I'd have to do a fair amount of basic stuff before I could get to the stage of drawing a simple half decent shape.

Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

User avatar
SimonWood
Trainee Driver
Trainee Driver
Posts: 655
Joined: Tue Apr 07, 2015 9:46 pm
Location: West Wales
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by SimonWood » Sun Jan 02, 2022 4:06 pm

philipy wrote: Sun Jan 02, 2022 10:28 am Hats off to you though Simon. :D
Thank you - incidentally, rotate_extrude() would be an excellent way of creating a hat to 3D print :lol:

Let's come back to this:
-steves- wrote: Sun Jan 02, 2022 9:36 am The dome looks fantastic, however it's only good for a flat boiler. The dome for a round boiler needs the flare to change inline with the size of the curve of the boiler.

If you can do the code for that, it would be extremely useful, especially for those of us who struggle with any type of programming :thumbup:
Mastering OpenSCAD, excellent though it is, keeps teaching me new things that I think might be helpful with this... and then they turn out not to be. Mind you, I'm only 6 chapters in. Still an impatient corner of my brain wants to find a solution already, and I've started wondering if my approach isn't running against the grain of what OpenSCAD is good at. I've been thinking of transforming the 3D mesh, using some kind of fillet, a bit like Metalmuncher demonstrated in Fusion 360. But it seems to me the strength of OpenSCAD is being able to create a piece of geometry and then reuse it - with different parameters as needed.

So I started thinking about creating the flare in segments, changing the geometry each time to fit the boiler. E.g. take the 2D shape and just extrude it through a few degrees, then change it and extrude a few more. Making it smooth is then just a question of adding in enough steps. Steps can be a parameter so you can choose however many you want before you render.

Image

This shows how it looks with a deliberate low number of steps (36) so you can see the changes.

Image

With 360 steps it looks a lot more smooth. It does take an awfully long time to render. ~40 minutes on my ageing Intel MacBook Pro. So much for not being computationally intensive. :roll: There's bound to still be a much better way to do this.

Here's the code - the parameters are the number of steps, the width of the actual flare, the full radius of the dome/chimney (to the outer edge of the flare), and the radius of the boiler it will sit on.

Code: Select all

steps=360;
fwidth=3;
fradius=10;
boiler_radius=25;
function h(angle) = boiler_radius*(1-cos(asin(fradius*sin(angle/steps)/boiler_radius)));
function x(h)=h+pow(h,2)/(2*fwidth);
for (i=[0:steps]) {
   rotate(360*i/steps)
        rotate_extrude(angle=360/steps)
            translate([-fradius,0,0])
                    difference(){
                        translate([0,-h(360*i),0])
                            square([fwidth,fwidth+h(360*i)]);
                        translate([-x(h(360*i)),fwidth,0])
                            circle(fwidth+x(h(360*i)));
                        if(sin(360*i/steps)!=0)
                            translate([fradius,-boiler_radius,0])
                              scale([1/sin(360*i/steps),1,1])
                                    circle(boiler_radius);
                    }
}
$fn=100;
This is just a proof of concept. I haven't given any thought to how to print it - but probably the best way would be to add this code to the boiler and chimney/dome and print them as one piece. Failing that it would need some sort of collar to strengthen the edges, I'd think.

User avatar
philipy
Moderator
Moderator
Posts: 5033
Joined: Sun Jan 30, 2011 3:00 pm
Location: South Northants

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by philipy » Sun Jan 02, 2022 4:34 pm

ge_rik wrote: Sun Jan 02, 2022 2:51 pm My trouble is that I'm a bit impatient and want to start seeing results quickly. I suspect I'd have to do a fair amount of basic stuff before I could get to the stage of drawing a simple half decent shape.
Exactly my thoughts as well. That was how I got my head around Sketchup and probably why I can't get on with Tinker.
Philip

User avatar
ge_rik
Administrator
Administrator
Posts: 6497
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by ge_rik » Sun Jan 02, 2022 5:35 pm

Wow! That looks excellent!! Even with the rendering time, it's a lot better than I could achieve with TinkerCAD.

Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

User avatar
-steves-
Administrator
Administrator
Posts: 2412
Joined: Thu Jul 28, 2011 1:50 pm
Location: Cambridge & Peterborough

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by -steves- » Sun Jan 02, 2022 6:57 pm

ge_rik wrote: Sun Jan 02, 2022 5:35 pm Wow! That looks excellent!! Even with the rendering time, it's a lot better than I could achieve with TinkerCAD.

Rik
I also have an old (7 years old and not high spec) laptop and it took less than 10 mins to render, so no issues there, it gives a great finish and easy to change, liking it so far :D
The buck stops here .......

Ditton Meadow Light Railway (DMLR)
Member of Peterborough and District Association
http://peterborough.16mm.org.uk/

User avatar
SimonWood
Trainee Driver
Trainee Driver
Posts: 655
Joined: Tue Apr 07, 2015 9:46 pm
Location: West Wales
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by SimonWood » Sun Jan 02, 2022 7:17 pm

ge_rik wrote: Sun Jan 02, 2022 5:35 pm Wow! That looks excellent!! Even with the rendering time, it's a lot better than I could achieve with TinkerCAD.
-steves- wrote: Sun Jan 02, 2022 6:57 pm I also have an old (7 years old and not high spec) laptop and it took less than 10 mins to render, so no issues there, it gives a great finish and easy to change, liking it so far :D
Good stuff, let me know if you attempt to print it!

Interesting my machine was so slow rendering even though it is slightly younger! I'm due a new one, so we'll see if OpenSCAD can render any quicker with an M1 chip...

User avatar
-steves-
Administrator
Administrator
Posts: 2412
Joined: Thu Jul 28, 2011 1:50 pm
Location: Cambridge & Peterborough

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by -steves- » Sun Jan 02, 2022 7:48 pm

SimonWood wrote: Sun Jan 02, 2022 7:17 pm
ge_rik wrote: Sun Jan 02, 2022 5:35 pm Wow! That looks excellent!! Even with the rendering time, it's a lot better than I could achieve with TinkerCAD.
-steves- wrote: Sun Jan 02, 2022 6:57 pm I also have an old (7 years old and not high spec) laptop and it took less than 10 mins to render, so no issues there, it gives a great finish and easy to change, liking it so far :D
Good stuff, let me know if you attempt to print it!

Interesting my machine was so slow rendering even though it is slightly younger! I'm due a new one, so we'll see if OpenSCAD can render any quicker with an M1 chip...
I won't get chance to print it for a few days, but I will do, plus I will add the rest of the dome to the top in Tinkercad, once printed I will post it up.

My laptop is a Gen 1 i5, the first of the i5 chips, these days in comparison its a snail and is also due for an upgrade but I just can't afford it right now. I do have 8GB of RAM but actually need 32GB, lol. What I could do with a gen 10 i5, i7 or even i9! :lol:
The buck stops here .......

Ditton Meadow Light Railway (DMLR)
Member of Peterborough and District Association
http://peterborough.16mm.org.uk/

IanT
Cleaner
Cleaner
Posts: 5
Joined: Wed Mar 04, 2020 8:24 am

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by IanT » Mon Jan 03, 2022 5:13 pm

Interesting to find this thread starting up again.

For 2D CAD, I used TurboCAD for over 20 years but it wasn't much use when I finally acquired a 3D printer. A fellow G3 Society member suggested OpenSCAD and I found it was a simple way to get into 3D printing useful items of a fairly simple nature. I certainly liked the idea that 'designs' could be shared using just a text file - and by changing base variables, one design could be very simply resized or modified...

However, SCAD wasn't suitable for my engineering drawing requirement and wasn't going to replace my ageing TC 2D. Coming to 3D CAD late (2020) I found Solid Edge Community Edition and although it took more effort to learn than SCAD had, it's my go-to CAD system these days (it's free to download btw).

Meanwhile, some other G3S members have really dived deeper into SCAD and you may like to look at the G3 Forum where John C has been posting printable LNER carriage parts and more recently a water tower and early GPO phone box. Worth a look if you are interested in using SCAD for model railway related work. Being SCAD, I suspect they can be easily rescaled...

You'll find the telephone box here if interested....

https://g3forum.org.uk/index.php?topic= ... n#msg18464

Regards,

IanT

User avatar
SimonWood
Trainee Driver
Trainee Driver
Posts: 655
Joined: Tue Apr 07, 2015 9:46 pm
Location: West Wales
Contact:

Re: Using OpenSCAD to produce drawings for 3D Printing

Post by SimonWood » Mon Jan 03, 2022 7:43 pm

IanT wrote: Mon Jan 03, 2022 5:13 pm I certainly liked the idea that 'designs' could be shared using just a text file - and by changing base variables, one design could be very simply resized or modified...
Yes, I really like this too.
I found Solid Edge Community Edition and although it took more effort to learn than SCAD had, it's my go-to CAD system these days (it's free to download btw).
Thanks for the tip! Only runs on Windows though - however that's probably for the best, I have little enough time to spend learning OpenSCAD without getting distracted by another CAD system...
Meanwhile, some other G3S members have really dived deeper into SCAD and you may like to look at the G3 Forum where John C has been posting printable LNER carriage parts and more recently a water tower and early GPO phone box. Worth a look if you are interested in using SCAD for model railway related work. Being SCAD, I suspect they can be easily rescaled...

You'll find the telephone box here if interested....

https://g3forum.org.uk/index.php?topic= ... n#msg18464
That's fantastic - I will take a look at those when I have a moment, I'm sure they can be rescaled so I might well have a go at printing the phone box - and more than that, to learn from the SCAD techniques used. Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests