Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计通过

openscad-labelingopenscad 标签

Agent Skill

openscad-labeling 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

269

周安装

11

GitHub Stars

1

下载量

86
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openscad-labeling(openscad 标签)
来源仓库:https://github.com/dawiddutoit/custom-claude
仓库路径:skills/openscad-labeling
安装命令:
npx skills add https://github.com/dawiddutoit/custom-claude --skill openscad-labeling
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dawiddutoit/custom-claude --skill openscad-labeling

简介

openscad-labeling 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理的场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 该技能当前归类为待分类,适合 OpenSCAD 标签相关的协作支持。

SKILL.md

OpenSCAD Labeling

Add text labels to 3D model faces, part numbers, dimension annotations, and curved surface text in OpenSCAD.

Quick Start

Label a cube's top face using BOSL2's attach system (most common use case):

include <BOSL2/std.scad>

cuboid([50, 30, 20])
    attach(TOP, BOT)
        linear_extrude(2)
            text("TOP", size=8, halign="center", valign="center");

This creates raised text on the top face without calculating positions manually.

Table of Contents

  1. When to Use This Skill
  2. What This Skill Does
  3. Instructions 3.1 Define Faces with BOSL2 3.2 Add Text to Flat Faces 3.3 Add Text to Curved Surfaces 3.4 Install Labeling Libraries
  4. Supporting Files
  5. Expected Outcomes
  6. Requirements
  7. Red Flags to Avoid

When to Use This Skill

Explicit Triggers:

  • "Label this model"
  • "Add text to the TOP face"
  • "How do I add part numbers in OpenSCAD?"
  • "Text on cylinder"
  • "Install text_on_OpenSCAD"

Implicit Triggers:

  • Creating parts that need identification
  • Building labeled storage bins
  • Making dimension annotations for debug
  • Wrapping text around curved objects
  • Engraving text into surfaces

Debugging Triggers:

  • "Why isn't my text showing on the right face?"
  • "Text is backwards/upside down"
  • "How do I center text on a face?"

What This Skill Does

This skill helps you:

  1. Define faces using BOSL2's semantic anchor system (TOP, BOTTOM, LEFT, etc.)
  2. Attach text to faces without manual position calculations
  3. Choose libraries based on surface type (flat vs curved) and requirements
  4. Install libraries for advanced text features (curved surfaces, font metrics)
  5. Create practical patterns (part labels, dimension annotations, engraved text)

Instructions

3.1 Define Faces with BOSL2

BOSL2 provides named face constants that eliminate manual coordinate calculations.

Standard faces:

include <BOSL2/std.scad>

// The six primary faces
TOP, BOTTOM, LEFT, RIGHT, FRONT, BACK

Face reference table:

FaceDirectionNormal VectorNotes
TOP+Z[0, 0, 1]Points up
BOTTOM-Z[0, 0, -1]Points down
FRONT-Y[0, -1, 0]Points toward viewer
BACK+Y[0, 1, 0]Points away
LEFT-X[-1, 0, 0]Points left
RIGHT+X[1, 0, 0]Points right

Attach objects to faces:

cuboid([50, 30, 20]) {
    attach(TOP) color("red") cuboid([10, 10, 5]);
    attach(FRONT) color("blue") cyl(d=8, h=3);
    attach(LEFT+BOTTOM) color("green") sphere(d=5);
}

Edges and corners:

// Edges (combine two faces)
TOP+LEFT, BOTTOM+RIGHT, FRONT+TOP

// Corners (combine three faces)
TOP+LEFT+FRONT, BOTTOM+RIGHT+BACK

3.2 Add Text to Flat Faces

Pattern 1: Raised text (embossed)

include <BOSL2/std.scad>

cuboid([50, 30, 20])
    attach(TOP, BOT)
        linear_extrude(2)
            text("LABEL", size=8, halign="center", valign="center");

Breakdown:

  • attach(TOP, BOT) - Attach to TOP face, align text's BOT to surface
  • linear_extrude(2) - Extrude 2mm tall
  • halign="center", valign="center" - Center text on face

Pattern 2: Engraved text (debossed)

include <BOSL2/std.scad>

diff()
cuboid([50, 30, 20])
    attach(TOP, BOT, inside=true)
        tag("remove")
        linear_extrude(1)
            text("CUT", size=8, halign="center", valign="center");

Breakdown:

  • diff() - Enable boolean difference mode
  • inside=true - Attach inside the surface
  • tag("remove") - Mark for subtraction

Pattern 3: Multiple labeled faces

include <BOSL2/std.scad>

module labeled_box(size, labels) {
    faces = [TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT];

    diff()
    cuboid(size)
        for (i = [0:5])
            if (labels[i] != "")
                attach(faces[i], BOT)
                    tag("remove")
                    linear_extrude(1)
                        text(labels[i], size=size.x/8, halign="center", valign="center");
}

labeled_box([50, 30, 20], ["TOP", "BOT", "FRONT", "BACK", "L", "R"]);

Pattern 4: Part number label tag

include <BOSL2/std.scad>

module part_label(txt, size=[40, 15, 2]) {
    diff()
    cuboid(size, rounding=1, edges="Z")
        attach(TOP, BOT, inside=true)
            tag("remove")
            linear_extrude(0.5)
                text(txt, size=size.y*0.5, halign="center", valign="center");
}

part_label("PN-001");

3.3 Add Text to Curved Surfaces

For curved surfaces (cylinders, spheres), use specialized libraries.

Check library installation status:

ls ~/Documents/OpenSCAD/libraries/text_on_OpenSCAD
ls ~/Documents/OpenSCAD/libraries/openscad_attachable_text3d

