Freesteel Blog » New hackable calculation visualization

New hackable calculation visualization

Friday, May 16th, 2008 at 4:29 pm Written by:

The power of letting python call OpenGL directly. I thought it wasn’t practicable, but it seems to be okay. Here I’m testing out the toolholder collision detection; showing a series of points where the cutter gets lifted to when there is a wide conical tool-holder in place.

The colour is according to how long the calculation takes (red for slower). It varies by where the sample is taken and will help tune where I need to make the speed improvements.


  • 1. Cheng-Chang Wu replies at 21st May 2008, 1:39 pm :


    Thank you. I’ve learned this technique from you and am using it on my CNC, not for path planner, but for motion compensations. It’s wonderful.

  • 2. Denys Plakhotnik replies at 14th August 2008, 2:03 pm :

    Use VTK ( for visualization.It seems to be easier instead of OpenGL calls.

  • 3. Martin replies at 14th August 2008, 4:41 pm :

    We used to do this with VTK. In fact our now a little outdated demo version is using VTK for the visualisation.
    VTK, although being very good, is a big gun for this very simple but effective piece of coding. Have you done much coding using VTK? VTK binary does not come with python bindings, so you have to build this yourself. And this process is very cumbersome to say the least (cmake, ccmake, need for all sorts of packages you don’t really use anywhere else, like TCL/TK, and more).
    OpenGL with python bindings is simple, and for drawing a few triangles, lines, points just great.

  • 4. Denys Plakhotnik replies at 15th August 2008, 11:52 am :

    I use vkt+java. Once I built vtk dll’s I don’t bother about vtk any more(It took less than a half of day). It is possible to load STL geometry and export results.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>