FeatureScript is Onshape's programming language for building parametric features, and it is one of the biggest force multipliers for an advanced CAD team. Instead of clicking the same operations every part, you encode them once.
The mindset. FeatureScript is a typed language with math built for 3D (vectors, planes, transforms). You write features in the Feature Studio editor; the resulting custom feature appears in your toolbar like any built-in. The community has already written the FRC essentials — learn to use and read them before writing your own.
A toolchain of proven community FeatureScripts (from FRCDesign.org's curated list):
- Origin Cube — first feature in every Part Studio; gives a consistent origin.
- Tube Converter (Julia's FeatureScripts) — turns an extrusion into punched tube with presets for hole pattern, wall thickness, and profile, so 2x1 tubes match REV/AndyMark grids automatically.
- Belt & Chain Gen — generates correct belts/chains from pulley/sprocket centers, eliminating wrong-length chain runs.
- Robot Shaft / Robot Spacer (Alex's FeatureScripts) — generate hex/round shafts and spacers with retention options.
- Part Lighten (2471's FeatureScripts) — parametric ribs/pockets.
- Spur Gear — dimensionally honest gears for custom sectors.
- Extrude Individual / 3D Printed Mass (Julia's FeatureScripts) — multi-part extrudes, and adjusting printed-part mass for real infill/wall.
Reading a FeatureScript. Open any of the above in the Feature Studio. You will see a FeatureScript <version>; header, import statements pulling in the standard library and geometry modules, then an annotation block that declares the feature's UI (the inputs that show in the dialog), and a function body that does opExtrude, opPattern, etc. Even without writing one, being able to read it tells you exactly what a feature does and why it might be misbehaving.
When to write your own. If your team repeats a non-trivial operation a configuration table can't capture — say, generating a bearing-bore-plus-retention-pattern keyed to a shaft-size enum — wrap it in a FeatureScript. Start by copying a simple community script, change its inputs and ops, and test on a throwaway part. Onshape's official FeatureScript documentation and the community-curated dcowden/featurescript list on GitHub are the canonical references.
Payoff: a team with a tuned FeatureScript toolbar produces manufacturable tubes, shafts, and lightened plates in a fraction of the clicks, and every part comes out consistent with the team's standards.
the part worth keeping
Key takeaways
- FeatureScript encodes repeated geometry as reusable custom features; learn to read and use community scripts before writing your own
- Assemble a standard toolbar: Origin Cube, Tube Converter, Belt & Chain Gen, Robot Shaft/Spacer, Part Lighten, Spur Gear, Extrude Individual, 3D Printed Mass
- Write custom FeatureScript when logic exceeds what a configuration table can express; start by adapting an existing script
CAD & DesignAdvanced Techniques & Case Studieslesson 2 of 5
Keep going
Take the quiz+10 XP with an accountMore in Advanced Techniques & Case Studies
where this came from
Sources and corrections
This lesson is AI-assisted: drafted from primary sources, then reviewed and edited by hand. Errors still get through. When one is reported we fix it and write down what changed, in public, in the corrections log.
sources and further reading
clipped to this lesson
Articles that go further on this
The lesson gets you through the topic. These go wider on it, and they read in one sitting.
- 7 min readFRC Hex Shaft, Bearings, and Bushings: Sizes, Fits, and Why Shafts Wallow Out3/8" vs 1/2" hex shaft, flanged bearing vs bearing block vs bushing, press fit vs clearance fit, retaining a shaft, and why hex bores round off./blogread it
- 17 min readFRC Manufacturing and Fabrication: COTS vs Custom, Tools, Materials, and TolerancesHow FRC parts get made: COTS vs custom tradeoffs, shop tools, 3D printing, materials like 6061 and 7075 aluminum and polycarbonate, hole/tap standards, and tolerances./blogread it
- 7 min readEvery FRC Game by Year: REBUILT, REEFSCAPE, CRESCENDO, and How to Read a New OneWhat REBUILT, REEFSCAPE, CRESCENDO, and past FRC games actually scored, plus the patterns that help you read a new game manual on kickoff day./blogread it
answer sheet
Lesson quiz
All 4 right completes the lesson. Miss one and only that question comes back, anything you already answered correctly stays banked.
0 of 4 answered
01When your team repeats a non-trivial operation that a configuration table cannot capture, what should you do?
02What does the community Tube Converter FeatureScript do?
03Before writing your own FeatureScript, what should you do first?
04When reading a FeatureScript, what part declares the inputs that appear in the feature's dialog?
Answer every question to submit.
All 31 lessons in CAD & Designopenclose
01 / prerequisites
02 / getting-started-cad-and-the-design-process
03 / onshape-fundamentals
04 / vendor-libraries-mkcad-featurescripts
05 / manufacturability-drawings-bom-design-reviews
06 / worked-examples-mini-projects
07 / common-mistakes-troubleshooting
- Not read yet:Mate & Assembly Failures: Why Parts Float, Spin, or Won't Move
- Not read yet:Broken In-Context & Derived References
- Not read yet:Slow Regeneration in Big Drivebase Assemblies
- Not read yet:Manufacturability Mistakes That Become Scrap
- Not read yet:Version Control & Team Collaboration Disasters
08 / advanced-techniques-case-studies
- Not read yet:Configurations vs. Parametric Variables: Designing One Model, Many Robots
- Not read yet:FeatureScript Automation for FRC
- Not read yet:Browser-Based FEA: Weight-Optimizing Real Structures
- Not read yet:Swerve System Geometry & Motion Math
- Not read yet:Case Study: FRC 6328's Modular Gusset-and-Tube Methodology