Skip Navigation

CAD modeling in VI

I'm playing with OpenSCAD, which is a text-based parametric 3D modeler. It comes with its own built-in editor, but you can also open the source file in your favorite editor and when the file is saved, OpenSCAD recompiles and re-renders the model.

I know it's nothing particularly novel, but it's kind of awesome to type :w and see the 3D object immediately show what you just typed. There's even a degree of rendering control from within the editor: for example to highlight a feature, like an subtracted volume, simply type # in front of the corresponding operation, :w and hey-presto, the feature appears in the model.

And sure enough, there is OpenSCAD syntax highlighing for vim. How cool is that!

If someone had told me 40 years ago that I'd be doing 3D modeling in VI one day, I would never have believed it 🙂

2
2 comments
  • I use kate as my editor, but the effect is the same. :)

    OpenSCAD is both amazing and frustrating at the same time. I wish it did caching better.

    At one point it encouraged me to start writing my own SCAD from scratch in python, to improve how the language worked. Python has that lovely set() syntax which can be repurposed to solids and work really well. I even had a somewhat functional prototype.

  • I love OpenSCAD. I'm not great with imagining things in 3D, so declaring designs procedurally is about the only way I can manage 😂