QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
CamExporter Class Reference

Implementation of a simple CAM exporter that implements the RFileExporter interface. More...

Inheritance diagram for CamExporter:

Public Member Functions

void appendToContour (void contour, void prepend)
 Appends / prepends entities to the given contour until no more connected entities can be found.
 
void CamExporter (void documentInterface, void newDocumentInterface)
 
void closeLogFile (void fileName)
 
void contourContains (void contour, void point)
 Allow exporters to implement their own test if point is inside contour.
 
void convert (void v)
 Converts the given value v from the document unit into the output unit.
 
void createLayer (void layerName, void color, void linetype)
 
void endExport ()
 
void exportArcSegment (void arc, void allowForZeroLength)
 
void exportClosedContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Called for entities of closed contours.
 
void exportContour (void contour, void contourId, void pos, void siEntryPoints, void progressDialog)
 Exports the given contour, starting at the the given position pos.
 
void exportContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Exports the given entity.
 
void exportEntities (void allBlocks, void undone)
 
void exportFile (void fileName)
 
void exportFirstClosedContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Called for the first entity of a closed contour.
 
void exportFirstContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Called for the first entity of open and closed contours.
 
void exportFirstOpenContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Called for the first entity of an open contour.
 
void exportLastClosedContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Called for the last entity of a closed contour.
 
void exportLastContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Called for the last entity of open and closed contours.
 
void exportLastOpenContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Called for the last entity of an open contour.
 
void exportLineSegment (void line, void angle)
 
void exportOpenContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Called for entities of an open contour.
 
void exportPoint (void point)
 
void exportSingleContourEntity (void entity, void rampOnPoint, void rampOffPoint)
 Called for single, isolated entities.
 
void fuzzyCompare (void v1, void v2)
 
