AdaptivePath Namespace Reference

Classes

class  Adaptive2d
 
struct  AdaptiveOutput
 
class  BoundBox
 
class  ClearedArea
 
class  EngagePoint
 
class  Interpolation
 
class  PerfCounter
 

Typedefs

typedef std::vector< DPointDPath
 
typedef std::vector< DPathDPaths
 
typedef std::pair< double, double > DPoint
 
typedef std::pair< int, DPathTPath
 
typedef std::vector< TPathTPaths
 

Enumerations

enum  MotionType { mtCutting = 0 , mtLinkClear = 1 , mtLinkNotClear = 2 , mtLinkClearAtPrevPass = 3 }
 
enum  OperationType { otClearingInside = 0 , otClearingOutside = 1 , otProfilingInside = 2 , otProfilingOutside = 3 }
 

Functions

double Angle3Points (const DoublePoint &p1, const DoublePoint &p2, const DoublePoint &p3)
 
void appendDirectChildPaths (Paths &outPaths, const Path &path, const Paths &paths)
 
void AverageDirection (const vector< DoublePoint > &unityVectors, DoublePoint &output)
 
double averageDV (const vector< double > &vec)
 
bool Circle2CircleIntersect (const IntPoint &c1, const IntPoint &c2, double radius, pair< DoublePoint, DoublePoint > &intersections)
 
void CleanPath (const Path &inp, Path &outpt, double tolerance)
 
IntPoint Compute2DPolygonCentroid (const Path &vertices)
 
void ConnectPaths (Paths input, Paths &output)
 
void DeduplicatePaths (const Paths &inputs, Paths &outputs)
 
DoublePoint DirectionV (const IntPoint &pt1, const IntPoint &pt2)
 
double DistancePointToLineSegSquared (const IntPoint &p1, const IntPoint &p2, const IntPoint &pt, IntPoint &closestPoint, double &ptParameter, bool clamp=true)
 
double DistancePointToPathsSqrd (const Paths &paths, const IntPoint &pt, IntPoint &closestPointOnPath, size_t &clpPathIndex, size_t &clpSegmentIndex, double &clpParameter)
 
double DistanceSqrd (const IntPoint &pt1, const IntPoint &pt2)
 
DoublePoint GetPathDirectionV (const Path &pth, size_t pointIndex)
 
int getPathNestingLevel (const Path &path, const Paths &paths)
 
bool HasAnyPath (const Paths &paths)
 
bool IntersectionPoint (const IntPoint &s1p1, const IntPoint &s1p2, const IntPoint &s2p1, const IntPoint &s2p2, IntPoint &intersection)
 
bool IntersectionPoint (const Paths &paths, const IntPoint &p1, const IntPoint &p2, IntPoint &intersection)
 
bool IsPointWithinCutRegion (const Paths &toolBoundPaths, const IntPoint &point)
 
bool Line2CircleIntersect (const IntPoint &c, double radius, const IntPoint &p1, const IntPoint &p2, vector< DoublePoint > &result, bool clamp=true)
 
void NormalizeV (DoublePoint &pt)
 
std::ostream & operator<< (std::ostream &s, const BoundBox &p)
 
double PathLength (const Path &path)
 
double PointSideOfLine (const IntPoint &p1, const IntPoint &p2, const IntPoint &pt)
 
bool PopPathWithClosestPoint (Paths &paths, IntPoint p1, Path &result)
 
DoublePoint rotate (const DoublePoint &in, double rad)
 
void ScaleDownPaths (Paths &paths, long scaleFactor)
 
void ScaleUpPaths (Paths &paths, long scaleFactor)
 
bool SetSegmentLength (const IntPoint &pt1, IntPoint &pt2, double new_length)
 
void SmoothPaths (Paths &paths, double stepSize, long pointCount, long iterations)
 

Variables

PerfCounter Perf_AppendToolPath ("AppendToolPath")
 
PerfCounter Perf_CalcCutAreaCirc ("CalcCutArea")
 
PerfCounter Perf_CalcCutAreaClip ("CalcCutAreaClip")
 
PerfCounter Perf_DistanceToBoundary ("DistanceToBoundary")
 
PerfCounter Perf_ExpandCleared ("ExpandCleared")
 
PerfCounter Perf_IsAllowedToCutTrough ("IsAllowedToCutTrough")
 
PerfCounter Perf_IsClearPath ("IsClearPath")
 
PerfCounter Perf_NextEngagePoint ("NextEngagePoint")
 
PerfCounter Perf_PointIterations ("PointIterations")
 
PerfCounter Perf_ProcessPolyNode ("ProcessPolyNode")
 

Typedef Documentation

◆ DPath

typedef std::vector<DPoint> AdaptivePath::DPath

◆ DPaths

typedef std::vector<DPath> AdaptivePath::DPaths

◆ DPoint

typedef std::pair<double, double> AdaptivePath::DPoint

◆ TPath

typedef std::pair<int, DPath> AdaptivePath::TPath

◆ TPaths

typedef std::vector<TPath> AdaptivePath::TPaths

Enumeration Type Documentation

◆ MotionType

Enumerator
mtCutting 
mtLinkClear 
mtLinkNotClear 
mtLinkClearAtPrevPass 

◆ OperationType

Enumerator
otClearingInside 
otClearingOutside 
otProfilingInside 
otProfilingOutside 

Function Documentation

◆ Angle3Points()

double AdaptivePath::Angle3Points ( const DoublePoint p1,
const DoublePoint p2,
const DoublePoint p3 
)

◆ appendDirectChildPaths()

void AdaptivePath::appendDirectChildPaths ( Paths outPaths,
const Path path,
const Paths paths 
)

◆ AverageDirection()

void AdaptivePath::AverageDirection ( const vector< DoublePoint > &  unityVectors,
DoublePoint output 
)

◆ averageDV()

double AdaptivePath::averageDV ( const vector< double > &  vec)

◆ Circle2CircleIntersect()

bool AdaptivePath::Circle2CircleIntersect ( const IntPoint c1,
const IntPoint c2,
double  radius,
pair< DoublePoint, DoublePoint > &  intersections 
)

◆ CleanPath()

void AdaptivePath::CleanPath ( const Path inp,
Path outpt,
double  tolerance 
)

◆ Compute2DPolygonCentroid()

IntPoint AdaptivePath::Compute2DPolygonCentroid ( const Path vertices)

◆ ConnectPaths()

void AdaptivePath::ConnectPaths ( Paths  input,
Paths output 
)

◆ DeduplicatePaths()

void AdaptivePath::DeduplicatePaths ( const Paths inputs,
Paths outputs 
)

◆ DirectionV()

DoublePoint AdaptivePath::DirectionV ( const IntPoint pt1,
const IntPoint pt2 
)

◆ DistancePointToLineSegSquared()

double AdaptivePath::DistancePointToLineSegSquared ( const IntPoint p1,
const IntPoint p2,
const IntPoint pt,
IntPoint closestPoint,
double &  ptParameter,
bool  clamp = true 
)

◆ DistancePointToPathsSqrd()

double AdaptivePath::DistancePointToPathsSqrd ( const Paths paths,
const IntPoint pt,
IntPoint closestPointOnPath,
size_t &  clpPathIndex,
size_t &  clpSegmentIndex,
double &  clpParameter 
)

References DistancePointToLineSegSquared().

Referenced by CleanPath().

◆ DistanceSqrd()

◆ GetPathDirectionV()

DoublePoint AdaptivePath::GetPathDirectionV ( const Path pth,
size_t  pointIndex 
)

References DirectionV().

◆ getPathNestingLevel()

int AdaptivePath::getPathNestingLevel ( const Path path,
const Paths paths 
)

◆ HasAnyPath()

bool AdaptivePath::HasAnyPath ( const Paths paths)

◆ IntersectionPoint() [1/2]

