Skip to content

jasonthorsness/tree-dangler

Repository files navigation

Tree Dangler

Tree Dangler helps you create a dangling ornament from laser-cut wood pieces held together by jump rings. It enables you to:

  1. Design the ornament
  2. Simulate how it will hang
  3. Export the SVG for the laser cutter

🥳 Try it now @ jasonthorsness.github.io/tree-dangler/ 🥳

tree-dangler

Here is an example finished ornament hanging from a ribbon and also held in front of the simulation. The error is parallax; it matches the simulation almost perfectly.

example-1

You might think, this seems easy, why go to the trouble of writing a computer program to do this? That's what I thought too, until I tried three times to manually create this tree ornament. What I found is that some rings are under tension, some are under compression, and with the loose fit it's actually incredibly difficult to predict how the final result will hang. I failed miserably: pieces touched, uneven gaps, the whole thing was askew. So if you have incredible intuition for physics, you might not need this program. But if you need some help like I did, and want a perfect result every time, read on!

How To Make An Ornament

Open Tree Dangler and click "Load / Empty". You will see a triangle:

how-1

Find some image on the web to trace. For example, say we are making a cloud. Find an image of a cloud and copy it (like with Snipping Tool, or right-click "Copy Image"). Then go back to Tree Dangler and use CTRL+V to set it as the background of the editor:

how-2

Now use the green points and lines to trace the cloud. Add a new point by clicking on the line, remove a point by using the delete or backspace key. If you make a mistake, CTRL+Z should work to undo. You should end up with a fully traced shape. Don't worry about keeping the lines smooth it will be smoother later. Once you are done tracing, use the "Remove Background" button to discard the background image. Also drag the vertical connector to re-connect one end of it to your shape, and move it until the simulator shows the shape is balanced. Use the mouse wheel to make it larger or smaller and drag with the middle mouse button depressed to re-center.

how-3

At any time you can Save to save to a file, or Copy Link to effectively save to the clipboard for sharing. For example here is the link from this example project.

Now left-click to add pieces to the cloud. Each piece will have text associated with it. Don't add too many pieces or it will get hard to connect them in a way where they hang nicely. Don't worry about the exact text placement, you will fine-tune the text position and font later in InkScape. If you don't want to be distracted by the simulation while adding pieces you can switch to the SVG view. Here is my progress so far.

how-4

If you want the pieces more rounded, use "settings" to adjust the noise, rounding, gap, etc. This is also where you should adjust the length of the connectors to match the jump rings you have. Also if you are using very thick wood you will need to reduce the effective length of the connector as well (not necessary for 3 mm stock). Here I've made the cloud more rounded.

how-5

Next is the tricky part: with the simulation view visible, add connectors until all the pieces are connected and hang correctly. You will likely find that some connectors are under compression, instead of tension, and these connectors will not keep the pieces apart. These connectors can be selected and put into "compression" mode, which will adjust the through-hole placement to maintain correct spacing under compression. This takes some practice. Once you have everything simulating nicely, switch back to the SVG view and make sure no holes are touching each other or the edges of the shapes. Here is my result for the cloud:

how-6

At this point you should Save your work, and Export SVG. You will need to do some post-processing in InkScape. Load the exported SVG in InkScape, and adjust the text font and location to exactly where you want it. Also, if you will be hanging the ornament from a thicker ribbon, you might want to enlarge the hole the ribbon will go through. Here I've chosen a different font, adjusted the placement, and made a larger hole:

how-7

Now, ⚠️ DO NOT FORGET THIS KEY STEP ⚠️: Select All in InkScape (CTRL+A) and use Path/Object To Path. Then save the SVG; it is ready for laser cutting!

In GlowForge, you want to Cut the holes and outlines, and Engrave the text.

how-7

Once the pieces are cut, use some needle-nose pliers to add a jump ring according to your connector scheme. Refer back to Tree Dangler to see which holes are paired. It might hang funny in intermediate states, but once all the pieces are together, your result should match the simulation. Good luck!

how-9

How It Works

Tree Dangler was 99% vibe-coded using Gemini. So, the code is a little messy and confused, and the undo functionality is occasionally flaky. So don't consider the source a paragon of quality. But, if you'd like to understand it, check out this article.

More Examples

Made something cool? Select "Copy Link" and submit a PR here to share!

License

The license is MIT.

Contributing

Feel free to fork or submit a patch.

About

A tree ornament creator and simulator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages