I am new to CAD. However, I am interested in implementing some interactive geometric algorithms in 3d using CAD software. There seem to be many good open-source options available online e.g. OpenJSCAD, Implicit, FreeCAD.
However, from the little I CAD I know, we program a 3d model in a scripting language of the CAD package. Then we get an STL file which is visualized offline using standard visualizing software.
I would like to have a Python / Haskell based CAD modeller, which has support for event-handling, say through call-back functions.
Matplotlib of Python for instance, in Python has wonderful support for precisely this purpose. But from what I know it works only for 2d.
A typical usage scenario would be the user initiates a random point-cloud in 3d. The point cloud is rendered to the screen. By then pressing the key 'C', we can see each step of the construction of a convex hull algorithm.
As the algorithm construction proceeds, we can spin it around, zoom in on interesting parts etc.
Do such packages exist? Ideally, in Python or Haskell.