AngelCAD is a powerful open source 3D solid modeller based on the Constructive Solid Geometry (CSG) modelling technique, expressed in the AngelScript language. The software creates 3D models in STL or other file formats.
For more information and software download see https://arnholm.github.io/angelcad-docs/
The attached file "csg_wikipedia.as" is an AngelCAD script that creates the STL shown
AngelCAD runs under Windows and Linux Ubuntu, it is free and open source.