#include <Curve.h>
Public Member Functions | |
void | append (const CVertex &vertex) |
void | Break (const Point &p) |
void | ChangeEnd (const Point &p) |
void | ChangeStart (const Point &p) |
void | CurveIntersections (const CCurve &c, std::list< Point > &pts) const |
void | ExtractSeparateCurves (const std::list< Point > &ordered_points, std::list< CCurve > &separate_curves) const |
void | FitArcs (bool retry=false) |
double | GetArea () const |
void | GetBox (CBox2D &box) |
void | GetSpans (std::list< Span > &spans) const |
bool | IsClockwise () const |
bool | IsClosed () const |
Point | NearestPoint (const CCurve &p, double *d=NULL) const |
Point | NearestPoint (const Point &p) const |
Point | NearestPoint (const Span &p, double *d=NULL) const |
bool | Offset (double leftwards_value) |
void | OffsetForward (double forwards_value, bool refit_arcs=true) |
void | operator+= (const CCurve &p) |
double | Perim () const |
Point | PerimToPoint (double perim) const |
double | PointToPerim (const Point &p) const |
void | RemoveTinySpans () |
void | Reverse () |
void | SpanIntersections (const Span &s, std::list< Point > &pts) const |
void | UnFitArcs () |
Public Attributes | |
std::list< CVertex > | m_vertices |
Protected Member Functions | |
void | AddArcOrLines (bool check_for_arc, std::list< CVertex > &new_vertices, std::list< const CVertex * > &might_be_an_arc, CArc &arc, bool &arc_found, bool &arc_added) |
Static Protected Member Functions | |
static bool | CheckForArc (const CVertex &prev_vt, std::list< const CVertex * > &might_be_an_arc, CArc &arc) |
|
protected |
References CheckForArc().
Referenced by FitArcs().
void CCurve::append | ( | const CVertex & | vertex | ) |
References m_vertices.
Referenced by Path::Area::addWire().
void CCurve::Break | ( | const Point & | p | ) |
References CVertex::m_p, and m_vertices.
void CCurve::ChangeEnd | ( | const Point & | p | ) |
References CVertex::m_p, and m_vertices.
void CCurve::ChangeStart | ( | const Point & | p | ) |
References IsClosed(), CVertex::m_p, and m_vertices.
Referenced by Offset().
|
staticprotected |
References CArea::m_accuracy, CVertex::m_p, CArea::m_units, Point::x, and Point::y.
Referenced by AddArcOrLines(), and FitArcs().
References CArea::append().
void CCurve::ExtractSeparateCurves | ( | const std::list< Point > & | ordered_points, |
std::list< CCurve > & | separate_curves | ||
) | const |
References CVertex::m_p, and m_vertices.
Referenced by CArea::InsideCurves().
void CCurve::FitArcs | ( | bool | retry = false | ) |
References AddArcOrLines(), CheckForArc(), FitArcs(), IsClosed(), CVertex::m_type, and m_vertices.
Referenced by CArea::FitArcs(), FitArcs(), and OffsetForward().
double CCurve::GetArea | ( | ) | const |
References Span::GetArea(), CVertex::m_p, and m_vertices.
Referenced by CArea::GetArea(), and IsClockwise().
void CCurve::GetBox | ( | CBox2D & | box | ) |
References Span::GetBox(), CVertex::m_p, and m_vertices.
Referenced by CArea::GetBox().
void CCurve::GetSpans | ( | std::list< Span > & | spans | ) | const |
References CVertex::m_p, and m_vertices.
Referenced by CArea::CurveIntersections(), OffsetForward(), and SpanIntersections().
bool CCurve::IsClockwise | ( | ) | const |
References GetArea().
Referenced by Offset(), CArea::Split(), and CInnerCurves::Unite().
bool CCurve::IsClosed | ( | ) | const |
References m_vertices.
Referenced by Path::Area::addWire(), ChangeStart(), CArea::ChangeStartToNearest(), FitArcs(), Offset(), and CArea::PopulateClipper().
References DraftVecUtils::dist(), CVertex::m_p, and NearestPoint().
References Point::dist(), DraftVecUtils::dist(), CVertex::m_p, m_vertices, and Span::NearestPoint().
Referenced by CArea::ChangeStartToNearest(), NearestPoint(), CArea::NearestPoint(), and Offset().
References DraftVecUtils::dist(), CVertex::m_p, m_vertices, and Span::NearestPoint().
bool CCurve::Offset | ( | double | leftwards_value | ) |
void CCurve::OffsetForward | ( | double | forwards_value, |
bool | refit_arcs = true |
||
) |
References FitArcs(), GetSpans(), Span::GetVector(), Span::m_p, m_vertices, Point::normalize(), and UnFitArcs().
void CCurve::operator+= | ( | const CCurve & | p | ) |
References m_vertices.
double CCurve::Perim | ( | ) | const |
References CVertex::m_p, and m_vertices.
Referenced by CArea::InsideCurves().
Point CCurve::PerimToPoint | ( | double | perim | ) | const |
References CVertex::m_p, and m_vertices.
Referenced by CArea::InsideCurves().
double CCurve::PointToPerim | ( | const Point & | p | ) | const |
References Point::dist(), DraftVecUtils::dist(), Span::Length(), CVertex::m_p, and m_vertices.
void CCurve::RemoveTinySpans | ( | ) |
References CVertex::m_p, CVertex::m_type, m_vertices, and Point::tolerance.
void CCurve::Reverse | ( | ) |
References CVertex::m_c, CVertex::m_type, and m_vertices.
Referenced by Offset(), and CInnerCurves::Unite().
References GetSpans().
Referenced by CArea::SpanIntersections().
void CCurve::UnFitArcs | ( | ) |
References CArea::m_accuracy, CVertex::m_c, CVertex::m_p, CVertex::m_type, CArea::m_units, m_vertices, Point::x, and Point::y.
Referenced by Path::Area::addWire(), and OffsetForward().
std::list<CVertex> CCurve::m_vertices |
Referenced by Path::Area::addWire(), append(), Break(), ChangeEnd(), ChangeStart(), CArea::ChangeStartToNearest(), ExtractSeparateCurves(), FitArcs(), GetArea(), GetBox(), GetCurveItem::GetCurve(), GetSpans(), IsClosed(), CArea::MakeOnePocketCurve(), NearestPoint(), Offset(), OffsetForward(), operator+=(), Perim(), PerimToPoint(), PointToPerim(), RemoveTinySpans(), Reverse(), and UnFitArcs().