Shape, Mathematica/Set Operations
Submitted by Alan Horkan
Description
Filling this bug seeing as someone asked about this recently.
need to dig up the relevant posts to the mailing list, i think it was
mentioned in or around the same time as the "CAD 2D drawing" thread
Documentation of these features based on observation of Visio 2000, dont blame me if i get the set theory wrong ...
Shape, Operations
Union, Combine, Fragment, Intersect, Subtract.
(I figure the logic is easy for polygons, nasty for curves, ill try and
write some pseudocode and give some more thought to curves)
Union take two shapes, convert them to a PATH consisting of all the external/ points on the circumference.
+---+ +-|-+ | | +-|-+ +---+
becomes +---+ +-+ | | +-+ +---+
Combine +---+ +-|-+ | | +-|-+ +---+ becomes the same only the overlapping central bit is not longer filled. (I could work out what is actually logically happening here but i wont.)
+---+ +-|-+ | | +-|-+ +---+
becomes three shapes instead of two +---+ +-+-+ | | +-+-+ +---+
you have to move them apart to see it clearly +---+ +-+ | +-+ +-+ +-+ +-+ | +-+ +---+
Intersect leaves you with only the overlapping bit, subtract removes a chunk, leaving you with only one shape missing the overlapping bit.
Join and Trim are similar only you do not close and fill the paths
[disclaimer: If you dont use a fixed width font my diagrams wont make any sense]
Version: 0.90