Author Topic: First attempts at 3d design.....a few questions!  (Read 326 times)

0 Members and 1 Guest are viewing this topic.

Offline John Candy





Having spent a couple of hours getting absolutely nowhere with TurboCAD, I turned to OpenSCAD.
Much easier to understand and produced attached as a test template for loco domes.
The "difference" command I have difficulty applying in order to subtract the boiler section .... getting error messages (most likely a syntax issue)..... and still have to work out the commands necessary to put the concave "flare" in the base of the dome (presumably a donut-shaped ring needs to be subtracted using the difference command).

Looks as though process will be relatively simple once one has memorised the commands, etc.
I have a query regarding the resolution parameter $fn= ........ can it be applied only to spheres?
I am concerned that the cylindrical objects have an angular outline.

Guidance welcome....my ageing (probably shrinking) brain is suffering (hopefully temporary) overload!

Regards,
John.
My fellow Members, ask not what your Society can do for you, ask what you can do for your Society.

Offline cabbage

Re: First attempts at 3d design.....a few questions!
« Reply #1 on: Feb 22 2021 09:23 »
The default is a fifty sided polygon. The default polygon side is a min of 1mm. You can pre set the Function to be higher or lower. Going over a polygon of 100 results in a preview time in minutes and a F6 render in mega minutes!!!

You seem to need the function called minkowski(). This blendes two shapes into one. Thus you can make a cube with rounded corners and edges from a cube and a sphere. I do warn you that some of the results are extrely Daliesque(!)

Unless the print is rather large then I have never found the polygonal nature to be noticable. Attack ot with some wet and dry.

Regards

Ralph

Ps any scripts for the WIKI?

Offline IanT

Re: First attempts at 3d design.....a few questions!
« Reply #2 on: Feb 22 2021 09:41 »
As far as I know John the parameter $fn applies to any shape that can be defined within 360 degrees - so cylinders, curved surfaces, toroids etc.

It only effects 'rendered' images though - so the simple 'editor' pre-view image doesn't change when $fn is altered - you have to 'render' it to see the change.

Regards,

IanT
Nothing's ever Easy - At least the first time around.

Offline cabbage

Re: First attempts at 3d design.....a few questions!
« Reply #3 on: Feb 22 2021 13:00 »
Before Star Trek there were the books of Jack Williamson dealing with CT - Conta Terrene matter. I first explored 3D design using Bryce. One of the boxes you ticked was "Contra Terrene" AKA anti matter. Adding a CT object to a Terrene object cut a CT shaped hole in it.

If you use the same thought mode;

difference()
{
cube ([10,10,10]); // matter
sphere(11); // antimatter
}

Produces a Cube with a Spherical cutout.

The first line is matter, anything after is antimatter. You can increase the list of antimatter cutters by opening up a brace before the list and terminating the list with a brace.

Have a look at the window frames for the 2-nol in the WIKI.

Regards

Ralph

Offline John Candy

Re: First attempts at 3d design.....a few questions!
« Reply #4 on: Feb 22 2021 16:53 »




Ralph and Ian,

thank you for the helpful advice.
Have now managed to produce the above, as a generic loco dome template.
Idea is to manipulate the parameters to produce domes for specific locos, as required.

Whether it will print or not, I won't know for a couple of weeks!

Regards,
John.
My fellow Members, ask not what your Society can do for you, ask what you can do for your Society.

Offline cabbage

Re: First attempts at 3d design.....a few questions!
« Reply #5 on: Feb 22 2021 20:09 »
John,
It is fairly obvious that you can write code. The problem I have with it is that you do not use a standard programming format that enables others to edit your code.

You need to put more blank lines in to seperate areas of code. There should be proper "terminators" for a block of code SCAD uses a semicolon. Lock off sections of code with opened and closed braces to show what parts of the code are affected and indent them. One statement per line please.

As I always impressed on the Junior Programmers, you are not writing code for yourself -but for the next guy to use.

Regards

Ralph

Offline IanT

Re: First attempts at 3d design.....a few questions!
« Reply #6 on: Feb 22 2021 21:33 »
Matter/Anti-Matter - I hadn't thought of it quite like that before Ralph but I will from now on!  :-)

Regards,

IanT
Nothing's ever Easy - At least the first time around.

Offline 753

Re: First attempts at 3d design.....a few questions!
« Reply #7 on: Feb 23 2021 10:09 »
Impressive work John, unfortunately when they were handing out the brain cells I did not get enough to handle 3D Cad, hence have not explored 3D printing. It is useful for many parts, but if you need a brass dome you have to use older tech.
I had this Jubilee wheel printed and was impressed with the result also the strength.
I hope you get good use of your new printer.



Mike