Boolean operations for shapes?

We are still using GoDiagram 2.6 because we have been hoping GoDiagram offer some of the features before we renew our licenses. Some of the features have been realiased since that release we are currently using, but still some are missing.

  1. Allowing user to combine multiple shapes into one, including union, intersection and subtraction, etc. The look and feel of the resulting shape follow the primary selection.

Rule-based layout group node. i.e. in GoDiagram Editor, I can create such a group node, and then I can add other shape or nodes into that and assign docking property. The current code-based layout mechanism almost stopped us using GoDiagram years ago.

Save drawings in GoDiagram Editor as a group node, which can be reconstructed in code and be referenced as typed objects and allow access to all the children in the group node.

Our GoDrawing object is basically a wrapper around the .NET Path object.

The operations you want sounds more like a .NET Region object (Intersection, Union, XOR are supported ops).

It doesn’t look like it would be too hard to create your own GoRegion class derived from GoShape.

GoShape gives you support for Pens and Brushes. And you could use the class with other GoShape objects (like GoDrawing) by using MakePath to create a GraphicsPath. GraphicsPath is an input to a lot of the Region functions.

Region has some issues. For one, FillRegion draws with a brush but I don’t see a pen anywhere. and two, the coordinates are built into the data of the Region, not specified on the draw. So, actually “moving” the region involves some work.

A think the solution is based on path rather than region. The result of boolean operations should have no difference from the basic shapes as the resulted shape might be used again for further boolean operations with other shapes, and so on.

To meets your requirements 1-3 above then, I think you need to stick with GoDrawing. If you add multiple GoDrawings to a GoGroup, I think you get most of what you want. You can play with FillMode (Winding and Alternate) to get some of the boolean-ish behavior you want.


And we don’t have a shape editor but it wouldn’t be hard to build one.

Thanks Jake,

You made me give up…