Closed roipoussiere closed 2 years ago
cqgi unit tests are here: https://github.com/CadQuery/cadquery/blob/master/tests/test_cqgi.py
I think an update to cqgi is needed to allow scripts to provide type hints, and infer typing from those.
One example that was mentioned as a requirement is a value with min, max, and step values. Step values are not currently supported by CQGI, but would be implemented by creating a subclass of InputParameter, and overriding set_value to raise an error if the value is not in the step
BTW, PRs on cqgi would be very welcome to bring it into the modern age. For most cases, a script containing
import typing
diameter: Int = 3
should work when we want to declare only the variable type
fixed in 09b0360 and 91bf79d
See CadQuery Gateway Interface documentation and cqgi python script.
Basically it could be a python script on the user project used to build the models and the ui inputs.