This is not parametric CAD. Not useful anyway. You need much more complicated engine.
This approach is explored by OpenSCAD. No need to reinvent the wheel. But parametric CAD is much more than that.