I have an OpenSCAD file that will generate a shape that I have then successfully printed on a Bambu Lab A1. I have been just editing the scad file to change parameters like sizes and spacing. I would like to modify the file to make it a customizable file online at Makerworld. I am having trouble finding any documentation on the process. In someone else’s post I saw a reference to this Parametric Model Maker. I tried the “open yours” link and it imported it. And it seems that every global variable becomes an editable parameter. But I can’t figure out some of the ways to control this.
For instance, some parameters pick up nearby comments as if they are descriptions of the parameters, others do not. Is this controllable?
How do I set limits for values? For instance, if an angle goes to 90 degrees, later in the calculations I use tan(A) which goes to infinity. I want to limit angles to < 90. Also, I want angles >= 0. No negative numbers.
How do I have it not make every variable editable? I want some hidden because they are not variables, they are really constants (like 25.4 to convert units).
How do I control grouping of parameters. I might want the outside dimensions in one group and inside dimensions in another with a header before each.
I want to allow input in US units (aka inches) and metric (mm). Perhaps controlled via a boolean two position switch. Switches seem to work for “true/false”, but are there others (like enums in programing languages)?
Is there any document defining parameter definition and control?
How do I have it not make every variable editable? I want some hidden because they are not variables, they are really constants (like 25.4 to convert units).
Put the variables you want editable towards the top, then add this underneath them. Everything below this point will not show up in the customizer window: