Arc2d Class

Class describing a circular arc. This circular arc should not be seen as a part of a circle, but more lika a bent segment. Internally it is stored with two points and a bulge factor, which makes it possible to have an arc that equals a line segment. The bulge is defined as i=4*atan(bulge) where i is the arcs included angle. A positive bulge is a counter clockwise arc while a negative is a clockwise.
Public Class Arc2d 
Inherits Geometry2d 
Implements ICircular2d
This language is not supported or no code example is available.
public class Arc2d : Geometry2d
ICircular2d
This language is not supported or no code example is available.
public ref class Arc2d : public Geometry2d^, 
public ICircular2d^
This language is not supported or no code example is available.
public class Arc2d 
extends Geometry2d 
implements ICircular2d
This language is not supported or no code example is available.
Name Description
Public constructor Arc2d() Default constructor creates a straight line zero length arc at origo.
Public constructor Arc2d(Arc2d) Copy constructor.
Public constructor Arc2d(Point2d, Point2d, double) Creates an arc between two points with the specified bulge factor.
Public constructor Arc2d(double, double, double, double, double) Creates an arc between two points with the sepcified bulge factor.
Top
Name Description
Public property Bulge Gets or set the arcs bulge factor.
Public property Center Gets a new point representing the arcs center, or sets the arcs center by translating the arc.
Public property Direction Gets the direction of the arc. If it is equal to a line segment, Direction.Linear is returned.
Public property End Gets a reference to the arcs end point or sets it to a copy of the referenced point.
Public property EndAngle Gets the angle between the arcs center and end point.
Public property EndTangent Gets the tangent angle at the arcs end point.
Public property Extents Gets the minimum area axis aligned box covering the arc completely.
Public property LeftDeflection Another way to define an arc. Used in Optalog Nesting API. If the left_deflection is 0.0, the element is a segment, otherwise the element is an arc. It represents the signed distance from the middle of the chord to the middle of the arc, so left_deflection is positive if the arc goes clockwise.
Public property Length Gets the arcs length.
Public property Linear Returns true if the arc equals a line segment (within epsilon tolerance of the bulge).
Public property MidPoint Gets the point on the middle of the arc segment.
Public property Radius Gets or sets the arcs radius. Setting the radius moves the start and end points appropriately straight towards or away from the arc's center point. If the arc equals a line segment, double.PosetiveInfinity is returned.
Public property SectorArea Gets the area of the circle sector this arc represents.
Public property SegmentArea Gets the area of the segment this arc represents.
Public property SegmentHeight Gets the height of the segment this arc represents.
Public property SignedSweepAngle The included angle of the arc, signed. Positive for CCW arcs and negative for CW ars.
Public property Start Gets a reference to the arcs start point or sets it to a copy of the referenced point.
Public property StartAngle Gets the angle between the arcs center and start point.
Public property StartTangent Gets the tangent angle at the arcs start point.
Public property SweepAngle The included angle of the arc.
Public property WireCentroid Calculates the wire center of gravity.
Public property X1 Gets or sets the startpoints x coordinate.
Public property X2 Gets or sets the endpoints x coordinate.
Public property Y1 Gets or sets the startpoints y coordinate.
Public property Y2 Gets or sets the endpoints y coordinate.
Top
Methods
 