bool AdaptivePath::IntersectionPoint ( const IntPoint s1p1,
const IntPoint s1p2,
const IntPoint s2p1,
const IntPoint s2p2,
IntPoint intersection 
)

◆ IntersectionPoint() [2/2]

bool AdaptivePath::IntersectionPoint ( const Paths paths,
const IntPoint p1,
const IntPoint p2,
IntPoint intersection 
)

◆ IsPointWithinCutRegion()

bool AdaptivePath::IsPointWithinCutRegion ( const Paths toolBoundPaths,
const IntPoint point 
)

◆ Line2CircleIntersect()

bool AdaptivePath::Line2CircleIntersect ( const IntPoint c,
double  radius,
const IntPoint p1,
const IntPoint p2,
vector< DoublePoint > &  result,
bool  clamp = true 
)

◆ NormalizeV()

void AdaptivePath::NormalizeV ( DoublePoint pt)

◆ operator<<()

std::ostream & AdaptivePath::operator<< ( std::ostream &  s,
const BoundBox p 
)

◆ PathLength()

double AdaptivePath::PathLength ( const Path path)

References DistanceSqrd().

◆ PointSideOfLine()

double AdaptivePath::PointSideOfLine ( const IntPoint p1,
const IntPoint p2,
const IntPoint pt 
)

◆ PopPathWithClosestPoint()

bool AdaptivePath::PopPathWithClosestPoint ( Paths paths,
IntPoint  p1,
Path result 
)

◆ rotate()

DoublePoint AdaptivePath::rotate ( const DoublePoint in,
double  rad 
)

◆ ScaleDownPaths()

void AdaptivePath::ScaleDownPaths ( Paths paths,
long  scaleFactor 
)

Referenced by SmoothPaths().

◆ ScaleUpPaths()

void AdaptivePath::ScaleUpPaths ( Paths paths,
long  scaleFactor 
)

Referenced by SmoothPaths().

◆ SetSegmentLength()

bool AdaptivePath::SetSegmentLength ( const IntPoint pt1,
IntPoint pt2,
double  new_length 
)

◆ SmoothPaths()

void AdaptivePath::SmoothPaths ( Paths paths,
double  stepSize,
long  pointCount,
long  iterations 
)

Variable Documentation

◆ Perf_AppendToolPath

PerfCounter AdaptivePath::Perf_AppendToolPath("AppendToolPath") ( "AppendToolPath"  )

◆ Perf_CalcCutAreaCirc

PerfCounter AdaptivePath::Perf_CalcCutAreaCirc("CalcCutArea") ( "CalcCutArea"  )

◆ Perf_CalcCutAreaClip

PerfCounter AdaptivePath::Perf_CalcCutAreaClip("CalcCutAreaClip") ( "CalcCutAreaClip"  )

◆ Perf_DistanceToBoundary

PerfCounter AdaptivePath::Perf_DistanceToBoundary("DistanceToBoundary") ( "DistanceToBoundary"  )

◆ Perf_ExpandCleared

PerfCounter AdaptivePath::Perf_ExpandCleared("ExpandCleared") ( "ExpandCleared"  )

◆ Perf_IsAllowedToCutTrough

PerfCounter AdaptivePath::Perf_IsAllowedToCutTrough("IsAllowedToCutTrough") ( "IsAllowedToCutTrough"  )

◆ Perf_IsClearPath

PerfCounter AdaptivePath::Perf_IsClearPath("IsClearPath") ( "IsClearPath"  )

◆ Perf_NextEngagePoint

PerfCounter AdaptivePath::Perf_NextEngagePoint("NextEngagePoint") ( "NextEngagePoint"  )

◆ Perf_PointIterations

PerfCounter AdaptivePath::Perf_PointIterations("PointIterations") ( "PointIterations"  )

◆ Perf_ProcessPolyNode

PerfCounter AdaptivePath::Perf_ProcessPolyNode("ProcessPolyNode") ( "ProcessPolyNode"  )