Real Bruce

Just curious to know if anybody here uses the free, open source software OpenScad.

I recently bought myself a small beginners 3D printer and have been learning OpenScad - so far so good. I have created a number of items. One actual project has been quite successful and I have learned a lot about OpenScad and my printer doing it. However I am very much a beginner in using both.

There is one command in OpenScad that I think I understand the purpose of but am at a loss to know why I would use it.

The command in question is "Union()" which creates an object out of one or more parts. However it seems to me that creating several parts say, a cube and a cylinder, in the same place creates an object without using "Union".

I wonder if someone can explain why I would want to use this command, where it is useful and makes a difference to the project. So far I haven't used it and don't really understand its purpose.

Real Bruce

No need to panic I have found the answer.

For example in the difference command the first object is the result after every object there after is subtracted from it.

But what if the object you want to subtract from is made of two separate parts? This where the Union command comes in, it binds the two objects so every object afterwards is subtracted from them both.

cube(10); //this cube
cylinder(h=20, r=5); //and this cylinder are treated as one object

cube(5); //this is subtracted from them both


If the "union" function wasn't used both the cylinder and the cube would be subtracted from the original cube.

There you go...

The latest video from AVForums

Paramount + UK launch: Halo, Star Trek and Beavis, and all the latest 4K + Movie/TV News
Subscribe to our YouTube channel
Support AVForums with Patreon

Top Bottom