4

I'm working in science, which means, among other things, that I have to explain things to others in many different situations, preferrably using elaborate sketches to illustrate things. Up until now, I mostly used PowerPoint and MS Visio to create most of my diagrams. However, this was always quite stressful for larger figures, especially when they contain many 2D and/or 3D objects.

This is why I am looking for a scripting tool (preferrably with python support) that can render these figures. One major reason for this would be that I would like to use "actual" math inside the code to create the objects. For example, I may want to calculate the positions of the vertices of a cube given its dimensions and more complicated mathematical operations.

As an example, I tried to use OpenGL, more specifically PyOpenGL, to create such figures. However, this was quite complicated since a script to render a simple cube requires quite a bit of code and I am still trying to fully get behind the concepts and the PyOpenGL API. (For example, I am still not quite sure how to use pyglet; I have been using pygame for now. Secondly, how would I output the rendered images to a file, preferrably PDF or SVG?)
On the other hand, I really like the concept of OpenGL and similar "tools" since I can - in principle - render 3D objects easily and have many options on how to customize the rendered graphics.

Therefore, my question is, whether there is some software/tool/etc. that would allow me to easily accomplish this task, while being on the one hand simple, but on the other hand flexible to allow for maximum customization.

1

Not sure if OpenSCAD is what you're looking for. From their about page:

About OpenSCAD

OpenSCAD is software for creating solid 3D CAD models. It is free software and available for Linux/UNIX, Windows and Mac OS X. Unlike most free software for creating 3D models (such as Blender) it does not focus on the artistic aspects of 3D modelling but instead on the CAD aspects. Thus it might be the application you are looking for when you are planning to create 3D models of machine parts but pretty sure is not what you are looking for when you are more interested in creating computer-animated movies.

OpenSCAD is not an interactive modeller. Instead it is something like a 3D-compiler that reads in a script file that describes the object and renders the 3D model from this script file. This gives you (the designer) full control over the modelling process and enables you to easily change any step in the modelling process or make designs that are defined by configurable parameters.

OpenSCAD provides two main modelling techniques: First there is constructive solid geometry (aka CSG) and second there is extrusion of 2D outlines. Autocad DXF files can be used as the data exchange format for such 2D outlines. In addition to 2D paths for extrusion it is also possible to read design parameters from DXF files. Besides DXF files OpenSCAD can read and create 3D models in the STL and OFF file formats.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.