Browse Learn topics

Learn/Shape Generator/What is a .jshape?

Portable parametric shapes

At a glance

  • 225+ bundled shapes across mechanical, fabrication, tool, barcode, and Boxes.py categories
  • Each file exports setup() for name, description, category, units, and typed parameters (length, number, angle, boolean, select, text, sections)
  • generate() uses a small geometry API—lines, arcs, circles, polylines, rectangles, rounded rectangles, slots, bolt circles, and more
  • Ideal for shop-specific brackets, adapters, and repeated patterns driven by a few dimensions

Every shape in the Shape Generator is a single .jshape file — a small JavaScript module that describes geometry as a function of its parameters instead of storing frozen lines. Open the dialog from any host workspace, pick a shape, type dimensions, and hit Generate: the file runs, draws itself at exactly those values, and the result imports like ordinary DXF artwork.

One file, two functions

setup(api) declares what the shape is — name, description, category, units, and typed parameters (length, number, integer, angle, boolean, select, text). generate(api, params) draws it with geometry helpers: lines, arcs, circles, polylines, rectangles, rounded rectangles, slots, and bolt circles. Everything the browser shows comes from the code itself, so a shape's dialog, defaults, and grouping travel inside the one file. The full authoring reference is at Create & Share.

What ships in the box

225 shapes install with the app: Shapes (polygon, star, Archimedean spiral), Fabrication (base plate, gusset, pipe flange, trapezoid fire pit), Engine (exhaust flange, trigger wheel), Power Transmission (involute gear, sprocket, timing pulley, spline), Tool (13 drive and socket profiles), Barcodes (QR, Data Matrix, linear), and the 196-file Boxes.py collection. The bundled files are production implementations, not toy samples — open any of them in the editor to see how real validation and arc-preserving output are done.

Why parametric beats a DXF folder

A DXF of last month's bracket is one bracket. The .jshape that drew it is every size of that bracket, forever — hand the file to a teammate and they get live parameters, not frozen geometry. Shapes live as plain files in your user shapes folder alongside the bundled set; add your own anytime, and stock definitions are updated on app upgrades without touching files you created.