Skills onshape-featurescript

Onshape FeatureScript Generator

install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/bryko/onshape-featurescript" ~/.claude/skills/openclaw-skills-onshape-featurescript && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/bryko/onshape-featurescript" ~/.openclaw/skills/openclaw-skills-onshape-featurescript && rm -rf "$T"
manifest: skills/bryko/onshape-featurescript/SKILL.md
source content

Onshape FeatureScript Generator

Quick Start

Analyze request → Match pattern → Gen FS code → Validate logic.

Core Workflow:

  1. Precondition: Enums/lengths/reals w/ bounds.
  2. Body: Sketches → Extrudes → Booleans → Shell → Wrap/Thicken labels.
  3. Pitfalls: qOwnedByBody(finalBody), if/else (no ternary lengths), cylinder(coordSystem).

Key Patterns (Memorize)

  • Enum + Cond Param:
    export enum AlignmentStyle { Centered, Tangent, Offset };
    if (definition.alignment == AlignmentStyle.Offset) { isLength(def.offsetDistance...); }
    
  • Safe Shell Caps:
    var capFaces = qFacesParallelToDirection(qOwnedByBody(finalBody, EntityType.FACE), vector(0,1,0));
    
  • Union Primary First:
    qUnion([qCreatedBy(id+"inlet", EntityType.BODY), ...]);
    
  • Wrapped Label: skText → opWrap → opThicken.

Dust Fittings Lib

Z-axis: Inlet Z=0 (-Z), Outlet Z=trans (+Z), Branch +X. See FITTINGS.md for full spec/pitfalls.

Resources

  • API Patterns: PATTERNS.md
  • Fonts: AllertaStencil-Regular.ttf for labels.
  • Validate: Test mentally; no runtime here.

Gen code → User pastes to Onshape FS editor.