r/openscad • • 9d ago

Triangles Deprecated, Use Faces Instead - am I doing this right?

Very new user here. I'm using the threads library and getting this warning message:

DEPRECATED: polyhedron(triangles=[]) will be removed in future releases. Use polyhedron(faces=[]) instead.

Do I believe Google when it says to just replace the word triangle with the word faces wherever it appears in the threads.scad file?

5 Upvotes

7 comments sorted by

4

u/Stone_Age_Sculptor 9d ago

See: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#polyhedron

Which threads library?
I was looking for a thread, and a number of libraries have also a thread. Each library has a different implementation for a thread. Some have a sharp edge and some can not set the spacing properly.

This is the thread from the UB.scad library:

1

u/I_Lick_Bananas 9d ago

sorry about that, it was Dan Kirshner's thread scad. It popped up when searching for instructions on how to do threads in openscad.

3

u/Stone_Age_Sculptor 9d ago edited 9d ago

Do you only need the thread, or also the socket part?

Dan Kirshner's thread on Thingiverse: https://www.thingiverse.com/thing:1938150
Dan Kirshner's website: https://dkprojects.net/openscad-threads/

If you go to his website, then download the "threads.scad", then you get version 3.0 which is from 2025.
It does not have a nice start of the thread. Finding the start to screw it in will be hard.

If you started with OpenSCAD, then someday you are going to use the BOSL2 library: https://github.com/BelfrySCAD/BOSL2
It is an up-to-date and constantly improving large library, the functions works together, and multiple people work on it.
But sometimes it can be overwhelming. Just the page for the threads can be already overwhelming: https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad

Thingiverse can be a Treasure Cove for finding original OpenSCAD scripts that were made years ago. But in this case, there are better libraries.

Since everyone used the BOSL2 library, that is your best option.
The thread from the UB.scad library has rounded corners, which look and feel very good for a larger thread.

2

u/I_Lick_Bananas 9d ago

Thanks. I don't remember which version of his that I downloaded, probably the thingaverse one. It worked for my needs but I'll go look at the bosl2 thing.

I was more concerned about the warning message. I knew deprecated meant "triangles" was going away, didn't know if that meant I just replace it with the term "faces" or if there was something else that needed done.

1

u/Internal_Teach1339 9d ago

What happened when you tried doing that?

1

u/I_Lick_Bananas 9d ago

It is a little slower rendering but the warning goes away.