Class GeoArc
The GeoArc Class: Defines a Geometric Circular Arc.
Inherited Members
Namespace: Dxflib.Geometry
Assembly: Dxflib.dll
Syntax
public class GeoArc : GeoBase, INotifyPropertyChanged, IGeoLinear
Remarks
Note that an arc can be defined in more than one way. If this GeoArc is a part of an LwPolyLine then is defined using a bulge. If it is alone then it is defined using a radius. Note that there are 3 distinct ways to construct an Arc
- The First way is the Vertex, Vertex and Bulge (VVB) Method This Method uses two vertices that are at endpoints of the arc and a numerical values called the bulge.
- The Second Method is the Center Point, Starting Angle, Ending Angle and Radius (CAAR) Method. The CAAR method uses a point that will be the center point of the arc the starting angle of the arc and the ending angle of the arc as well as the radius of the arc. This method is mostly used if a user would like to create an arc. Also, this method is used in the AutoCAD ARC Entity.
- The Third Method is the Vertex, Vertex, Vertex (V3) Method. The V3 method uses 3 vertices that the arc must pass though. The first and second vertex are the starting and ending vertices. The middle vertex can be any vertex that is on the arc. During the moving of one vertex the center arc length is usually chosen as the middle vertex. All of the set Properties in this class will cause the geometry of other properties to be updated when they are set.
Constructors
| Improve this Doc View SourceGeoArc(Vertex, Vertex, Vertex)
Geo Arc Constructor: Vertex, Vertex, Vertex (V3) The V3 Constructor takes three vertices that the arc must pass through and calculates all of the other properties of the arc
Declaration
public GeoArc(Vertex vertex0, Vertex middleVertex, Vertex vertex1)
Parameters
Type | Name | Description |
---|---|---|
Vertex | vertex0 | The Starting Vertex |
Vertex | middleVertex | The Middle Vertex |
Vertex | vertex1 | The Ending Vertex |
GeoArc(Vertex, Vertex, Double)
GeoArc from Starting Vertex (vertex0
)
ending Vertex (vertex1
) and a bulge
Declaration
public GeoArc(Vertex vertex0, Vertex vertex1, double bulge)
Parameters
Type | Name | Description |
---|---|---|
Vertex | vertex0 | First Vertex |
Vertex | vertex1 | Second Vertex |
System.Double | bulge | The Bulge |
GeoArc(Vertex, Double, Double, Double)
GeoArc Constructor: Center Vertex, Starting Angle, Ending Angle and Radius (CAAR)
Declaration
public GeoArc(Vertex centerVertex, double startAngle, double endAngle, double radius)
Parameters
Type | Name | Description |
---|---|---|
Vertex | centerVertex | The Center Vertex of the GeoArc |
System.Double | startAngle | The Starting Angle (Radians) |
System.Double | endAngle | The Ending Angle (Radians) |
System.Double | radius | The Radius of the Arc |
Properties
| Improve this Doc View SourceAngle
Total Angle of the Arc (Radians)
Declaration
public double Angle { get; }
Property Value
Type | Description |
---|---|
System.Double |
Remarks
Total angle = EndAngle - StartAngle
Area
Area of the GeoArc
Declaration
public double Area { get; }
Property Value
Type | Description |
---|---|
System.Double |
Remarks
Area is defined as the geometric area between the arc and the segment that defines its chord. ChordArea(GeoArc) is the function that is used to calculate the area of this class
BulgeValue
The bulge value for this object (Is similar to the curvature of an arc)
Declaration
public double BulgeValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
CenterVertex
The Circular center point of the arc
Declaration
public Vertex CenterVertex { get; set; }
Property Value
Type | Description |
---|---|
Vertex |
EndAngle
The Ending Angle of the arc (Radians)
Declaration
public double EndAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Remarks
Starting Angle is defined as the angle between two vectors:
- Vector that starts at CenterVertex and ends at Vertex1
- The XUnitVector. This Angle is measured in radians
Length
Arc Length of the GeoArc
Declaration
public double Length { get; }
Property Value
Type | Description |
---|---|
System.Double |
MiddleVertex
The middle point between the Starting Vertex (Vertex0) and the Ending Vertex (Vertex1) that lies on the path of the arc.
Declaration
public Vertex MiddleVertex { get; set; }
Property Value
Type | Description |
---|---|
Vertex |
Radius
The Radius of the Arc
Declaration
public double Radius { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
StartAngle
The Starting Angle of the arc (Radians)
Declaration
public double StartAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Remarks
Starting Angle is defined as the angle between two vectors:
- Vector that starts at CenterVertex and ends at Vertex0
- The XUnitVector. This Angle is measured in radians
Vertex0
The First Vertex
Declaration
public Vertex Vertex0 { get; set; }
Property Value
Type | Description |
---|---|
Vertex |
Vertex1
The Second Vertex
Declaration
public Vertex Vertex1 { get; set; }
Property Value
Type | Description |
---|---|
Vertex |
Methods
| Improve this Doc View SourceOnPropertyChanged(String)
The property Changed Function
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName |
Overrides
| Improve this Doc View SourceToVector()
Converts this object to a Vector. Where the HeadVertex and TailVertex correspond with the Vertex0 and Vertex1 of this object respectively.
Declaration
public Vector ToVector()
Returns
Type | Description |
---|---|
Vector | A new Vector Object |
UpdateGeometry(String)
Declaration
protected override void UpdateGeometry(string command = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | command |