|
ActiveLib
|
Class to represent an arc. More...
#include <Arc.h>


Public Types | |
| using | Unique = std::unique_ptr<Arc> |
| Unique pointer. | |
| using | Shared = std::shared_ptr<Arc> |
| Shared pointer. | |
| using | Option = std::optional<Arc> |
| Optional. | |
Public Member Functions | |
| Arc () | |
| Arc (const Point ¢re, double radius, double sweep=2.0 *math::pi, double start=0, const Vector3 &norm=Vector3(0, 0, 1)) | |
| Arc (const Point ¢re, const Point &pt1, const Point &pt2, bool isClockwise) | |
| Arc (const Point &pt1, const Point &pt2, const Point &pt3) | |
| Arc (const Point &origin, const PolyPoint &end) | |
| Arc * | clonePtr () const |
| bool | operator== (const Arc &ref) const |
| bool | operator!= (const Arc &ref) const |
| Arc & | operator= (const Arc &source) |
| Arc | operator+ (const Point &offset) const |
| Arc & | operator+= (const Point &offset) |
| Arc | operator- (const Point &offset) const |
| Arc & | operator-= (const Point &offset) |
| Arc | operator* (double scale) const |
| Arc & | operator*= (double scale) |
| Arc | operator* (const Matrix3x3 &matrix) const |
| Arc & | operator*= (const Matrix3x3 &matrix) |
| double | isValid (double prec=math::eps) const |
| bool | isEqual2D (const Arc &ref, double prec=math::eps) const |
| bool | isEqual3D (const Arc &ref, double prec=math::eps) const |
| Point | getOrigin () const |
| PolyPoint | getEnd () const |
| Point | midpoint () const |
| double | getEndAngle () const |
| Plane | getPlane () const |
| Box::Unique | bounds () const |
| double | length2D () const |
| double | length3D () const |
| double | getArea (bool isArcOnly=true, bool isResultSigned=false) const |
| bool | isColinearTo2D (const Arc &ref, double prec=math::eps) const |
| bool | isColinearTo3D (const Arc &ref, double prec=math::eps) const |
| bool | isParallelTo2D (const Arc &ref, double prec=math::eps) const |
| bool | isParallelTo3D (const Arc &ref, double prec=math::eps) const |
| Point | closestPointAlong2D (const Point &ref, double prec=math::eps) const |
| Point | closestPointAlong3D (const Point &ref, double prec=math::eps) const |
| Point | closestPointTo2D (const Point &ref, double prec=math::eps) const |
| Point | closestPointTo3D (const Point &ref, double prec=math::eps) const |
| vertex_index | intersectionWith (const Plane &ref, XList &inter, double prec=math::eps) const |
| vertex_index | intersectionWith2D (const Line &ref, XList &inter, double prec=math::eps) const |
| vertex_index | intersectionWith2D (const Arc &ref, XList &inter, double prec=math::eps) const |
| vertex_index | intersectionWith3D (const Line &ref, XList &inter, double prec=math::eps) const |
| vertex_index | intersectionWith3D (const Arc &ref, XList &inter, double prec=math::eps) const |
| Position | positionOf2D (const Point &ref, double prec=math::eps) const |
| Position | positionOf3D (const Point &ref, double prec=math::eps) const |
| bool | encloses2D (const Point &ref, double prec=math::eps) const |
| bool | encloses3D (const Point &ref, double prec=math::eps) const |
| void | setEndAngle (double end) |
| void | movePolar (double len, double azim, double alt) |
| void | movePolar (double len, double angle) |
| void | expand (double inc) |
| void | spin (double rotAngle) |
| void | flip () |
Public Member Functions inherited from active::utility::Cloner | |
| virtual | ~Cloner ()=default |
Public Attributes | |
| Point | centre |
| Vector3 | normal |
| double | radius |
| double | startAngle |
| double | sweep |
Protected Member Functions | |
| void | initLevel (Leveller &level, double prec=math::eps) const |
| bool | createIntersect (const Point &pt, const Arc &arc, const Arc &ref, XList &inter, double prec=math::eps) const |
| bool | createIntersect (const Point &pt, const Arc &arc, const Line &ref, XList &inter, double prec=math::eps) const |
| vertex_index | intersectionWithLevel (const Line &ref, XList &inter, double prec=math::eps) const |
| vertex_index | intersectionWithLevel (const Arc &ref, XList &inter, double prec=math::eps) const |
Class to represent an arc.
| Arc::Arc | ( | ) |
Constructor

| Arc::Arc | ( | const Point & | centre, |
| double | radius, | ||
| double | sweep = 2.0 * math::pi, | ||
| double | start = 0, | ||
| const Vector3 & | norm = Vector3(0, 0, 1) ) |
Constructor
| centre | Centre of the arc |
| start | Start angle of the arc sweep |
| sweep | Arc sweep angle |
| norm | Normal to the arc plane |
Constructor
| centre | Centre of the arc |
| pt1 | First point on the arc |
| pt2 | Second point on the arc |
| isClockwise | True if the arc travels in a clockwise direction from pt1 to pt2 |

Constructor
| pt1 | First point on the arc (Note: points must be consecutive) |
| pt2 | Second point on the arc |
| pt3 | Third point on the arc |

Constructor
| origin | Origin point of the arc |
| end | End point of the arc |

| Box::Unique Arc::bounds | ( | ) | const |
Get the bounds of the arc


|
inlinevirtual |
Clone method
Implements active::utility::Cloner.

Get the closest point along the arc to a given point in 2D
| ref | The reference point |


Get the closest point along the arc to a given point
| ref | The reference point |


Get the closest point in the arc to a given point in 2D
| ref | The reference point |


Get the closest point in the arc to a given point
| ref | The reference point |


|
protected |
Create an intersection point
| pt | The intersection point |
| arc | The source arc |
| ref | The reference arc |
| inter | The intersection list to populate |
| prec | The required precision |


|
protected |
Create an intersection point
| pt | The intersection point |
| arc | The source arc |
| ref | The reference line |
| inter | The intersection list to populate |
| prec | The required precision |

Determine if a point is enclosed by an arc in 2D
| ref | The reference point |

Determine if a point is enclosed by an arc
| ref | The reference point |

|
inline |
Adjust the radius by the specified amount
| inc | The expansion amount |
| void Arc::flip | ( | ) |
Flip the arc
| double Arc::getArea | ( | bool | isArcOnly = true, |
| bool | isResultSigned = false ) const |
Get the arc area
| isArcOnly | True if only the area enclosed by the arc is included (not the wedge to the centre) |
| isResultSigned | True if the result should be signed (reflecting the arc angle) |


| PolyPoint Arc::getEnd | ( | ) | const |
Get the end point of the arc


|
inline |
Get the arc end angle

| Point Arc::getOrigin | ( | ) | const |
Get the origin point of the arc


| Plane Arc::getPlane | ( | ) | const |
Get the plane of the arc


| vertex_index Arc::intersectionWith | ( | const Plane & | ref, |
| XList & | inter, | ||
| double | prec = math::eps ) const |
Get the intersection point of an arc and plane in 3D
| ref | The reference plane |
| inter | The intersection list to populate |
| prec | The required precision |

| vertex_index Arc::intersectionWith2D | ( | const Arc & | ref, |
| XList & | inter, | ||
| double | prec = math::eps ) const |
Get the intersection point of two arcs in 2D
| ref | The reference arc |
| inter | The intersection list to populate |
| prec | The required precision |

| vertex_index Arc::intersectionWith2D | ( | const Line & | ref, |
| XList & | inter, | ||
| double | prec = math::eps ) const |
Get the intersection point of an arc and line in 2D
| ref | The reference line |
| inter | The intersection list to populate |
| prec | The required precision |


| vertex_index Arc::intersectionWith3D | ( | const Arc & | ref, |
| XList & | inter, | ||
| double | prec = math::eps ) const |
Get the intersection point of two arcs in 3D
| ref | The reference arc |
| inter | The intersection list to populate |
| prec | The required precision |

| vertex_index Arc::intersectionWith3D | ( | const Line & | ref, |
| XList & | inter, | ||
| double | prec = math::eps ) const |
Get the intersection point of an arc and line in 3D
| ref | The reference line |
| inter | The intersection list to populate |
| prec | The required precision |


|
protected |
Get the intersection point between two co-planar horizontal arcs
| ref | The reference arc |
| inter | The intersection list to populate |
| prec | The required precision |

|
protected |
Get the intersection point between a co-planar horizontal line and arc
| ref | The reference line |
| inter | The intersection list to populate |
| prec | The required precision |


Check if two arcs are colinear
| ref | The reference arc |

Check if two arcs are colinear
| ref | The reference arc |

Determine if two arcs are equal in 2D
| ref | The arc to compare with this |
| prec | The required precision |

Determine if two arcs are equal
| ref | The arc to compare with this |
| prec | The required precision |


Check if two arcs are parallel
| ref | The reference arc |


Check if two arcs are concentric
| ref | The reference arc |


| double Arc::isValid | ( | double | prec = math::eps | ) | const |
Determine if the arc is valid


| double Arc::length2D | ( | ) | const |
Get the length of the arc in 2D

| double Arc::length3D | ( | ) | const |
Get the length of the arc

| Point Arc::midpoint | ( | ) | const |
Get the midpoint of the arc


| void Arc::movePolar | ( | double | len, |
| double | angle ) |
Move the arc by the specified distance and angle
| len | The distance to move the arc |
| angle | The angle to move the arc along |

| void Arc::movePolar | ( | double | len, |
| double | azim, | ||
| double | alt ) |
Move the arc by the specified distance and azimuth/altitude angles
| len | The distance to move the arc |
| azim | The azimuth angle to move the arc along |
| alt | The altitude angle to move the arc along |

|
inline |
Inequality operator
| ref | The line to compare with this |

Multiplication operator
| matrix | The matrix to multiply the arc by |

| Arc Arc::operator* | ( | double | scale | ) | const |
Multiplication operator
| scale | The amount to multiply the arc by |

Multiplication with assignment operator
| matrix | The matrix to multiply the arc by |

| Arc & Arc::operator*= | ( | double | scale | ) |
Multiplication with assignment operator
| scale | The amount to multiply the arc by |
Addition operator
| offset | The amount to add to the arc |

Addition with assignment operator
| offset | The amount to add to the arc |
Subtraction operator
| offset | The amount to subtract from the arc |

Subtraction with assignment operator
| offset | The amount to subtract from the arc |
Assignment operator
| source | The arc to be assigned to this |
|
inline |
Equality operator
| ref | The line to compare with this |

Determine the relationship of a point to the arc in 2D
| ref | The point to test |
| prec | The required precision |


Determine the relationship of a point to the arc in 3D
| ref | The point to test |
| prec | The required precision |


|
inline |
Set the arc end angle
| end | The arc end angle |
|
inline |
Spin the arc about its axis by the specified angle
| rotAngle | The rotation angle |