Skills2026年5月11日·1 分钟阅读

OpenSCAD — Programmer's Solid 3D CAD Modeller

OpenSCAD is a script-based 3D CAD application that creates solid models from code rather than interactive modeling. Users write geometry in a functional scripting language, enabling parametric designs that are version-controllable, reproducible, and ideal for 3D printing, mechanical parts, and enclosure design.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
OpenSCAD 3D Modeling
通用 CLI 安装命令
npx tokrepo install b32ed8d2-4d77-11f1-9bc6-00163e2b0d79

Introduction

OpenSCAD is a free, open-source 3D modeling application focused on creating precise solid geometry through code. Unlike interactive modelers like Blender or FreeCAD, OpenSCAD uses a declarative scripting language where you describe shapes mathematically, making it the preferred tool for engineers and makers who want parametric, reproducible designs.

What OpenSCAD Does

  • Creates 3D solid models from a functional scripting language
  • Supports parametric designs with variables, loops, and modules
  • Exports to STL, OFF, AMF, 3MF, and other 3D printing formats
  • Renders 2D profiles for DXF and SVG export
  • Provides a customizer UI for adjusting parameters without editing code

Architecture Overview

OpenSCAD parses .scad files into a CSG (Constructive Solid Geometry) tree using its own scripting language. Primitive shapes like cubes, cylinders, and spheres are combined via boolean operations (union, difference, intersection). The geometry kernel uses CGAL for exact computation and OpenCSG plus OpenGL for real-time preview rendering. Final renders produce manifold meshes suitable for 3D printing.

Self-Hosting & Configuration

  • Available as prebuilt binaries for Windows, macOS, and Linux
  • Install via package managers: brew, apt, choco, or flatpak
  • Run headless for batch processing with the -o flag for automated STL generation
  • Configure editor fonts, syntax highlighting, and preview settings in preferences
  • Use the built-in library path to organize reusable modules and BOSL2 utility library

Key Features

  • Code-based modeling enables full version control with Git
  • Parametric customizer generates interactive sliders and dropdowns from annotated variables
  • Headless rendering mode supports CI/CD pipelines for automated model generation
  • BOSL2 community library provides hundreds of ready-made shapes and utilities
  • Cross-platform with identical behavior on Windows, macOS, and Linux

Comparison with Similar Tools

  • FreeCAD — GUI-based parametric modeler; OpenSCAD is purely code-driven
  • Blender — Mesh and sculpt focused; OpenSCAD uses exact solid geometry via CSG
  • CadQuery — Python-based CAD; OpenSCAD has its own simpler DSL with a larger community library
  • SolidPython — Python wrapper that generates OpenSCAD code; useful for Python-native workflows
  • Fusion 360 — Commercial cloud CAD; OpenSCAD is free, offline, and fully open source

FAQ

Q: Can OpenSCAD handle complex organic shapes? A: OpenSCAD excels at mechanical and geometric parts. For organic or sculpted shapes, tools like Blender are more appropriate.

Q: Is the OpenSCAD language Turing-complete? A: The language supports recursion, conditionals, and loops, but it is declarative and not general-purpose. It is designed specifically for describing geometry.

Q: What is the BOSL2 library? A: BOSL2 (Belfry OpenSCAD Library v2) is a community library that adds rounded shapes, threading, gears, beziers, and many utility functions to OpenSCAD.

Q: Can I automate rendering in a build pipeline? A: Yes. OpenSCAD's command-line mode renders .scad files to STL or PNG without a GUI, making it easy to integrate into Makefiles or CI workflows.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产