/*
*/
class MetaCAD
{
public static ObjectInfo calculateNode(ObjectInfo object)
{
if (object.name.equalsIgnoreCase("union"))
return MetaCAD.Combine(object, CSGObject.UNION);
else if (object.name.equalsIgnoreCase("intersection"))
return MetaCAD.Combine(object, CSGObject.INTERSECTION);
else if (object.name.equalsIgnoreCase("difference"))
return MetaCAD.Combine(object, CSGObject.DIFFERENCE12);
else return object;
}
public static ObjectInfo Combine(ObjectInfo object, int operation)
{
ObjectInfo[] children = object.getChildren();
if (children == null || children.length == 0) return object;
new MessageDialog(window, object.name);
union = calculateNode(children[0]);
//create combined object
for(int i=1;i