Skip to main content

Star Ornament

OCCT category icon with a stylized logo representation

๐ŸŽ„ Nothing says festive season quite like a beautiful star ornament. In this beginner-friendly tutorial, you'll learn how to create a classic 3D printable star that can grace the top of your tree or hang as a festive decoration.

This tutorial introduces fundamental CAD concepts: creating polygon wires, applying fillets for smooth edges, and extruding 2D shapes into 3D solids. These techniques form the foundation for countless holiday decorations and beyond!

The Star Shapeโ€‹

Our star begins as a simple 2D wire created using the createStarWire function. This generates a classic five-pointed star shape that we'll then fillet (round the corners) and extrude into a 3D solid. The fillet operation gives our star a softer, more elegant look while also making it safer to handle and easier to 3D print.

Star ornament
Bitbybit Platform

Star ornament in Rete

Rete

Understanding the Codeโ€‹

Star Wire Creationโ€‹

The createStarWire function generates our star shape with these key parameters:

  • numRays: The number of star points (5 for a classic star)
  • outerRadius: Distance from center to the tips
  • innerRadius: Distance from center to the inner valleys
  • direction: The normal vector (facing up in Y direction)

Filleting for Polishโ€‹

We apply two rounds of filleting:

  1. 2D Fillet: Rounds the corners of the wire before extrusion, creating smooth transitions between the star's points
  2. 3D Fillet: Applied after extrusion to round all edges, making the ornament pleasant to touch and easier to print

Extrusionโ€‹

The extrusion transforms our 2D face into a 3D solid. The direction vector [0, 1, 0] creates a 1-unit thick star. Adjust this for thicker or thinner ornaments!

Adding a Holeโ€‹

To hang your star ornament on a tree, we need to add a hole at the top. We'll use a boolean difference operation to cut a cylinder through the top point of the star. This is a fundamental CAD technique that allows you to subtract one shape from another.

The cylinder is positioned at the top of the star (at the outer radius on the Z-axis) and oriented along the Y-axis to create a clean hole through the thickness of the ornament.

Star ornament with a hanging hole
Bitbybit Platform

Star ornament with a hanging hole in Rete

Rete

Understanding the Hanging Holeโ€‹

The hanging hole is created using these key concepts:

  1. Cylinder Creation: We create a cylinder using createCylinder with:

    • center: [0, -0.5, 4.2] - positioned at the top star point (Z = 4.2 is slightly inside the outer radius of 5)
    • radius: 0.4 - small enough to leave material around the hole
    • height: 2 - extends through the full thickness of the star
  2. Boolean Difference: The difference operation subtracts the cylinder from the star, creating a clean hole. This is one of the most powerful CAD operations, allowing you to:

    • Create holes and cutouts
    • Carve complex shapes
    • Remove material precisely

Exporting to STL for 3D Printingโ€‹

Now that we have our star ornament ready, let's export it as an STL file for 3D printing! The saveShapeStl function converts our OCCT shape into a binary STL file that can be opened in any slicer software.

Star ornament exported to STL
Bitbybit Platform

Star ornament exported to STL in Rete

Rete

Understanding STL Exportโ€‹

The saveShapeStl function exports your 3D model with these options:

  • fileName: The name of the downloaded file (e.g., star.stl)
  • precision: Controls mesh quality (0.001 is high quality)
  • upAxis: keep leaves the model Y-up, and yUpToZUp turns it Z-up (some 3D printers prefer this)
  • tryDownload: Automatically triggers the file download
  • binary: Uses binary STL format (smaller file size than ASCII)

Making It Your Own ๐ŸŽโ€‹

Try these festive variations:

  • Six-pointed Star: Change numRays to 6 for a Star of David style
  • Chubby Star: Increase innerRadius closer to outerRadius
  • Tree Topper: Increase the thickness for a substantial tree-top star

3D Printing Tipsโ€‹

Your star ornament is print-ready! For best results:

  • Layer Height: 0.2mm works great
  • Infill: 15-20% is sufficient for lightweight ornaments
  • Material: PLA in gold, silver, or festive red looks stunning
  • Support: Usually not needed when printed flat

Happy holidays and happy modeling! ๐ŸŒŸ