export const params = defineParams({
width: { type: 'number', default: 50, min: 10, max: 200, unit: 'mm' },
holes: { type: 'number', default: 4, min: 0, max: 12, integer: true },
style: { type: 'choice', default: 'round', options: ['round', 'square'] },
});
export default (p = params.values) => box(p.width, 30, 20);
The default argument lets the part run with no caller input, so a tool that calls the part function with no argument builds the part at its defaults.
Declare the parameters of a part.