void getCamLayerId ()
 Overwrite to create individual layers (e.g.
 
void getConfigName ()
 
void getContour (void entityId)
 Creates a new contour (Contour object) with the given entity and all connected entities.
 
void getCreateNewDocument ()
 
void getDocument ()
 
void getEllipseSegments ()
 Overwrite to specify number of segments to use for interpolating ellipses.
 
void getEntityOption (void entity, void name, void def)
 
void getFileExtensions ()
 
void getGlobalOption (void name, void def)
 
void getGlobalOptionFloat (void name, void def)
 
void getGlobalOptionInt (void name, void def)
 
void getIncrementalXYZ ()
 Overwrite to enable incremental X/Y/Z moves.
 
void getInnerBeforeOuter ()
 Overwrite to change inner to outer option.
 
void getLayerOption (void name, void def)
 
void getOperation ()
 
void getPathOptimization ()
 Overwrite to change path optimization.
 
void getPathOrientation ()
 Overwrite to change contour orientation.
 
void getRampOff ()
 Overwrite to change contour ramp off.
 
void getRampOn ()
 Overwrite to change contour ramp on.
 
void getSafetyZLevel ()
 Can be overwritten to return the current safety level (used at beginning and end).
 
void getScale ()
 Overwrite to change scale of output.
 
void getSplineSegments ()
 Overwrite to specify number of segments to use for interpolating splines.
 
void getSplitFullCircles ()
 Overwrite to change split circle behavior.
 
void getStartPosition ()
 
void getTolerance ()
 Overwrite to change tolerance (maximum gap between connected entities).
 
void getTool ()
 
void getToolDownLevel ()
 Can be overwritten to return the current cutting level.
 
void getToolUpLevel ()
 Can be overwritten to return the current clear level (used to move around without cutting).
 
void getUnit ()
 Overwrite to change unit of output.
 
void getUnitScale ()
 Overwrite to set fixed unit scale.
 
void initDialog (void d)
 
void initGlobalOptionWidget (void w)
 
void initLayerOptionWidget (void w)
 
void initLogFile (void fileName)
 Prepares the log file for debugging.
 
void log (void msg)
 
void logView (void fileName)
 
void notifyUser (void msg, void progressDialog)
 
void prependToContour (void contour)
 
void rapidMove (void p)
 
void setCamDocumentInterface (void camDocumentInterface)
 
void startExport ()
 
void toString ()
 
void write (void str)
 
void writeFooter ()
 
void writeHeader ()
 
void writeLine (void line)
 
void writeLinearMove (void x, void y)
 
void writeRampOff (void shape, void entity)
 
void writeRampOn (void shape, void entity)
 
void writeRapidLinearMove (void x, void y)
 
void writeToolUp ()
 

Public Attributes

int contourCounter
 
int contours
 
int cursor
 
int document
 
int documentInterface
 
int duringRapidMove
 
int ellipseSegments
 
int incrementalXYZ
 
int innerBeforeOuter
 
int logStream
 
int op
 
int pathOptimization
 
int pathOrientation
 
int rampOff
 
int rampOffFactor
 
int rampOn
 
int rampOnFactor
 
int scale
 
int splineSegments
 
int splitFullCircles
 
int stream
 
int tolerance
 
int traversed
 
int unit
 
int unitScale
 

Detailed Description

Implementation of a simple CAM exporter that implements the RFileExporter interface.

This is the base class for all CAM configuration classes.

Constructor & Destructor Documentation

◆ CamExporter()

void CamExporter::CamExporter ( void documentInterface,
void newDocumentInterface )
inline

Member Function Documentation

◆ appendToContour()

void CamExporter::appendToContour ( void contour,
void prepend )
inline

Appends / prepends entities to the given contour until no more connected entities can be found.

Parameters
contourContour object with the IDs of the entities in this contour.
prependBoolean true: prepend instead of append, false: append (default).

◆ closeLogFile()

void CamExporter::closeLogFile ( void fileName)
inline

◆ contourContains()

void CamExporter::contourContains ( void contour,
void point )
inline

Allow exporters to implement their own test if point is inside contour.

◆ convert()

void CamExporter::convert ( void v)
inline

Converts the given value v from the document unit into the output unit.

◆ createLayer()

void CamExporter::createLayer ( void layerName,
void color,
void linetype )
inline

◆ endExport()

void CamExporter::endExport ( )
inline

◆ exportArcSegment()

void CamExporter::exportArcSegment ( void arc,
void allowForZeroLength )
inline

◆ exportClosedContourEntity()

void CamExporter::exportClosedContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Called for entities of closed contours.

Default implementation calls exportContourEntity.

◆ exportContour()

void CamExporter::exportContour ( void contour,
void contourId,
void pos,
void siEntryPoints,
void progressDialog )
inline

Exports the given contour, starting at the the given position pos.

◆ exportContourEntity()

void CamExporter::exportContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Exports the given entity.

Parameters
entityEntity object or entity ID.
rampOnPointAlternative start point (cut from center).
rampOffPointAlternative end point (cut to center).

◆ exportEntities()

void CamExporter::exportEntities ( void allBlocks,
void undone )
inline

◆ exportFile()

void CamExporter::exportFile ( void fileName)
inline

◆ exportFirstClosedContourEntity()

void CamExporter::exportFirstClosedContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Called for the first entity of a closed contour.

Default implementation calls exportFirstContourEntity.

◆ exportFirstContourEntity()

void CamExporter::exportFirstContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Called for the first entity of open and closed contours.

Default implementation calls exportContourEntity.

◆ exportFirstOpenContourEntity()

void CamExporter::exportFirstOpenContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Called for the first entity of an open contour.

◆ exportLastClosedContourEntity()

void CamExporter::exportLastClosedContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Called for the last entity of a closed contour.

Default implementation calls exportLastContourEntity.

◆ exportLastContourEntity()

void CamExporter::exportLastContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Called for the last entity of open and closed contours.

Default implementation calls exportContourEntity.

◆ exportLastOpenContourEntity()

void CamExporter::exportLastOpenContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Called for the last entity of an open contour.

◆ exportLineSegment()

void CamExporter::exportLineSegment ( void line,
void angle )
inline

◆ exportOpenContourEntity()

void CamExporter::exportOpenContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Called for entities of an open contour.

Default implementation calls exportContourEntity.

◆ exportPoint()

void CamExporter::exportPoint ( void point)
inline

◆ exportSingleContourEntity()

void CamExporter::exportSingleContourEntity ( void entity,
void rampOnPoint,
void rampOffPoint )
inline

Called for single, isolated entities.

◆ fuzzyCompare()

void CamExporter::fuzzyCompare ( void v1,
void v2 )
inline

◆ getCamLayerId()

void CamExporter::getCamLayerId ( )
inline

Overwrite to create individual layers (e.g.

for Z-levels) on the fly.

◆ getConfigName()

void CamExporter::getConfigName ( )
inline

◆ getContour()

void CamExporter::getContour ( void entityId)
inline

Creates a new contour (Contour object) with the given entity and all connected entities.

◆ getCreateNewDocument()

void CamExporter::getCreateNewDocument ( )
inline

◆ getDocument()

void CamExporter::getDocument ( )
inline

◆ getEllipseSegments()

void CamExporter::getEllipseSegments ( )
inline

Overwrite to specify number of segments to use for interpolating ellipses.

◆ getEntityOption()

void CamExporter::getEntityOption ( void entity,
void name,
void def )
inline

◆ getFileExtensions()

void CamExporter::getFileExtensions ( )
inline

◆ getGlobalOption()

void CamExporter::getGlobalOption ( void name,
void def )
inline

◆ getGlobalOptionFloat()

void CamExporter::getGlobalOptionFloat ( void name,
void def )
inline

◆ getGlobalOptionInt()

void CamExporter::getGlobalOptionInt ( void name,
void def )
inline

◆ getIncrementalXYZ()

void CamExporter::getIncrementalXYZ ( )
inline

Overwrite to enable incremental X/Y/Z moves.

Default is false.

◆ getInnerBeforeOuter()

void CamExporter::getInnerBeforeOuter ( )
inline

Overwrite to change inner to outer option.

Default is false (inner paths may be cut after outer paths).

◆ getLayerOption()

void CamExporter::getLayerOption ( void name,
void def )
inline

◆ getOperation()

void CamExporter::getOperation ( )
inline

◆ getPathOptimization()

void CamExporter::getPathOptimization ( )
inline

Overwrite to change path optimization.

Default is true (optimize for shortest path).

◆ getPathOrientation()

void CamExporter::getPathOrientation ( )
inline

Overwrite to change contour orientation.

Default is any.

◆ getRampOff()

void CamExporter::getRampOff ( )
inline

Overwrite to change contour ramp off.

Default is -1 (no ramp off).

◆ getRampOn()

void CamExporter::getRampOn ( )
inline

Overwrite to change contour ramp on.

Default is -1 (no ramp on).

◆ getSafetyZLevel()

void CamExporter::getSafetyZLevel ( )
inline

Can be overwritten to return the current safety level (used at beginning and end).

◆ getScale()

void CamExporter::getScale ( )
inline

Overwrite to change scale of output.

Default is 1.

◆ getSplineSegments()

void CamExporter::getSplineSegments ( )
inline

Overwrite to specify number of segments to use for interpolating splines.

◆ getSplitFullCircles()

void CamExporter::getSplitFullCircles ( )
inline

Overwrite to change split circle behavior.

Return true to split full circles in two halves.

◆ getStartPosition()

void CamExporter::getStartPosition ( )
inline

◆ getTolerance()

void CamExporter::getTolerance ( )
inline

Overwrite to change tolerance (maximum gap between connected entities).

◆ getTool()

void CamExporter::getTool ( )
inline

◆ getToolDownLevel()

void CamExporter::getToolDownLevel ( )
inline

Can be overwritten to return the current cutting level.

◆ getToolUpLevel()

void CamExporter::getToolUpLevel ( )
inline

Can be overwritten to return the current clear level (used to move around without cutting).

◆ getUnit()

void CamExporter::getUnit ( )
inline

Overwrite to change unit of output.

Default is None (same as input).

◆ getUnitScale()

void CamExporter::getUnitScale ( )
inline

Overwrite to set fixed unit scale.

Default is undefined (use unit scale given by input and output unit).

◆ initDialog()

void CamExporter::initDialog ( void d)
inline

◆ initGlobalOptionWidget()

void CamExporter::initGlobalOptionWidget ( void w)
inline

◆ initLayerOptionWidget()

void CamExporter::initLayerOptionWidget ( void w)
inline

◆ initLogFile()

void CamExporter::initLogFile ( void fileName)
inline

Prepares the log file for debugging.

Name is the same as the given file but with extension .log.

◆ log()

void CamExporter::log ( void msg)
inline

◆ logView()

void CamExporter::logView ( void fileName)
inline

◆ notifyUser()

void CamExporter::notifyUser ( void msg,
void progressDialog )
inline

◆ prependToContour()

void CamExporter::prependToContour ( void contour)
inline

◆ rapidMove()

void CamExporter::rapidMove ( void p)
inline

◆ setCamDocumentInterface()

void CamExporter::setCamDocumentInterface ( void camDocumentInterface)
inline

◆ startExport()

void CamExporter::startExport ( )
inline

◆ toString()

void CamExporter::toString ( )
inline

◆ write()

void CamExporter::write ( void str)
inline

◆ writeFooter()

void CamExporter::writeFooter ( )
inline

◆ writeHeader()

void CamExporter::writeHeader ( )
inline

◆ writeLine()

void CamExporter::writeLine ( void line)
inline

◆ writeLinearMove()

void CamExporter::writeLinearMove ( void x,
void y )
inline

◆ writeRampOff()

void CamExporter::writeRampOff ( void shape,
void entity )
inline

◆ writeRampOn()

void CamExporter::writeRampOn ( void shape,
void entity )
inline

◆ writeRapidLinearMove()

void CamExporter::writeRapidLinearMove ( void x,
void y )
inline

◆ writeToolUp()

void CamExporter::writeToolUp ( )
inline

Member Data Documentation

◆ contourCounter

int CamExporter::contourCounter

◆ contours

int CamExporter::contours

◆ cursor

int CamExporter::cursor

◆ document

int CamExporter::document

◆ documentInterface

int CamExporter::documentInterface

◆ duringRapidMove

int CamExporter::duringRapidMove

◆ ellipseSegments

int CamExporter::ellipseSegments

◆ incrementalXYZ

int CamExporter::incrementalXYZ

◆ innerBeforeOuter

int CamExporter::innerBeforeOuter

◆ logStream

int CamExporter::logStream

◆ op

int CamExporter::op

◆ pathOptimization

int CamExporter::pathOptimization

◆ pathOrientation

int CamExporter::pathOrientation

◆ rampOff

int CamExporter::rampOff

◆ rampOffFactor

int CamExporter::rampOffFactor

◆ rampOn

int CamExporter::rampOn

◆ rampOnFactor

int CamExporter::rampOnFactor

◆ scale

int CamExporter::scale

◆ splineSegments

int CamExporter::splineSegments

◆ splitFullCircles

int CamExporter::splitFullCircles

◆ stream

int CamExporter::stream

◆ tolerance

int CamExporter::tolerance

◆ traversed

int CamExporter::traversed

◆ unit

int CamExporter::unit

◆ unitScale

int CamExporter::unitScale

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