Option 1: text_on_OpenSCAD (curved surfaces)

use <text_on_OpenSCAD/text_on.scad>

// Text wrapped around cylinder
text_on_cylinder("LABEL", r=15, h=30, size=4, font="Liberation Sans");

// Text on sphere surface
text_on_sphere("Hello World", r=20, size=5);

// Text on cube face (alternative to BOSL2)
text_on_cube("FRONT", size=8, face="front", cube_size=50);

Option 2: attachable_text3d (BOSL2-compatible)

include <BOSL2/std.scad>
use <openscad_attachable_text3d/attachable_text3d.scad>

// Attachable 3D text with accurate font metrics
cuboid([50, 30, 20])
    attach(TOP)
        attachable_text3d("Label", size=10, h=2);

Benefits:

  • Works with BOSL2's attach system
  • Accurate bounding box for alignment
  • Better font metric calculations

Option 3: Write.scad (classic library)

use <Write.scad>

// Text on cube faces
writecube("TEXT", [50, 30, 20], face="front", t=2, h=8);

// Text on sphere
writesphere("GLOBE", 25, t=2, h=6);

// Text on cylinder
writecylinder("LABEL", r=15, h=30, t=2);

3.4 Install Labeling Libraries

text_on_OpenSCAD (curved surfaces + internationalization):

cd ~/Documents/OpenSCAD/libraries  # macOS
# cd ~/.local/share/OpenSCAD/libraries  # Linux

git clone https://github.com/brodykenrick/text_on_OpenSCAD.git

Verify installation:

use <text_on_OpenSCAD/text_on.scad>
text_on_cylinder("TEST", r=10, h=20, size=3);

attachable_text3d (BOSL2-compatible, accurate metrics):

cd ~/Documents/OpenSCAD/libraries
git clone https://github.com/jon-gilbert/openscad_attachable_text3d.git

Verify installation (requires BOSL2):

include <BOSL2/std.scad>
use <openscad_attachable_text3d/attachable_text3d.scad>
attachable_text3d("TEST", size=10, h=2);

Check what's already installed:

ls -la ~/Documents/OpenSCAD/libraries/

Common pre-installed libraries:

  • BOSL2 (always available in this project)
  • NopSCADlib
  • MCAD

Supporting Files

References:

  • references/library-comparison.md - Detailed comparison of text_on_OpenSCAD, attachable_text3d, Write.scad
  • references/font-reference.md - Cross-platform fonts, font parameters, system font usage

Examples:

  • examples/practical-labels.scad - Part labels, dimension annotations, debug labels
  • examples/curved-text.scad - Cylinder/sphere text wrapping examples
  • examples/engraved-embossed.scad - Raised vs cut text patterns

Scripts:

  • scripts/check-text-libraries.sh - Verify text library installations
  • scripts/list-system-fonts.sh - List available fonts for OpenSCAD

Expected Outcomes

Success: Text appears on correct face, properly centered

include <BOSL2/std.scad>

cuboid([50, 30, 20])
    attach(TOP, BOT)
        linear_extrude(2)
            text("SUCCESS", size=6, halign="center", valign="center");

Output: Text centered on top face, raised 2mm, easily readable.

Failure: Text backwards, wrong face, or positioning errors

// ❌ WRONG: Manual positioning without BOSL2
cube([50, 30, 20]);
translate([25, 15, 20])  // Easy to miscalculate
    linear_extrude(2)
        text("WRONG", size=6, halign="center");

Problem: Manual calculations prone to errors, text may be backwards or misaligned.

Requirements

Required:

  • OpenSCAD 2021.01+ (text() function)
  • BOSL2 library (for attach system)

Optional:

  • text_on_OpenSCAD (curved surfaces)
  • attachable_text3d (better font metrics)
  • Write.scad (classic curved text)

Knowledge:

  • Basic BOSL2 attach syntax
  • Understanding of face normals
  • OpenSCAD text() parameters

Red Flags to Avoid

  1. Manual text positioning - Use attach() instead of translate/rotate calculations
  2. Forgetting halign/valign - Text won't center without these parameters
  3. Wrong face attachment point - Use attach(TOP, BOT) not attach(TOP, TOP)
  4. Missing libraries - Check installation before using specialized text functions
  5. Text too large for surface - Scale text size relative to face dimensions
  6. Backwards text on faces - BOSL2's attach handles orientation automatically
  7. Using inside=true for raised text - Only use for engraved/cut text
  8. Forgetting tag("remove") in diff() - Text won't be cut without tag
  9. Assuming Write.scad is installed - It's not bundled with OpenSCAD
  10. Not centering text - Default text origin is bottom-left corner

Notes

Library decision tree:

Need text on model?
├─ Flat surface?
│  ├─ Using BOSL2? → attach() + text()
│  └─ Not using BOSL2? → text_on_OpenSCAD or Write.scad
└─ Curved surface (cylinder/sphere)?
   ├─ BOSL2 workflow? → attachable_text3d (if installed)
   └─ Classic approach? → text_on_OpenSCAD or Write.scad

Performance tip: Use $fn=$preview? 32: 64 to speed up text rendering in preview mode.

Font availability: Use "Liberation Sans", "Liberation Mono", or "Liberation Serif" for cross-platform compatibility.

Text depth guidelines:

  • Raised text: 1-2mm for labels, 0.5mm for fine detail
  • Engraved text: 0.5-1mm depth (too deep weakens part)

See references/ for detailed library comparisons and advanced examples.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.77%
按下载量换算32

Claude

28.42%
按下载量换算24

Cursor

21.48%
按下载量换算18

Gemini CLI

9.25%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills