Method Unite
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
Unite(IEnumerable<DxfRegionShape>, Tolerance)
Gets what any of the shapes covers: a box 40 by 30 and a circle of radius 10 centred on its right edge give a shape of area 1 357.08 whose one loop is five lines and a half circle, the circle still a circle.
public static DxfRegionShape Unite(IEnumerable<DxfRegionShape> shapes, Tolerance tolerance)
Parameters
shapesIEnumerable<DxfRegionShape>The shapes, in one plane.
toleranceToleranceThe tolerance: its point tolerance is the distance within which two points are one.
Returns
- DxfRegionShape
The shape; two that lie far apart are one shape of two faces (a region of two lumps, as AutoCAD keeps them), a box and a circle inside it the box; null where nothing is covered.
Remarks
The library's booleans work on straight edges, so each curve is cut into chords, the booleans are run on them, and each edge of the answer is traced back to the curve it lies on: a line, an arc or an ellipse of the answer is that curve between exact ends (the meeting of two curves, or the end of one of the shapes' edges), as AutoCAD's solid modeler gives them, not a run of chords.
Exceptions
- ArgumentNullException
Thrown when the shapes or one of them is null.
- ArgumentException
Thrown when there is no shape, or the shapes do not lie in one plane.