Skip to content

LazerPlatypus/openscad_guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenSCAD Style Guide

Opinionated conventions for writing maintainable OpenSCAD code.


Quick Start

New to this guide?

Want the reasoning?


What This Guide Standardizes

  • Naming conventions (snake_case, SCREAMING_SNAKE_CASE, _private_items)
  • Canonical physical-project layout:
    • parts/
    • assemblies/
    • tools/
    • hardware/
  • Script-first build workflow (make orchestrates, scripts implement)
  • In-source docs with openscad_docsgen
  • Practical docs requirements (required minimum + recommended examples)
  • Runtime config pattern (EXPORT_MODE, preview/export $fn)

Guide Structure


At a Glance

// Global render controls
PREVIEW_FN = 32;
EXPORT_FN = 128;
EXPORT_MODE = false;
$fn = EXPORT_MODE ? EXPORT_FN : PREVIEW_FN;

// Public API docs minimum
// Module: toe_clamp_body
// Usage:
//   toe_clamp_body();
// Description:
//   Creates the toe clamp body.
// Example(3D,Render):
//   toe_clamp_body();
module toe_clamp_body() { ... }

// Internal helper
// Function: _validate_dims
// Status: INTERNAL
function _validate_dims() = ...;

Current Status

Status: Active draft (aligned to current project conventions)
Last Updated: 2026-02-19


Contributing

This guide is a living document.

Found something confusing? Open an issue or submit a clarification.

Have a better example? Submit a PR.

Disagree with a convention? Start a discussion with rationale.


License

Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)

You are free to use, share, and adapt this guide, provided you give attribution and distribute any derivative works under the same license.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors