Show / Hide Table of Contents

Struct SweepAngle

A sweep angle. Typically the value of this object is between -2pi and +2pi. Used for rotation operations etc.

Implements
System.Runtime.Serialization.ISerializable
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: CADability
Assembly: CADability.dll
Syntax
[Serializable]
public struct SweepAngle : ISerializable

Constructors

| Improve this Doc View Source

SweepAngle(Angle, Angle, Boolean)

Constructs the sweep angle you need to go from From to To in the direction defined by CounterClockwise

Declaration
public SweepAngle(Angle From, Angle To, bool CounterClockwise)
Parameters
Type Name Description
Angle From

starting angle

Angle To

ending angle

System.Boolean CounterClockwise

direction

| Improve this Doc View Source

SweepAngle(GeoPoint2D, GeoPoint2D)

Constructs the sweep angle as the angle of the vector from Center to Target

Declaration
public SweepAngle(GeoPoint2D Target, GeoPoint2D Center)
Parameters
Type Name Description
GeoPoint2D Target

Endpoint of the vector

GeoPoint2D Center

Startpoint of the vector

| Improve this Doc View Source

SweepAngle(GeoVector, GeoVector)

Constructs the sweep angle you need to go from From to To.

Declaration
public SweepAngle(GeoVector From, GeoVector To)
Parameters
Type Name Description
GeoVector From

starting vector

GeoVector To

target vector

| Improve this Doc View Source

SweepAngle(GeoVector2D, GeoVector2D)

Constructs a sweep angle from the vector From to the vector To.

Declaration
public SweepAngle(GeoVector2D From, GeoVector2D To)
Parameters
Type Name Description
GeoVector2D From
GeoVector2D To
| Improve this Doc View Source

SweepAngle(Double)

Constructs the sweep angle with the provided radian (which must be between -2pi and +2pi, which is not checked)

Declaration
public SweepAngle(double d)
Parameters
Type Name Description
System.Double d
| Improve this Doc View Source

SweepAngle(Double, Double)

Constructs the sweep angle with tan(sweep angle)==dy/dx

Declaration
public SweepAngle(double dx, double dy)
Parameters
Type Name Description
System.Double dx
System.Double dy

Fields

| Improve this Doc View Source

Full

The sweep angle that turns 360° counterclockwise

Declaration
public static SweepAngle Full
Field Value
Type Description
SweepAngle
| Improve this Doc View Source

FullReverse

The sweep angle that turns 360° clockwise

Declaration
public static SweepAngle FullReverse
Field Value
Type Description
SweepAngle
| Improve this Doc View Source

Opposite

The sweep angle that turns to the opposite directio

Declaration
public static SweepAngle Opposite
Field Value
Type Description
SweepAngle
| Improve this Doc View Source

ToLeft

The sweep angle that turns 90° to the left

Declaration
public static SweepAngle ToLeft
Field Value
Type Description
SweepAngle
| Improve this Doc View Source

ToRight

The sweep angle that turns 90° to the right

Declaration
public static SweepAngle ToRight
Field Value
Type Description
SweepAngle

Properties

| Improve this Doc View Source

Degree

Declaration
public double Degree { get; set; }
Property Value
Type Description
System.Double

Zugriff auf das Gradmaß

| Improve this Doc View Source

Radian

Declaration
public double Radian { get; set; }
Property Value
Type Description
System.Double

Zugriff auf das Bogenmaß

Methods

| Improve this Doc View Source

Deg(Double)

Returns a SweepAngle that rotates by the given degrees

Declaration
public static SweepAngle Deg(double d)
Parameters
Type Name Description
System.Double d

amount to rotate in degrees (-360<=d<=360)

Returns
Type Description
SweepAngle

A new SweepAngle

| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Implements System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)

Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

The System.Runtime.Serialization.SerializationInfo to populate with data.

System.Runtime.Serialization.StreamingContext context

The destination (System.Runtime.Serialization.StreamingContext) for this serialization.

| Improve this Doc View Source

IsCloseTo(SweepAngle)

Returns true, if the sweep angles differ by less than 1e-12 (in radian)

Declaration
public bool IsCloseTo(SweepAngle ang)
Parameters
Type Name Description
SweepAngle ang
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ToString()

Returns a string representation of this sweep angle in degrees

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

Operators

| Improve this Doc View Source

Implicit(Angle to SweepAngle)

Casts an angle to a sweep angle with the same value

Declaration
public static implicit operator SweepAngle(Angle a)
Parameters
Type Name Description
Angle a
Returns
Type Description
SweepAngle
| Improve this Doc View Source

Implicit(SweepAngle to Double)

Cast Operator, der einen Winkel in ein double umwandelt. Ergebnis ist das Bogenmaß des Winkels. Es werden keine Berechnungen vorgenommen

Declaration
public static implicit operator double (SweepAngle ang)
Parameters
Type Name Description
SweepAngle ang

der Winkel

Returns
Type Description
System.Double

double als Ergebnis

| Improve this Doc View Source

Implicit(Double to SweepAngle)

Cast Operator, der ein double in einen Winkel umwandelt. Es wird das modulo 2*pi berechnet

Declaration
public static implicit operator SweepAngle(double v)
Parameters
Type Name Description
System.Double v

double Wert

Returns
Type Description
SweepAngle

Winkel

| Improve this Doc View Source

Multiply(Double, SweepAngle)

Returns the multiple of the sweep angle

Declaration
public static SweepAngle operator *(double d, SweepAngle s)
Parameters
Type Name Description
System.Double d

factor

SweepAngle s
Returns
Type Description
SweepAngle
| Improve this Doc View Source

UnaryNegation(SweepAngle)

Returns the reverse of the provided sweep angle

Declaration
public static SweepAngle operator -(SweepAngle s)
Parameters
Type Name Description
SweepAngle s
Returns
Type Description
SweepAngle

Implements

System.Runtime.Serialization.ISerializable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX