Home โ€บ Intro to Parametric Design
๐Ÿ”ฅ Module 01 ยท Advanced

Intro to Parametric Design

What if you could write a magic spell to create your own toys, tools, and treasures? That's parametric design! You write the rules, and the computer builds your ideas. Ready to become a code magician? ๐Ÿง™

Imagine building with LEGOs. To make a house taller, you have to add more bricks one by one. What if you could just tell the house "Grow taller!" and it did? That's what we're doing today with code!

๐Ÿ›ก๏ธ Safety Check: Real-world 3D printers use a super-hot nozzle (hotter than an oven! ๐Ÿ”ฅ) to melt plastic. Never touch the metal tip or moving parts while it's running. It's also a good idea to print in a room with good airflow (like an open window). Always ask a parent to be there when you operate the real machine. For today, we're just writing code in our safe, digital sandbox!
๐Ÿ’ป

Coding 3D Models with OpenSCAD

OpenSCAD is a free tool that lets you design 3D models with code. Instead of dragging shapes with a mouse, you write commands. If you want a box to be wider, you just change a number in your code, like width = 50;. It's powerful, precise, and lets you build amazing things.

๐Ÿ“บ Teaching Tech โ€” "OpenSCAD for 3D Printing" โ€” A great intro to how code loops and variables can build amazing things.

๐Ÿง™ The Three Magic Spells of CSG

Constructive Solid Geometry (CSG) sounds complicated, but it's just playing with digital blocks! There are three "spells" you'll use all the time:

Combine โœจ

Glues shapes together to make a new, single shape.

union();

Carve โ›๏ธ

Uses one shape to cut a hole out of another.

difference();

Overlap ๐Ÿค

Keeps ONLY the part where two shapes are both touching.

intersection();
๐Ÿ’ป Mission: The Magic Subtraction

Mastering the Carving Spell

Let's practice the carving spell! In the code below, we're using difference() to subtract a cylinder from the center of a cube. Hit the button to see it in action.

Compiler Output:
๐Ÿš€ Project: Design a Custom Name Tag

Make Something Uniquely YOURS!

Let's use our new skills to make something you can actually use: a custom name tag for your backpack. This is the perfect first project!

Step 1: Create the Base

First, we need a solid block. This code makes a flat rectangle. The numbers are `[width, depth, height]`. Try changing them to see how the shape changes!

Step 2: Carve Your Name!

Now for the fun part! We'll use our difference() spell again, but this time with the text() command. Change "Pan" to YOUR name and hit 'Carve It!' to make it your own!

Wait, how did the text get in the right spot? ๐Ÿค”

Great question! The translate([x, y, z]) command is like a "move" tool. We told it to move our text 5mm to the right (the X value) and 8mm "up" from the bottom edge (the Y value) to position it perfectly on the tag before carving. You'll use this command all the time to assemble parts!

๐Ÿค– The Clone Machine! (Using `for` Loops)

Making one thing is cool. Making 100 is power. A for loop is a classic coding tool that repeats an action. It's like having a robot army to build for you!

Intermediate Mission: Build a Tower

You've seen how to make a line of things on the X-axis. Now, let's build UP! Your mission: use a for loop and translate to stack 5 cubes on top of each other. Remember, the Z-axis is the last number in `[X, Y, Z]`!

๐Ÿงฑ Level Up: Build Your Own LEGO Block with `module`

Real programmers hate copy-pasting code. Instead, they package useful code into reusable blocks called modules. It's like creating your very own custom LEGO brick that you can use over and over with different properties!

Mission: The Name Tag Factory!

We've turned the name tag code into a reusable module. Now you can make a tag of any size with any name just by calling one command! Your mission: Call the module to make a tag for "Pan", then call it a second time to make a smaller tag for a friend named "Alex" right below it.

๐Ÿ”ฅ Boss Level: The Gear Factory

Build a Planetary Gear System

This is a true engineering puzzle! A planetary gear system has a central "sun" gear and several "planet" gears that orbit it. Your mission is to use a for loop, rotate(), and translate() to place 5 "planet" gears in a perfect circle around the central sun gear.

System Output:

โœจ The Next Frontier: Your AI Co-Pilot

Coding shapes is powerful, but what if you could just... ask for a shape? That's the next adventure! Tools like Luma AI Genie let you type "a happy turtle wearing a tiny top hat" and an AI will generate a 3D model for you! The coolest part is using AI as your co-pilot. You can generate a base model with AI, then import it into a tool like Blender (or even OpenSCAD!) to add your own custom parts and parametric features. It's the perfect blend of AI creativity and your engineering control.

๐Ÿ›ก๏ธ AI Safety Check

  • Be the Director: Use AI as a starting point. It's a tool to help your creativity, not replace it! You're the one in charge.
  • No Personal Info: Never type your full name, address, or school into an AI generator. Keep your private information private.
  • Talk About It: If an AI makes something that seems weird or makes you uncomfortable, tell a parent or trusted adult right away.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For Parents: AI tools like Luma Genie are amazing for creativity but often require an account (and parental consent). This is a perfect "explore together" activity. You can co-pilot the sign-up and be amazed at what your child dreams up!

๐Ÿ“š Learn More