Name Description
Public method Centroid() Computes the area-centroid of the circle segment this arc represents.
Public method Clip(Extents2d) Clips the arc to a specified clipping box. The result is a list of start- and endpoints defining arc segments which are completely inside the clip box. This result is returned in a new point list. The result list is zero-length if the arc does not intersect the clip box.
Public method Clip(Extents2d, List<Point2d>) Clips the arc to a specified clipping box. The result is a list of start- and endpoints defining arc segments which are completely inside the clip box. This result is appended to an existing list of points.
Public method ClosestPoint(Point2d) Computes a new point which resides on the arc, and which is as close as possible to another point.
Public method ClosestPointInfinite(Point2d) Computes the closest point on the circle defined by the arc or the infinte line.
Public method Complement() Creates a new arc that is the complement arc of the arc. Creates an arc going from start to end but in the other direction
Public method Static Create3p(Point2d, Point2d, Point2d) Computes an arc passing through three points. If the given points are colinear, an arc that equals a line segment from start to end points is returned.
Public method Static Create3p(Point2d, Point2d, Point2d, double) Slower but more accurate version of normal Create3p
Public method Static CreateCRAA(Point2d, double, double, double, Direction) Creates an arc from center, radius, start angle and end angle.
Public method Static CreateCSA(Point2d, Point2d, double, Direction) Creates an arc from center, start, angle and direction
Public method Static CreateCSE(Point2d, Point2d, Point2d, Direction) Creates an arc given the arc's center, start- and endpoint. If dir is Direction.Linear, the center point is not used, but an arc that equals a line segment is created.
Public method Static CreateCSL(Point2d, Point2d, double, Direction) Creates an arc from center, start, length and direction
Public method Static CreateFromLine(Line2d) Creates an arc the exactly represents a line segment.
Public method Static CreateFromLine(Point2d, Point2d) Creates an arc from two points forming a line
Public method Static CreateSACA(Point2d, double, Point2d, double) Creates an arc given startpoint, start direction, center and end direction
Public method Static CreateSED(Point2d, Point2d, double) Creates an arc from startpoint to endpoint with the tangential angle from the startpoint beeing specified.
Public method Static CreateSER(Point2d, Point2d, double, Direction, bool) Creates an arc from start,end and radius.
Public method Distance(Point2d) Computes the distance from a point to the arc.
Public method DistanceInfinite(Point2d) Computes the distance from the point to the circle defined by the arc. If the arc is linear it calculates the distance to the infinte line.
Public method EndVector() Calculates the tangent vector at the endpoint of the arc In the direction of the arc.
Public method Eval(double) Returns a point on the arc given a parameter in the range 0.0 - 1.0 . If the parameter is less than 0.0 or larger than 1.0 the point returned is on the linear extension of the arcs end/start.
Public method Eval(double, out double) Returns a point on the arc given a parameter in the range 0.0 - 1.0 . If the parameter is less than 0.0 or larger than 1.0 the point returned is on the linear extension of the arcs end/start.
Public method Flatten(double, FlattenMode) Creates a polygonal approximation of this arc with a given tolerance.
Public method Flatten(double, double) Flattens the arc with 'inside' mode, with a given tolerance. Also checks that the angle between adjacent segments in not larger than maxDeltaAngle.
Public method Flatten(Poly2d, double, FlattenMode, bool, bool) Appends a polygonal approximation of this arc to a Poly2d with a given tolerance. Output of first and last point in result is optional.
Public method GetX(double) Returns the X pos for a certain Y Arc must be Y-monotone and Y must lie "inside" the arc
Public method GetY(double) Returns the Y pos for a certain X Arc must be X-monotone and X must lie "inside" the arc
Public method InterpolateVectors(Vector3d, Vector3d, double, bool, bool) Interpolates a Vector3d along the arc.
Public method IsCirclePointOnArc(Point2d) Checks if a point that is on the circle the arc is a part of is actually included in the arc. If the arc equals a line segment, it returns false. This function is much faster than IsOn(...), but only works well for points that is known to be on/close to the circle.
Public method IsCirclePointOnArc(Point2d, double) Checks if a point that is on the circle the arc is a part of is actually included in the arc. If the arc equals a line segment, it returns true if the point is on the segment. This function is much faster than IsOn(...), but only works well for points that is known to be on/close to the circle (or on the infinite line).
Public method IsOn(Point2d, double) Checks if a point is on (close to) the arc.
Public method MakeXMonotone() Splits the arc into x-montone pieces.
Public method MakeYMonotone() Splits the arc into y-monotone pieces.
Public method Mirror(Point2d, Point2d) Mirrors the arc in-place given a line.
Public method Normal(double) Calculates the normalized normal vector at parameter t. The vector always points to the right of the arc.
Public method Offset(double) Computes an offsetted arc. If the arc is offsetted to much, a zero length arc at center is returned.
Public method Offset2(double) Same as offset except that if the arc "warps" around a new arc is created instead of a point.
Public method Offset2(double, out bool) Same as offset except that if the arc "warps" around a new arc is created instead of a point.
Public method Param(Point2d) Computes a parameter in the range 0.0 - 1.0 where a point is on the arc.
Public method Param(Point2d, out double) Computes a parameter in the range 0.0 - 1.0 where a point is on the arc.
Public method ReinterpretParameter(double)
Public method Reverse() Reverses the arc in-place so that end point becomes start point and vice versa. Note that this will swap the sign of the bulge factor.
Public method Rotate(double) Rotates the arc in-place around origo.
Public method Rotate(double, Point2d) Rotates the arc in-place.
Public method Scale(double) Scales the arc in-place using world origo as scale center.
Public method Scale(double, Point2d) Scales the arc in-place.
Public method SegmentContains(Point2d) Checks if a point is inside the segment represented by this arc. If the arc equals a line segment, it always returns false.
Public method SetEnd(Point2d) Sets the end point of arc, maintaining the center and radius of it.
Public method SetStart(Point2d) Sets the start point of arc, maintaining the center and radius of it.
Public method SideXMonotone() Returns the side of a X-Monotone arc Left equals bottom
Public method SideYMonotone() Returns the side of a Y-Monotone arc
Public method Split(IEnumerable<Double>) Splits the arcs at a list of parameters in the range 0.0 - 1.0
Public method Split(params double[]) Splits the arcs at a list of parameters in the range 0.0 - 1.0
Public method Split(double, out Arc2d, out Arc2d) Splits the arc at a single point given by a parameter.
Public method StartVector() Calculates the tangent vector at the start of the arc. In the direction of the arc.
Public method Tangent(Point2d) Returns the tangent angle in radians on the arc where the point is. This is done by adding or subtracting 90 degrees from the angle between center of the arc and p, which means the point does not have to lie exactly on the arc.
Public method ToRegion(double) Creates a region representing the arc.
Public method ToString() Creates a string representation of the arc suitable for debugging.
Public method Transform(Matrix2d) Transforms the arc in-place with a matrix.
Public method Translate(double, double) Moves the arc in-place a specified distance in x and y.
Public method WriteAutoCADScript(StreamWriter, int) Writes text to a stream, that can be loaded as a script into autocad.
Top

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition