The link contains a little more of the backstory and the downloadable model from a 3rd-party site, additionally the full source code is included in the post.
Some highlights:
- Implemented date calculations entirely in OpenSCAD (with no built-in date support, which was challenging but fun). - Customizable layout, multi-material printing support, and translation for all text elements. - Configurable holes for magnets/screws to mount on a fridge or wall. - Utilizes JustinSDK/dotSCAD and davidson16807/relativity.scad for string manipulation. - Correctly takes into account leap years.
Would love to hear your feedback. Thanks for checking it out!
Is this like hobby only like writing an app in brainfuck? Or am I missing something?
If I was dealing with diagonals, I needed to calculate sines and cosines outside and then place the values. If needed several objects with the same shape I needed copy and paste them, and if the base shape was wrong, I needed to delete them all, fix, and then copy and paste again. And if a value of dimension, position or angle depended on another it was more and more calculations. Soon it became unsustainable for me.
OpenSCAD saved me. Being able to create modules, using parametric values, declaring functions and so on made my life really easier. At the first it looked like it would be boring to do everything by code, but once you get used to it is actually faster than using a WYSIWYG tool.
So then under the open source, own your designs umbrella you have stuff like FreeCAD which is similar to traditional CAD which means you have a learning curve.
OpenSCAD is programmatic which suits someone with a software engineering background. Plus being free in the sense of owning your designs.
Perfect. I already knew how to code, so it was just a question of minutes to learn the basic stuff of the language and then I could just do what I wanted.
Fusion360, AutoCAD and organic modeling tools like Blender you need to learn several concepts, keybindings, navigating through menus, panels, tabs, workspaces, etc, etc. So many things _before_ doing something. In OpenSCAD you can even code in the text editor you're already familiar and then use it only to render the object (which can also be done through CLI!)
SolidPython is a Python lib that generates OpenSCAD code, so you can use whatever Python code you want to give more power to OpenSCAD.
Here's a QR code generator that I made in 30 lines, using a QR code library + NumPy + SolidPython: https://github.com/lucasoshiro/solidpython-qrcode/blob/main/...
Once you totally comprehend this, all the "functional" shit of OpenSCAD makes total sense.
Python does not have that kind static description properties, and those OpenSCAD-Python translators suck very much, imho.
Can you name them? I'm not being sarcastic, I just want more options :-) (if they are free and open source, just like OpenSCAD)
Kind of funny to see string manipulation functions implemented in Openscad code.
Personally I've stopped using openscad recently (*in the last few years). I found it's lack of ability to create attachment/mate connectors significantly inhibited it's ability to compose complex objects. I looked into the amount of effort required to support attachments and ultimately decided that it was the wrong approach and have since migrated to Python & cadquery.
I’m also keeping an eye on zoo (fka KittyCAD). It too has performance problems, but if/when it stabilizes it’s exactly what I want.
I think I've reached feature parity with OpenSCAD, and a similar level of ease of use, but with multithreading and all of Rust available, including the https://www.dimforge.com/ libraries and high quality 2D offsetting with https://github.com/jbuckmccready/cavalier_contours
In case anyone fails to notice the link to dotSCAD - do investigate it. That bloke (sadly now deceased was a OpenSCAD legend!)
Sunday after the first full moon on or after Mar 21. If the full moon is a Sunday, then the following Sunday. The date of the full moon is not an astronomical one and its date is left as an exercise for the reader.
There are two Easters too - the Orthodox one involves the Julian calendar, the Roman (etc) involves the Gregorian calendar.
You could chicken out with a lookup table!
I'm really happy to see OpenSCAD so often here in HN!
Let me also show something that I did: a Braille generator: https://github.com/lucasoshiro/openscad-braille
It's also available in Thingiverse, so it can generate STL files without having to use OpenSCAD natively: https://www.thingiverse.com/thing:6463849/remixes
OpenSCAD is functional/declarative, so you can't change the state of a variable, functions don't have colateral effects, lists are immutable, and so on.
We also don't have for, while or if-else in the way we have in other languages. A for loop in OpenSCAD is only a way to repeat objects (= 3D objects, not POO objects), if-else are like a ternary operator for objects, the objects aren't values, and so on.
OpenSCAD has also some built-in less common features. One highlight for me are native vector and matrix multiplication, and other is the list index based on the name of the axis (list.x means list[0], list.y means list[1] and list.z means list[2]). But it lacks string and list operations, which would demand some FP-fu to write your own functions to manipulate them, just like the author did.
If you speak Portuguese, I gave a course last year about OpenSCAD. The slides are available here: https://lucasoshiro.github.io/posts-en/2024-03-24-openscad/
If so am loathed to print those because you need an automatic material system and it creates a lot of poop (cut-offs when switching colour)
It think it might be OK to have say 5 white layers then a couple of ink layers.
Also how do you get on with the slicer with fonts.
I found this difficult when printing a dog tag. I sort of got the impression it may be better to have a "gcode font" rather than go TTF->Triangles (STL)->Gcode
However overall: great effort and I love openscad. I love the idea of it I only used it once as I have been busy!
Designs of this kind don't leave that much poop, there's not much waste when it's only a few layers.
> Also how do you get on with the slicer with fonts.
Haven't had many problems with them, I usually enlarge the text until I'm happy. I also usually do $fn = 360 for OpenSCAD which uses so many triangles that you can't really see it not being round with your naked eye.