CCurve Class Reference

#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< CVertexm_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)
 

Member Function Documentation

◆ AddArcOrLines()

void CCurve::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 
)
protected

References CheckForArc().

Referenced by FitArcs().

◆ append()

void CCurve::append ( const CVertex vertex)

References m_vertices.

Referenced by Path::Area::addWire().

◆ Break()

void CCurve::Break ( const Point p)

References CVertex::m_p, and m_vertices.

◆ ChangeEnd()

void CCurve::ChangeEnd ( const Point p)

References CVertex::m_p, and m_vertices.

◆ ChangeStart()

void CCurve::ChangeStart ( const Point p)

References IsClosed(), CVertex::m_p, and m_vertices.

Referenced by Offset().

◆ CheckForArc()

bool CCurve::CheckForArc ( const CVertex prev_vt,
std::list< const CVertex * > &  might_be_an_arc,
CArc arc 
)
staticprotected

◆ CurveIntersections()

void CCurve::CurveIntersections ( const CCurve c,
std::list< Point > &  pts 
) const

References CArea::append().

◆ ExtractSeparateCurves()

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().

◆ FitArcs()

void CCurve::FitArcs ( bool  retry = false)

◆ GetArea()

double CCurve::GetArea ( ) const

References Span::GetArea(), CVertex::m_p, and m_vertices.

Referenced by CArea::GetArea(), and IsClockwise().

◆ GetBox()

void CCurve::GetBox ( CBox2D box)

References Span::GetBox(), CVertex::m_p, and m_vertices.

Referenced by CArea::GetBox().

◆ GetSpans()

void CCurve::GetSpans ( std::list< Span > &  spans) const

◆ IsClockwise()

bool CCurve::IsClockwise ( ) const

References GetArea().

Referenced by Offset(), CArea::Split(), and CInnerCurves::Unite().

◆ IsClosed()

◆ NearestPoint() [1/3]

Point CCurve::NearestPoint ( const CCurve p,
double *  d = NULL 
) const

◆ NearestPoint() [2/3]

◆ NearestPoint() [3/3]

Point CCurve::NearestPoint ( const Span p,
double *  d = NULL 
) const

◆ Offset()

◆ OffsetForward()

void CCurve::OffsetForward ( double  forwards_value,
bool  refit_arcs = true 
)

◆ operator+=()

void CCurve::operator+= ( const CCurve p)

References m_vertices.

◆ Perim()

double CCurve::Perim ( ) const

References CVertex::m_p, and m_vertices.

Referenced by CArea::InsideCurves().

◆ PerimToPoint()

Point CCurve::PerimToPoint ( double  perim) const

References CVertex::m_p, and m_vertices.

Referenced by CArea::InsideCurves().

◆ PointToPerim()

double CCurve::PointToPerim ( const Point p) const

◆ RemoveTinySpans()

void CCurve::RemoveTinySpans ( )

◆ Reverse()

void CCurve::Reverse ( )

References CVertex::m_c, CVertex::m_type, and m_vertices.

Referenced by Offset(), and CInnerCurves::Unite().

◆ SpanIntersections()

void CCurve::SpanIntersections ( const Span s,
std::list< Point > &  pts 
) const

References GetSpans().

Referenced by CArea::SpanIntersections().

◆ UnFitArcs()

Member Data Documentation

◆ m_vertices


The documentation for this class was generated from the following files: