OpenSCAD Visual editor, Brett Victor style

I feel uncomfortable with traditional click-n-drag visual editors, whatever it is a pixel-based editing in Photoshop or 3D editing in Tinkercad.

I’m spending time editing something, but comparing to development, result is very “fragile” and depends on exact sequence of pre-planned events and relies on precise drag-and-drop capabilities and heavy use of undo even with years of mouse handling skills.

The gap is currently addressed by OpenSCAD, a language that allows you to generate 3D models so they can be parametrized and can power tools like Thingiverse Customizer so you can make adjustable prosthetics for kids who grow up (and dimensions need to adjust).

I feel that ultimate solution in this very creatively imaginative and visual space heavily mixed with scientific and precise engineering is in combining the two in Bret Victor-esque way (here’s a video in which he talks about his approach and shows some game development tool prototypes which influenced or directly contributed to Swift Playgrounds, if I understand it correctly):

Imagine editing using visual editor on the right of the screen, adding and removing objects, moving them around, intersecting and so on like you would in Tinkercad, but on the left, seeing the code as it changes with every change you make.

For example, you drag the object and coordinates in the code change, or you press a button to combine one object with another and it starts a function and puts first object as first parameter, waiting for you to pick second object.

Needless to say, if you edit the code, visual editor would also update to reflect the changes. And if you point at a number in the code and drag up down, it updates the code and corresponding visual at the same time

This can be combined with timeline feature similar to the one Fusion 360 has:

but in our case as it works with code, it would not only roll-back/replay visual objects, but will also visually represent OpenSCAD commands highlighting corresponding part of the code when you click or hover over a step. It can also act as version control for the code too (imagine branching, merging and pull-request workflow of git integrated with it).

Just though I’d share before it goes into non-being.