OpenSCAD

I have been hacking around with OpenSCAD. First I added an exponent operator to the language because I felt that writing pow(x,2) was a bit more cumbersome than x^2 . Then I added a few more operators like a component-wise multiply and component-wise divide I wanted these to make it easier to translate points so I could use them as datums. I even implemented an experimental rotation operator. Then I decided to get a little bit more adventureous. What I wanted to do was make the OpenSCAD editor have syntax highlighting. Investigating doing this using qcodeedit is on the OpenSCAD todo list, so I thought I would give it a try

I was quite pleased with the results and it wasn’t to complex to implement, QCodeEdit’s QEditor is almost a drop in replacement for QTextEdit. I created a wrapper which allows somone compiling the source to choose which editor they want to use with compile time flags. In fact, to disable QCodeEdit support all one has to do is uncomment out the line with

CONFIG += qcodeedit

in openscad.pro

EDIT: All the changes have been merged into the main github repository which can be checked out using

git clone https://github.com/openscad/openscad.git
Advertisement