|
Name
|
Description
|
|
Add(Poly2d)
|
Adds a copy of a poly to the region.
|
|
Add(Region2d)
|
Appends a copy of a region to this region.
|
|
AddRaw(Poly2d)
|
Adds the poly directly to the region without cloning it. This means,
modifying the poly afterwards, also modifies the region. Fast, but use with care.
|
|
ArcFit(double)
|
Returns a copy of this region for which each poly is ArcFit():ed. See ArcFit() function in Poly2d()
for details.
|
|
Clean()
|
|
|
Clean(double)
|
Calls the Clean() function for each poly in this region, which will remove short segments etc. in-place.
|
|
Clear()
|
Removes all contours from this region in-place, making this an empty region.
|
|
Clip(Extents2d, out Region2d)
|
Clips the Region2d to a specified clipping box.
The result is a new Region2d defining the part that is completely inside the clip box.
The Region2d must consist of Poly2d that are closed and consist of only lines.
|
|
ClosestNode(Point2d, out int, out int)
|
Computes the index of the node and contour that is closest to a given point.
If the region is empty, an exception will be thrown.
|
|
ClosestNode(Point2d, out int, out int, out double)
|
Computes the index of the node and contour that is closest to a given point.
If the region is empty, an exception will be thrown. This function also
givest the actual distance between point and node.
|
|
ClosestPoint(Point2d)
|
Computes a point somewhere on the regions contours that is as close as possible to a given point.
|
|
ClosestPoly(Point2d)
|
|
|
ClosestSegment(Point2d, out int, out int)
|
Computes the index of the segment and contour that is closest to a given point.
If the region is empty, an exception will be thrown.
|
|
ClosestSegment(Point2d, out int, out int, out double)
|
Computes the index of the segment and contour that is closest to a given point.
If the region is empty, an exception will be thrown. This function also
givest the actual distance between point and segment.
|
|
Contains(Point2d)
|
Checks if a point is inside the region. It handles holes, but assumes the region is simple.
|
|
Distance(Point2d)
|
Computes the minimum distance to the circumference of a contour in this region.
If the region is empty, an exception will be thrown.
|
|
Flatten(double, FlattenMode)
|
Approximates this region into another region where each contour contains line segments only.
|
|
GetCentralPoint()
|
|
|
GetCentralPoint(out double)
|
|
|
GetEnumerator()
|
|
|
GetPoints()
|
|
|
Mirror(Point2d, Point2d)
|
Mirrors the region in-place over a reflection line. Note that this will cause all bulge factors to be inverted.
|
|
Normalize()
|
Modifies the region in place so that the direction of the polys is winding correct and arranges
them in order so that a counter clockwise outer poly is followed by all clockwise polys that are holes in it.
Assumes the polys in the region are simple and closed.
|
|
NormalizeSplit()
|
Normalizes the region with Normalize() function and splits each separate contour to a separate region that
are put in the list returned. Note that this function modifies the region in-place.
Assumes the polys in the region are simple and closed. Also note that polys are copied into the new
regions!
|
|
NormalizeSplitRaw()
|
Normalizes the region with Normalize() function and splits each separate contour to a separate region that
are put in the list returned. Note that this function modifies the region in-place.
Assumes the polys in the region are simple and closed. Also note that Polys are added to the new regions
using Region2d.AddRaw()!
|
|
Offset(double, OffsetGapType, double)
|
Offsets each contour in this region. See offset in Poly2d() for details.
|
|
Offset(double, OffsetGapType, double, bool)
|
|
|
OffsetUnion(double, OffsetGapType, double)
|
|
|
PSOffset(double)
|
|
|
RemoveEmptyPolys()
|
|
|
ReversePolys()
|
Reverses the direction of every poly in the region
|
|
Rotate(double)
|
Rotates the region in-place around world origo.
|
|
Rotate(double, Point2d)
|
Rotates the region in-place around a point.
|
|
Scale(double)
|
Scales the region in-place using world origo as scaling center.
|
|
Scale(double, Point2d)
|
Scales the region using a specified point as scaling center.
|
|
Split(bool)
|
Similar to NormalizeSplit but region is assumed to be normalized allready.
Splits the region in CCW+CW... regions
|
|
Swell(double)
|
Shortcut to Stroke(...) the region with Round linecaps and round endcaps, that is the 'real' offset
of the segments (all points of the result has the given distance to the original line).
The result is _not_ trimmed. See Union() function for this.
If the region is closed, an exception will be thrown.
|
|
ToRegion(double)
|
Somewhat silly function in region class but is needed to fullfill the
class hirearchy. returns a copy of itself.
|
|
ToString()
|
Creates a new string suitable for debug purposes.
|
|
Transform(Matrix2d)
|
Transform the region in-place with a matrix.
|
|
TransformSafeMirror(Matrix2d)
|
Transform the region in-place with a matrix.
If the matrix is a mirror matrix then all contours are reversed to maintain correct directions
|
|
Translate(double, double)
|
Translates the poly in-place a specified distance in x and y.
|
|
Union()
|
Computes a self-union of this region into a new region. Direction of contours matters, Counter clockwise
are outer and clockwise are holes. This function is good for trimming offsets of closed region contours.
|
|
WriteAutoCADScript(StreamWriter, int)
|
Writes the object as an AutoCAD loadable script to a stream using
a specified color
|