Operations

class Operation

base-class for low-level cam algorithms

base-class for cam algorithms

Subclassed by ocl::AdaptivePathDropCutter, ocl::BatchDropCutter, ocl::BatchPushCutter, ocl::clsurf::CutterLocationSurface, ocl::FiberPushCutter, ocl::PathDropCutter, ocl::PointDropCutter, ocl::Waterline

Public Functions

inline virtual void setSTL(const STLSurf &s)

set the STL-surface and build kd-tree

inline virtual void setCutter(const MillingCutter *c)

set the MillingCutter to use

inline void setThreads(unsigned int n)

set number of OpenMP threads. Defaults to OpenMP::omp_get_num_procs()

inline int getThreads() const

return number of OpenMP threads

inline int getBucketSize() const

return the kd-tree bucket-size

inline void setBucketSize(unsigned int s)

set the kd-tree bucket-size

inline int getCalls() const

return number of low-level calls

inline virtual void setSampling(double s)

set the sampling interval for this Operation and all sub-operations

inline virtual double getSampling()

return the sampling interval

virtual void run() = 0

run the algorithm

inline virtual void run(CLPoint &cl)

run algorithm on a single input CLPoint

inline virtual void run(Fiber &f)

run push-cutter type algorithm on input Fiber

inline virtual std::vector<CLPoint> getCLPoints()

return CL-points

inline virtual void appendPoint(CLPoint &p)

add an input CLPoint to this Operation

inline virtual void setXDirection()

used by batchpushcutter

inline virtual void setYDirection()

used by batchpushcutter

inline virtual void appendFiber(Fiber &f)

add a fiber input to a push-cutter type operation

inline virtual std::vector<Fiber> *getFibers() const

return the result of a push-cutter type operation

class AdaptiveWaterline : public ocl::Waterline

a Waterline toolpath follows the shape of the model at a constant z-height in the xy-plane

Public Functions

AdaptiveWaterline()

create an empty Waterline object

inline void setMinSampling(double s)

set the minimum sampling interval

inline void setCosLimit(double lim)

set the cosine limit for the flat() predicate

virtual void run()

run the Waterline algorithm. setSTL, setCutter, setSampling, and setZ must be called before a call to run()

inline virtual void setSampling(double s)

set the sampling interval for this Operation and all sub-operations

class Waterline : public ocl::Operation

a Waterline toolpath follows the shape of the model at a constant z-height in the xy-plane

The Waterline object is used for generating waterline or z-slice toolpaths from an STL-model. Waterline uses two BatchPushCutter sub-operations to find out where the CL-points are located and a Weave to split and order the CL-points correctly into loops.

Subclassed by ocl::AdaptiveWaterline

Public Functions

Waterline()

create an empty Waterline object

inline void setZ(const double z)

Set the z-coordinate for the waterline we generate.

virtual void run()

run the Waterline algorithm. setSTL, setCutter, setSampling, and setZ must be called before a call to run()

inline std::vector<std::vector<Point>> getLoops() const

returns a vector< vector< Point > > with the resulting waterline loops

class ZigZag

zgizag 2D operation

Public Functions

inline void setStepOver(double d)

step over distance

inline void setDirection(Point d)

set dir

inline void run()

run the algorithm

inline void addPoint(Point &p)

add an input CLPoint to this Operation

class PathDropCutter : public ocl::Operation

path drop cutter finish Path generation

Public Functions

PathDropCutter()

construct an empty PathDropCutter object

void setPath(const Path *path)

set the Path to follow and sample

inline void setZ(const double z)

set the minimum z-value, or “floor” for drop-cutter

inline double getZ() const

return Z

virtual void run()

run drop-cutter on the whole Path

class PointDropCutter : public ocl::Operation

run drop-cutter on an STL-surface at a single input CLPoint

Public Functions

virtual void setSTL(const STLSurf &s)

set the STL-surface and build kd-tree

virtual void run(CLPoint &cl)

run algorithm on a single input CLPoint

inline virtual void run()

run the algorithm

class FiberPushCutter : public ocl::Operation

run push-cutter on a single input fiber

Public Functions

virtual void setSTL(const STLSurf &s)

set the STL-surface and build kd-tree

inline virtual void setXDirection()

set this bpc to be x-direction

inline virtual void setYDirection()

set this bpc to be Y-direction

inline virtual void run()

run() is an error.

inline virtual void run(Fiber &f)

run push-cutter type algorithm on input Fiber