07.【FCMD】 FreeCAD, LaTeX, and Klayout Are the Same

— The Common Structure of Full Code Design

tags: Mechanical Design, CAD, FreeCAD, LaTeX, Klayout, RTL, Git


🏁 Introduction (Final Article)

Throughout this series, we have covered:

In this final article, I want to zoom out
and make one clear statement:

💡 FreeCAD, LaTeX, Klayout, and even RTL
are all doing exactly the same thing.

There is no difficult theory here.
This is a structural explanation, optimized for Qiita.


🔑 The Most Important Rule of Full Code Design

Let’s start with the conclusion.

🧱 Never edit the final artifact directly.
Edit only the source that generates it.

That’s it.

👉 Always modify the source code.

This single rule is the boundary between
Full Code design and everything else.


🛠 The Case of FreeCAD

😵 Typical GUI-Based Design

👉 Diffs are unclear
👉 Design intent disappears


✅ Code-Driven Design (Articles 03–06)

Design code (.py / Spreadsheet)
        ↓
Geometry generated in FreeCAD
        ↓
STEP / Drawings

👉 Reviewable in Git
👉 Regeneratable at any time


📄 The Case of LaTeX

This is the most familiar example.

design.tex
    ↓
pdf

No one says:

“Let’s just fix the PDF directly.”

👉 FreeCAD should follow the same structure.


🧬 The Case of Klayout (Semiconductor Layout)

Exactly the same applies to Klayout.

.ly / .py
    ↓
GDS

👉 Rules are preserved
👉 Derived designs are easy


⚙️ The Case of RTL (Verilog, etc.)

RTL design follows the same rule.

design.v
    ↓
netlist / layout

👉 Editing the artifact is a losing move
in this world.


🧩 One Structure, Everywhere

The tools are different,
but the structure is identical.

Domain 🟢 Source of Truth (SSOT) 📦 Generated Artifact
FreeCAD Python / Spreadsheet STEP / Drawings
LaTeX .tex PDF
Klayout .ly / .py GDS
RTL .v / .sv Netlist

👉 Source = Code
👉 Artifacts are always regenerated


✅ How to Tell If It’s Full Code Design

If you are unsure in practice, ask just these questions:

If the answers are YES,
that design is Full Code.


⚖ You Don’t Have to Code Everything

This is often misunderstood.

You do not need to code:

What matters is:

🧠 Only encode what you want to explain later.


💪 Why This Is Powerful

This is not about automation.

👉 It is about treating design as an asset.


🏁 Final Words

What this entire series has tried to say
from start to finish is just one thing:

🏗 Design is not about producing artifacts.
It is about preserving the rules that generate them.

Whether it is FreeCAD, LaTeX, Klayout, or RTL,
the structure is the same.

In the future, when you hear phrases like:

I hope this series helps you judge
whether that approach will empower design or break it.


✨ Full Code Mechanical Design / End ✨