Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.
reprap
15:18

CSG Evaluator - An AoI plugin for convenient Boolean Operations

9207_1c90
Boolean Operations in AoI are a little bit cumbersome. For example: you can't union more that two objects at once. So creating a union of more objects creates many intermediate objects. Even worse: Once you want to change the position of a hole for example you have to do almost everything all over again. If only AoI was a little smarter...well it can be scripted and its even possible to write plugins in Java.

So some month ago we thought up a plan for writing a plugin that would use the tree structure of the objects that is already available in AoI to create a description of the boolean operations that need to be done to create the object you want. The description would be coded as a tree where the parent nodes represent the operation that needs to be performed (union, difference, intersection) on the child objects. So you could decide to move some of the objects or change the radius of a hole for example and just re-evaluate the tree to get the right object. No more intermediate objects! Marius and Stefan did most of the programming and now it works :)

Here you find the links to the plugin (in SVN) and a small tutorial.  We did test it on a Mac, Linux and XP machine but if you find any bugs or have suggestions please put them on the wiki discussion page or the SVN :)

For the future I have some ideas how to make this even more useful. I always wanted AoI to be more of a CAD tool. Why can't I write a formula into the radius property of a sphere? And have some variables (which are just key-value pairs) that parametrize the object. So it can not be used only to make ONE object but a FAMILY of objects that can be fit to your exact needs. For this to work you either have to change AoI or simply extend the existing plugin a little bit. Now already we have nodes like "intersection" and "union" that are basically just function calls! When the evaluator sees a node named "union" it knows what it has to do. So why not add another handler named "CADSphere" for example? If you named a node
"CADSphere(diameter/2, 0, 0, 0)" it would be evaluated to a sphere with the given parameters. That parameters could be given by a formula like "diameter/2".

Don't be the product, buy the product!

Schweinderl