Last month I was saying I was going to hook the OpenSCAD back-end into RapCAD. It turned out to be simpler to just implement a backend myself. I started off implementing the GLView widget. I would have had to have done this anyway, since I didn’t want to hook any of OpenSCADs GUI code. I learned a lot doing this, and I think my version has better performance than OpenSCADs version so I will be proposing some performance enhancements to be backported into OpenSCAD at some point, as well as completing a feature request in the TODO list which is to have ruler ticks on the axis. I implemented something similar for RapCAD which is the outline of the 200x200mm printable area, so it should be quite easy. The next thing I put together was a CGALRenderer class, which converts CGAL primitives into openGL. The design is based on the Strategy Pattern rather than OpenSCAD’s messy rendering function pointer callback, I think this is something that could potentially benefit OpenSCAD as well, so I have already started to backport these changes in a cgal-renderer-refactor branch.
Once these two things were implemented everything seemed to come together quite quickly. So recently I have been adding all the bells and whistles and fun features like “ThingDoc” style code comments. Convex Hull for 2D & 3D primitives, and Minkowski that works with mixed 2D and 3D primitives.
3 thoughts on “RapCAD is Rendering!”
That looks like a really great start. Several things I like about this over OpenSCAD:
-I love the IDE format, where you are working with a project of multiple files
-you display an outline of the build plate in the render.
-Looks like you have plans for generating gcode. I like this, and I think it would be awesome to be able to print directly from the IDE someday.
I downloaded the 0.1.0 version on Windows. It displays an error: libgmp-10.dll is missing. Is this intended to be a part of the package?
Ta, Fixed rapcad_0.1.0-1.zip and rapcad_0.1.0-1_setup.exe