Public Member Functions | Public Attributes | List of all members
PostProcessor Class Reference

Inherits ScriptObject.

Public Member Functions

 PostProcessor ()
 
MachineConfiguration getMachineConfiguration ()
 
 setMachineConfiguration (MachineConfiguration machine)
 
MoveLength getMultiAxisMoveLength (Number x, Number y, Number z, Number a, Number b, Number c)
 
 optimizeMachineAngles ()
 
 optimizeMachineAngles2 (Integer optimizeType)
 
 optimizeMachineAnglesByMachine (MachineConfiguration machine, Integer optimizeType)
 
Boolean isSectionSpecialCycle (String uri)
 
 setSectionSpecialCycle (String uri, Boolean specialCycle)
 
String getProduct ()
 
String getProductUri ()
 
String getProductUrl ()
 
String getVendor ()
 
String getVendorUrl ()
 
String getVersion ()
 
 openUrl (String url)
 
Boolean printDocument (String path)
 
Boolean printDocumentTo (String path, String printerName)
 
ToolRenderer createToolRenderer ()
 
Boolean invokeOnRapid (Number x, Number y, Number z)
 
Boolean invokeOnRapid5D (Number x, Number y, Number z, Number dx, Number dy, Number dz)
 
Boolean invokeOnLinear (Number x, Number y, Number z, Number feedrate)
 
Boolean invokeOnLinear5D (Number x, Number y, Number z, Number dx, Number dy, Number dz, Number feedrate)
 
Boolean invokeOnCircular (Boolean clockwise, Number cx, Number cy, Number cz, Number x, Number y, Number z, Number nx, Number ny, Number nz, Number feedrate)
 
VectorPair activatePolarMode (Number tolerance, Number currentAngle, Vector polarDirection)
 
 deactivatePolarMode ()
 
Boolean isPolarModeActive ()
 
VectorPair getPolarPosition (Number x, Number y, Number z)
 
 setCurrentPositionAndDirection (VectorPair posDir)
 
 setExitCode (Integer code)
 
 error (String message)
 
 warning (String message)
 
 warningOnce (String &message, Integer id)
 
 log (String message)
 
String getCurrentNCLocation ()
 
Integer getSystemUnit ()
 
String getPlatform ()
 
Boolean hasSymbol (Integer symbol)
 
Boolean isTextSupported (String text)
 
Integer getCodePage ()
 
 setCodePage (String name)
 
 write (String message)
 
 writeln (String message)
 
String getWordSeparator ()
 
 setWordSeparator (String message)
 
 writeWords (String message,...)
 
 writeWords2 (String message,...)
 
String formatWords (String message)
 
String subst (String message,...)
 
String getLangId ()
 
Boolean isSupportedText (String &message)
 
String localize (String message)
 
String localize2 (String section, String message)
 
Boolean loadLocale (String langId)
 
 include (String path)
 
String findFile (String path)
 
String getHeader ()
 
String getHeaderVersion ()
 
String getHeaderCommit ()
 
String getHeaderDate ()
 
Date getHeaderDate2 ()
 
String getHeaderSnippet (String keyword)
 
String getIntermediatePath ()
 
String getOutputPath ()
 
String getConfigurationFolder ()
 
String getConfigurationPath ()
 
String getPostProcessorFolder ()
 
String getPostProcessorPath ()
 
String getCascadingPath ()
 
 setCascadingPath (String)
 
Integer getSecurityLevel ()
 
 exportNCAs (String path, String format)
 
Integer execute (String path, String arguments, Boolean hide, String workingFolder)
 
 executeNoWait (String path, String arguments, Boolean hide, String workingFolder)
 
 setEOL (String eol)
 
Boolean isRedirecting ()
 
 closeRedirection ()
 
 redirectToFile (String path)
 
 redirectToBuffer ()
 
String getRedirectionBuffer ()
 
String getRedirectionBuffer2 (Boolean clear)
 
 registerPostProcessing (String path)
 
BoundingBox getWorkpiece ()
 
BoundingBox getFixture ()
 
String getMachineConfigurations ()
 
MachineConfiguration getMachineConfigurationByName (String name)
 
MachineConfiguration loadMachineConfiguration (String path)
 
Boolean isInteractionAllowed ()
 
 alert (String title, String description)
 
String promptKey (String title, String description)
 
String promptKey2 (String title, String description, String accept)
 
String promptKey3 (String title, String description, String accept, String keys)
 
String promptText (String title, String description)
 
Integer getAsInt (String text)
 
Number getAsFloat (String text)
 
Boolean isSafeText (String text, String permitted)
 
String filterText (String text, String keep)
 
String translateText (String text, String src, String dest)
 
String loadText (String url, String encoding)
 
Integer getOutputUnit ()
 
 setOutputUnit (Integer unit)
 
Boolean getDogLeg ()
 
 setDogLeg (Boolean dogLeg)
 
Matrix getRotation ()
 
 setRotation (Matrix rotation)
 
 cancelRotation ()
 
Vector getTranslation ()
 
 cancelTransformation ()
 
 setTranslation (Vector translation)
 
 cancelTranslation ()
 
Vector getFramePosition (Vector position)
 
Vector getFrameDirection (Vector direction)
 
Vector getSectionFramePosition (Vector framePosition)
 
Vector getSectionFrameDirection (Vector frameDirection)
 
Integer getHighFeedMapping ()
 
 setHighFeedMapping (Integer mode)
 
Number getHighFeedrate ()
 
 setHighFeedrate (Number feedrate)
 
Vector getGlobalPosition (Vector p)
 
Vector getWCSPosition (Vector p)
 
Vector getSectionPosition (Vector p)
 
Vector getCurrentGlobalPosition ()
 
Vector getCurrentPosition ()
 
 setCurrentPosition (Vector currentPosition)
 
 setCurrentPositionX (Number x)
 
 setCurrentPositionY (Number y)
 
 setCurrentPositionZ (Number z)
 
Vector getCurrentDirection ()
 
 setCurrentDirection (Vector currentDirection)
 
Number getCurrentSpindleSpeed ()
 
 setCurrentSpindleSpeed (Number spindleSpeed)
 
 setCurrentABC (Vector abc)
 
 skipRemainingSection ()
 
Boolean isClockwiseSpindleDirection ()
 
Boolean isSpindleActive ()
 
Boolean isCoolantActive ()
 
Boolean isProbeOperation ()
 
Boolean isInspectionOperation ()
 
Boolean isSpeedFeedSynchronizationActive ()
 
Boolean is3D ()
 
Boolean isMultiAxis ()
 
Boolean isMultiChannelProgram ()
 
Integer getNumberOfChannels ()
 
Integer getCurrentChannel ()
 
Integer getNumberOfSyncGroups (Integer channel)
 
Integer getCurrentSyncGroup ()
 
Integer getNumberOfRecords ()
 
Record getRecord (Integer id)
 
Integer getCurrentSectionId ()
 
Integer getNumberOfSections ()
 
Section getSection (Integer index)
 
Section getPreviousSection ()
 
Boolean hasNextSection ()
 
Section getNextSection ()
 
ToolTable getToolTable ()
 
 writeToolTable (Integer orderBy)
 
Integer getCurrentRecordId ()
 
Number getMachiningDistance (Integer tool)
 
Boolean isExpanding ()
 
Vector getEnd ()
 
Vector getDirection ()
 
Number getLength ()
 
Vector getCircularCenter ()
 
Number getCircularStartRadius ()
 
Number getCircularRadius ()
 
Number getCircularSweep ()
 
Number getCircularChordLength ()
 
Boolean isClockwise ()
 
Boolean isFullCircle ()
 
Boolean isHelical ()
 
Boolean isSpiral ()
 
Vector getCircularNormal ()
 
Integer getCircularPlane ()
 
Vector getHelicalOffset ()
 
Number getHelicalDistance ()
 
Number getHelicalPitch ()
 
Boolean canLinearize ()
 
 linearize (Number tolerance)
 
Integer getNumberOfSegments (Number tolerance)
 
Vector getPositionU (Number u)
 
CircularMotion getCircularMotion ()
 
Number getFeedrate ()
 
Integer getMovement ()
 
Boolean getPower ()
 
Number getSpindleSpeed ()
 
Boolean isSpindleSpeedDifferent ()
 
Integer getRadiusCompensation ()
 
Integer getCompensationOffset ()
 
Boolean hasPreviousRecord ()
 
Record getPreviousRecord ()
 
Boolean hasNextRecord ()
 
Record getNextRecord ()
 
Tool getFirstTool ()
 
 setWriteInvocations (Boolean writeInvocations)
 
 setWriteStack (Boolean writeStack)
 
 writeSectionNotes ()
 
 writeSetupNotes ()
 
Boolean isFirstCyclePoint ()
 
Boolean isLastCyclePoint ()
 
Integer getCyclePointId ()
 
Integer getNumberOfCyclePoints ()
 
Vector getCyclePoint (Integer index)
 
 onImpliedCommand (Integer command)
 
Boolean hasGlobalParameter (String name)
 
Value getGlobalParameter (String name, Value defaultValue)
 
Value getProperty (ScriptObject property, Integer sectionId)
 
Boolean hasParameter (String name)
 
Value getParameter (String name, Value defaultValue)
 
 registerTerminationHandler (Function function)
 
Number toDeg (Number radians)
 
Number toRad (Number degrees)
 
Number parseSpatial (String &value)
 
Integer getPlane (Vector direction)
 
Integer getISOPlane (Integer plane)
 
Boolean isSameDirection (a, b)
 
Array getSectionsInChannel (Number channel)
 
Boolean validatePropertyDefinitions ()
 
Boolean validateProperties ()
 
Integer getProgramNameAsInt (Integer min, Integer max)
 
String getProgramNameAsString (Integer charLimit)
 
Boolean isToolChangeNeeded ()
 
Tool getNextTool (Integer number)
 
Tool getNextTool ()
 
Boolean isNewWorkPlane (Section section)
 
Range toolZRange ()
 
Array range (Number first, Number end, Number step)
 
Array interval (Number from, Number to)
 
Array flatten (Array array)
 
Integer getQuadrant (Number angle)
 
String conditional (condition, value)
 
 validate (Value expression, String message)
 
 debug (String message)
 
Number spatial (Number value, Integer unit)
 
Number getInverseTime (Number distance, Number speed)
 
 cycleNotSupported ()
 
Boolean isWorkpieceDefined ()
 
Boolean isTurning ()
 
Boolean isMilling ()
 
Boolean isJet ()
 
Boolean isFirstSection ()
 
Boolean isLastSection ()
 
 onExpandedRapid (Number x, Number y, Number z)
 
 onExpandedLinear (Number x, Number y, Number z, Number feed)
 
 onExpandedSpindleSpeed (Number spindleSpeed)
 
MachineConfiguration createMachineConfiguration (Map specifiers)
 
String getMachineConfigurationAsText (MachineConfiguration machine)
 
Axis createAxis (Map specifiers)
 
FormatNumber createFormat (Map specifiers)
 
Variable createVariable (Map specifiers, Format format)
 
IncrementalVariable createIncrementalVariable (Map specifiers, Format format)
 
ReferenceVariable createReferenceVariable (Map specifiers, Format format)
 
Modal createModal (Map specifiers, Format format)
 
ModalGroup createModalGroup (Map specifiers, Array groups, Format format)
 
 repositionToCycleClearance (Map cycle, Number x, Number y, Number z)
 
 expandCyclePoint (Number x, Number y, Number z)
 
Boolean isWellKnownCycle ()
 
Boolean isProbingCycle (String uri)
 
Boolean isSubSpindleCycle (String uri)
 
Boolean isWellKnownCommand (Integer command)
 
String getCommandStringId (Integer command)
 
Boolean canIgnoreCommand (Integer command)
 
 onUnsupportedCommand (Integer command)
 
 expandManualNC (Integer command, Value value)
 
 onUnsupportedCoolant (Integer coolant)
 
String getCoolantName (Integer coolant)
 
String getMaterialName (Integer material)
 
String getToolTypeName (tool)
 
 onMachine ()
 
 onOpen ()
 
 onCycle ()
 
 onCyclePoint (Number x, Number y, Number z)
 
 onCyclePath ()
 
 onCyclePathEnd ()
 
 onCycleEnd ()
 
 onParameter (String name, Value value)
 
 onPassThrough (Value value)
 
 onComment (String comment)
 
 onRapid (Number x, Number y, Number z)
 
 onLinear (Number x, Number y, Number z, Number feed)
 
 onLinearExtrude (Number x, Number y, Number z, Number feed, Number extrusionLength)
 
 onCircular (Boolean clockwise, Number cx, Number cy, Number cz, Number x, Number y, Number z, Number feed)
 
 onCircularExtrude (Boolean clockwise, Number cx, Number cy, Number cz, Number x, Number y, Number z, Number feed, Number extrusionLength)
 
 onRapid5D (Number x, Number y, Number z, Number dx, Number dy, Number dz)
 
 onLinear5D (Number x, Number y, Number z, Number dx, Number dy, Number dz, Number feed)
 
 onRewindMachine (Number a, Number b, Number c)
 
 onRewindMachineEntry (Number a, Number b, Number c)
 
 onMoveToSafeRetractPosition ()
 
 onReturnFromSafeRetractPosition (Number x, Number y, Number z)
 
 onRotateAxes (Number x, Number y, Number z, Number a, Number b, Number c)
 
 onMovement (Integer movement)
 
 onPower (Boolean power)
 
 onRadiusCompensation ()
 
 onToolCompensation (Integer compensation)
 
 onDwell (Number time)
 
 onSpindleSpeed (Number spindleSpeed)
 
 onLayer (Number layerNumber)
 
 onExtrusionReset (Number length)
 
 onExtruderChange (Number extruderId)
 
 onExtruderTemp (Number temp, Boolean wait, Integer extruderId)
 
 onBedTemp (Number temp, Boolean wait)
 
 onFanSpeed (Number speed, Integer fanId)
 
 onCommand (Integer command)
 
 onOrientateSpindle (Number angle)
 
 onSectionEnd ()
 
 onClose ()
 

Public Attributes

Integer outputUnit
 
Section currentSection
 
Integer highFeedMapping
 
Number highFeedrate
 
Integer lineNumber
 
Vector initialCyclePosition
 
Boolean abortOnDeprecation
 
Vector end
 
Number length
 
Vector center
 The center of the current circular motion.
 
Vector normal
 The circular plane normal of the current circular motion.
 
Integer plane
 
Number radius
 The radius of the current circular motion.
 
Number sweep
 The sweep of the current circular motion.
 
Boolean clockwise
 Specifies that the current cicular motion is clockwise.
 
Number chordLength
 The chord length of the current circular motion (0 for full circles).
 
Boolean fullCircle
 Specifies that the currect circular motion is a full circle.
 
Boolean helical
 Specifies that the currect circular motion is helical.
 
Vector helicalOffset
 The helical offset for the current circular motion.
 
Number helicalDistance
 The helical distance for the currect circular motion.
 
Integer movement
 
Integer radiusCompensation
 
String description
 
String vendor
 
String vendorUrl
 
String legal
 
Integer unit
 
String programName
 
Boolean programNameIsInteger
 
Boolean debugMode
 
Boolean preventPost
 
String filename
 
String extension
 
String version
 
Integer certificationLevel
 
Integer revision
 
Integer minimumRevision
 
Boolean deprecated
 
Integer capabilities
 
Number tolerance
 
Boolean mapWorkOrigin
 
Boolean mapToWCS
 
Boolean allowMachineChangeOnSection
 
Number minimumChordLength
 
Number minimumCircularRadius
 
Number maximumCircularRadius
 
Number minimumCircularSweep
 
Number maximumCircularSweep
 
Boolean allowHelicalMoves
 
Boolean allowSpiralMoves
 
Integer allowedCircularPlanes
 
MachineParameters machineParameters
 
Map properties
 
String NUL
 NUL ASCII control code.
 
String SOH
 SOH ASCII control code.
 
String STX
 STX ASCII control code.
 
String ETX
 ETX ASCII control code.
 
String EOT
 EOT ASCII control code.
 
String ENQ
 ENQ ASCII control code.
 
String ACK
 ACK ASCII control code.
 
String BEL
 BEL ASCII control code.
 
String BS
 BS ASCII control code.
 
String TAB
 TAB ASCII control code.
 
String LF
 LF ASCII control code.
 
String VT
 VT ASCII control code.
 
String FF
 FF ASCII control code.
 
String CR
 CR ASCII control code.
 
String SO
 SO ASCII control code.
 
String SI
 SI ASCII control code.
 
String DLE
 DLE ASCII control code.
 
String DC1
 DC1 ASCII control code.
 
String DC2
 DC2 ASCII control code.
 
String DC3
 DC3 ASCII control code.
 
String DC4
 DC4 ASCII control code.
 
String NAK
 NAK ASCII control code.
 
String SYN
 SYN ASCII control code.
 
String ETB
 ETB ASCII control code.
 
String CAN
 CAN ASCII control code.
 
String EM
 EM ASCII control code.
 
String SUB
 SUB ASCII control code.
 
String ESC
 ESC ASCII control code.
 
String FS
 FS ASCII control code.
 
String GS
 GS ASCII control code.
 
String RS
 RS ASCII control code.
 
String US
 US ASCII control code.
 
String EOL
 The default end-of-line marker.
 
String SP
 Space string.
 
String PATH_SEPARATOR
 File path separator.
 
Integer IN
 Inch unit.
 
Integer MM
 Millimeters unit.
 
Integer PLANE_XY
 Circular XY plane.
 
Integer PLANE_XZ
 Circular XZ plane. Deprecated use PLANE_ZX instead.
 
Integer PLANE_ZX
 Circular ZX plane.
 
Integer PLANE_YZ
 Circular YZ plane.
 
Integer X
 X coordinate index.
 
Integer Y
 Y coordinate index.
 
Integer Z
 Z coordinate index.
 
Integer TOOL_AXIS_X
 YZ-plane.
 
Integer TOOL_AXIS_Y
 ZX-plane.
 
Integer TOOL_AXIS_Z
 XY-plane.
 
Integer RADIUS_COMPENSATION_OFF
 Center radius compensation.
 
Integer RADIUS_COMPENSATION_LEFT
 Left radius compensation.
 
Integer RADIUS_COMPENSATION_RIGHT
 Right radius compensation.
 
Integer SINGULARITY_LINEARIZE_OFF
 Don't linearize moves around multi-axis singularities. More...
 
Integer SINGULARITY_LINEARIZE_LINEAR
 
Integer SINGULARITY_LINEARIZE_ROTARY
 Keep rotary axes in line during multi-axis singularity linearization. More...
 
Integer COOLANT_DISABLED
 Coolant disabled.
 
Integer COOLANT_FLOOD
 Flood coolant mode.
 
Integer COOLANT_MIST
 Mist coolant mode.
 
Integer COOLANT_TOOL
 Coolant through tool mode. Deprecated use COOLANT_THROUGH_TOOL instead.
 
Integer COOLANT_THROUGH_TOOL
 Coolant through tool mode.
 
Integer COOLANT_AIR
 Air mode.
 
Integer COOLANT_AIR_THROUGH_TOOL
 Air through tool mode.
 
Integer COOLANT_SUCTION
 Suction mode.
 
Integer COOLANT_FLOOD_MIST
 Flood and mist coolant mode.
 
Integer COOLANT_FLOOD_THROUGH_TOOL
 Flood and through tool coolant mode.
 
Integer MATERIAL_UNSPECIFIED
 Unspecified material.
 
Integer MATERIAL_HSS
 High-speed steel material.
 
Integer MATERIAL_TI_COATED
 TI coated material.
 
Integer MATERIAL_CARBIDE
 Carbide material.
 
Integer MATERIAL_CERAMICS
 Ceramics material.
 
Integer TOOL_UNSPECIFIED
 Unspecified tool.
 
Integer TOOL_DRILL
 Drill.
 
Integer TOOL_DRILL_CENTER
 Center drill.
 
Integer TOOL_DRILL_SPOT
 Spot drill.
 
Integer TOOL_DRILL_BLOCK
 Block drill.
 
Integer TOOL_MILLING_END_FLAT
 Flat end-mill.
 
Integer TOOL_MILLING_END_BALL
 Ball end-mill.
 
Integer TOOL_MILLING_END_BULLNOSE
 Bullnose mill.
 
Integer TOOL_MILLING_CHAMFER
 Chamfer mill.
 
Integer TOOL_MILLING_FACE
 Face mill.
 
Integer TOOL_MILLING_SLOT
 Slot mill.
 
Integer TOOL_MILLING_RADIUS
 Radius mill.
 
Integer TOOL_MILLING_DOVETAIL
 Dovetail mill.
 
Integer TOOL_MILLING_TAPERED
 Tapered mill.
 
Integer TOOL_MILLING_LOLLIPOP
 Lollipop mill.
 
Integer TOOL_TAP_RIGHT_HAND
 Right tap tool.
 
Integer TOOL_TAP_LEFT_HAND
 Left tap tool.
 
Integer TOOL_REAMER
 Reamer tool.
 
Integer TOOL_BORING_BAR
 Boring bar tool.
 
Integer TOOL_COUNTER_BORE
 Counterbore tool.
 
Integer TOOL_COUNTER_SINK
 Countersink tool.
 
Integer TOOL_HOLDER_ONLY
 Holder.
 
Integer TOOL_TURNING_GENERAL
 General turning tool.
 
Integer TOOL_TURNING_THREADING
 Thread turning tool.
 
Integer TOOL_TURNING_GROOVING
 Groove turning tool.
 
Integer TOOL_TURNING_BORING
 Boring turning tool.
 
Integer TOOL_TURNING_CUSTOM
 Custom turning tool.
 
Integer TOOL_PROBE
 Probe.
 
Integer TOOL_WIRE
 Wire.
 
Integer TOOL_WATER_JET
 Water jet.
 
Integer TOOL_LASER_CUTTER
 Laser cutter.
 
Integer TOOL_WELDER
 Welder.
 
Integer TOOL_GRINDER
 Grinder.
 
Integer TOOL_MILLING_FORM
 Form mill.
 
Integer TOOL_PLASMA_CUTTER
 Plasma cutter.
 
Integer TOOL_MARKER
 Marker tool.
 
Integer TOOL_MILLING_THREAD
 Thread mill.
 
Integer TOOL_COMPENSATION_INSERT_CENTER
 Turning tool compensation.
 
Integer TOOL_COMPENSATION_TIP
 Turning tool compensation.
 
Integer TOOL_COMPENSATION_TIP_CENTER
 Turning tool compensation.
 
Integer TOOL_COMPENSATION_TIP_TANGENT
 Turning tool compensation.
 
Integer HAS_PARAMETER
 Has parameter flag.
 
Integer HAS_RAPID
 Has rapid flag.
 
Integer HAS_LINEAR
 Has linear flag.
 
Integer HAS_DWELL
 Has dwell flag.
 
Integer HAS_CIRCULAR
 Has circular flag.
 
Integer HAS_CYCLE
 Has cycle flag.
 
Integer HAS_WELL_KNOWN_COMMAND
 Has well-known command flag.
 
Integer HAS_COMMENT
 Has comment flag.
 
Integer RECORD_INVALID
 Invalid record type.
 
Integer RECORD_WELL_KNOWN_COMMAND
 Well-known command.
 
Integer RECORD_PARAMETER
 Parameter.
 
Integer RECORD_LINEAR
 Linear motion.
 
Integer RECORD_LINEAR_5D
 Linear 5-axis motion.
 
Integer RECORD_LINEAR_ZXN
 Linear 5-axis motion.
 
Integer RECORD_LINEAR_EXTRUDE
 Linear motion with extrude.
 
Integer RECORD_CIRCULAR
 Circular motion.
 
Integer RECORD_DWELL
 Dwell.
 
Integer RECORD_CYCLE
 Cycle.
 
Integer RECORD_CYCLE_OFF
 End of cycle.
 
Integer RECORD_COMMENT
 Comment.
 
Integer RECORD_WIDE_COMMENT
 Comment.
 
Integer RECORD_CIRCULAR_EXTRUDE
 Circular motion with extrude.
 
Integer COMMAND_INVALID
 Invalid (well-known command).
 
Integer COMMAND_STOP
 Program stop (well-known command M00).
 
Integer COMMAND_OPTIONAL_STOP
 Optional program stop (well-known command M01).
 
Integer COMMAND_END
 Program end (well-known command M02).
 
Integer COMMAND_SPINDLE_CLOCKWISE
 Clockwise spindle direction (well-known command M03).
 
Integer COMMAND_SPINDLE_COUNTERCLOCKWISE
 Counterclockwise spidle direction (well-known command M04).
 
Integer COMMAND_START_SPINDLE
 
Integer COMMAND_STOP_SPINDLE
 Spindle stop (well-known command M05).
 
Integer COMMAND_ORIENTATE_SPINDLE
 
Integer COMMAND_LOAD_TOOL
 Tool change (M06).
 
Integer COMMAND_COOLANT_ON
 Coolant on (M08).
 
Integer COMMAND_COOLANT_OFF
 Coolant off (M09).
 
Integer COMMAND_ACTIVATE_SPEED_FEED_SYNCHRONIZATION
 Activate speed-feed synchronization (well-known command).
 
Integer COMMAND_DEACTIVATE_SPEED_FEED_SYNCHRONIZATION
 Deactivate speed-feed synchronization (well-known command).
 
Integer COMMAND_LOCK_MULTI_AXIS
 Locks the 4th and 5th axes. This command is optional.
 
Integer COMMAND_UNLOCK_MULTI_AXIS
 Unlocks the 4th and 5th axes. This command is optional.
 
Integer COMMAND_EXACT_STOP
 Exact stop. This command is optional.
 
Integer COMMAND_START_CHIP_TRANSPORT
 Close chip transport.
 
Integer COMMAND_STOP_CHIP_TRANSPORT
 Stop chip transport.
 
Integer COMMAND_OPEN_DOOR
 Open primary door.
 
Integer COMMAND_CLOSE_DOOR
 Close primary door.
 
Integer COMMAND_BREAK_CONTROL
 Break control.
 
Integer COMMAND_TOOL_MEASURE
 Measure tool.
 
Integer COMMAND_CALIBRATE
 Run calibration cycle.
 
Integer COMMAND_VERIFY
 Verify part/tool/machine integrity.
 
Integer COMMAND_CLEAN
 Run cleaning cycle.
 
Integer COMMAND_ALARM
 Alarm.
 
Integer COMMAND_ALERT
 Alert.
 
Integer COMMAND_CHANGE_PALLET
 Change pallet.
 
Integer COMMAND_POWER_ON
 Power on.
 
Integer COMMAND_POWER_OFF
 Power off.
 
Integer COMMAND_MAIN_CHUCK_OPEN
 Open main chuck. More...
 
Integer COMMAND_MAIN_CHUCK_CLOSE
 Close main chuck. More...
 
Integer COMMAND_SECONDARY_CHUCK_OPEN
 Open secondary chuck. More...
 
Integer COMMAND_SECONDARY_CHUCK_CLOSE
 Close secondary chuck. More...
 
Integer COMMAND_SECONDARY_SPINDLE_SYNCHRONIZATION_ACTIVATE
 Activate spindle synchronization. More...
 
Integer COMMAND_SECONDARY_SPINDLE_SYNCHRONIZATION_DEACTIVATE
 Deactivate spindle synchronization. More...
 
Integer COMMAND_SYNC_CHANNELS
 Sync channels.
 
Integer COMMAND_PROBE_ON
 Probe on.
 
Integer COMMAND_PROBE_OFF
 Probe off.
 
Integer MOVEMENT_RAPID
 Rapid movement type.
 
Integer MOVEMENT_LEAD_IN
 Lead-in movement type.
 
Integer MOVEMENT_CUTTING
 Cutting movement type.
 
Integer MOVEMENT_LEAD_OUT
 Lead-out movement type.
 
Integer MOVEMENT_LINK_TRANSITION
 Transition linking movement type.
 
Integer MOVEMENT_LINK_DIRECT
 Drection linking movement type.
 
Integer MOVEMENT_RAMP_HELIX
 Helical ramp movement type.
 
Integer MOVEMENT_RAMP_PROFILE
 Profile ramp movement type.
 
Integer MOVEMENT_RAMP_ZIG_ZAG
 Zig-zag ramp movement type.
 
Integer MOVEMENT_RAMP
 Ramp movement type.
 
Integer MOVEMENT_PLUNGE
 Plunge movement type.
 
Integer MOVEMENT_PREDRILL
 Predrill movement type.
 
Integer MOVEMENT_EXTENDED
 Extended movement type.
 
Integer MOVEMENT_REDUCED
 Reduced cutting feed movement type.
 
Integer MOVEMENT_FINISH_CUTTING
 Finish cutting movement type.
 
Integer MOVEMENT_HIGH_FEED
 High feed movement type.
 
Integer HIGH_FEED_NO_MAPPING
 Do not map rapid travesal to high feed.
 
Integer HIGH_FEED_MAP_MULTI
 Map rapid travesal along more than one axis to high feed.
 
Integer HIGH_FEED_MAP_XY_Z
 
Integer HIGH_FEED_MAP_ANY
 Map all rapid travesals to high feed.
 
Tool tool
 
Integer spindleAxis
 
Number feedrate
 
Number spindleSpeed
 
MachineConfiguration machineConfiguration
 
String cycleType
 
Map cycle
 
Boolean cycleExpanded
 

Detailed Description

Post processor object. This is the main class. The post processor automatically instantiates an instance of this class at startup and makes it the global object for the posting context.

Constructor & Destructor Documentation

◆ PostProcessor()

Constructs a post processor object.

Member Function Documentation

◆ activatePolarMode()

VectorPair activatePolarMode ( Number  tolerance,
Number  currentAngle,
Vector  polarDirection 
)

Call to activate and setup Polar Mode.

Parameters
toleranceThe tolerance to linearize to.
currentAngleThe current angle of the machine axis's that is perpendicular to the tool
polarDirectionA vector representing the line which the tool can move along to cut the part. (1, 0, 0) would be the x axis.
Returns
Returns the polar transformed initial position and direction as a pair of vectors.
var x_axis = new Vector(1, 0, 0);
var posDir = activatePolarMode(0.01, cOutput.getCurrent(), x_axis);
var x = posDir.first.x;
var y = posDir.first.y;
var z = posDir.first.z;
var a = posDir.second.x;
var b = posDir.second.y;
var c = posDir.second.z;
Since
r45636

◆ alert()

alert ( String  title,
String  description 
)

Alerts the user and wait for user.

Parameters
titleThe title.
descriptionThe description.

◆ cancelRotation()

cancelRotation ( )

Cancels any active output frame rotation defined by setRotation().

Since
r42292

◆ cancelTransformation()

cancelTransformation ( )

Cancels any active output frame transformation defined by setRotation() and setTranslation().

◆ cancelTranslation()

cancelTranslation ( )

Cancels any active output frame translation defined by setTranslation().

Since
r42292

◆ canIgnoreCommand()

Boolean canIgnoreCommand ( Integer  command)

Returns true if the specified command can be safely ignored in normal cases.

◆ canLinearize()

Boolean canLinearize ( )

Returns true if the current record can be linearized using getPositionU(). Only circular records can currently be linearized.

◆ closeRedirection()

closeRedirection ( )

Closes any redirection and switches to normal output. If redirection to buffer is active the buffer is cleared.

◆ conditional()

String conditional ( condition  ,
value   
)

Returns the specified value if the condition is true and otherwise the empty string.

◆ createAxis()

Axis createAxis ( Map  specifiers)

Constructs a new machine axis.

The supported specifiers are:

  1. actuator: Specifies that the actuator type (ie. either "linear" or "rotational"). The default is "rotational".
  2. table: Specifies that the axis is located in the table or the head. The default is true for table.
  3. axis: Specifies the axis vector as a 3-element array (e.g. "[0, 0, 1]"). This specifier is required.
  4. homePosition: Specifies the axis home position. The default is 0.
  5. offset: Specifies the axis offset as a 3-element array (e.g. "[0, 0, 25]"). The default is [0, 0, 0].
  6. coordinate: Specifies the coordinate used in the ABC vectors (ie. "X", "Y", or "Z"). This specifier is required.
  7. cyclic: Specifies that the axis is cyclic. Only supported for rotational axes. Only used when a range is specified. The default is false.
  8. tcp: Specifies that the axis supports TCP. Only supported for rotational axes. The default is true.
  9. range: Specifies the angular range for the axis in degrees as a 2-element array (e.g. "[-120, 120]"). You can also specify a single number to create an axis for an aggregate. The default is unbound.
  10. preference: Specifies the preferred angles (-1:negative angles, 0:don't care, and 1:positive angles). The default is don't care.
  11. resolution: Specifies the resolution. In degrees for rotational actuator. The default is 0.
  12. maximumFeed: Specifies the maximum feed rate. The default is 0.
  13. rapidFeed: Specifies the rapid feed rate. The default is 0.
  14. reset: Resets the initial axis position to 0 (0:remember position from previous section, 1:reset at start of operation, 2:reset after automatic rewind, 3:reset for both situations). The default is remember position. Since r42226
Parameters
specifiersThe axis specifiers.
var bAxis = createAxis({coordinate:1, table:true, axis:[0, 1, 0], range:[-120,120],
preference:1}); var cAxis = createAxis({coordinate:2, table:true, axis:[0, 0, 1],
range:[-999.999,999.999]}, reset:1);

◆ createFormat()

FormatNumber createFormat ( Map  specifiers)

Constructs the format specification for the given values. See createFormat().

Parameters
specifiersThe format specifiers.

The supported specifiers are:

  1. decimals: Specifies the number of decimals. Defaults to 6.
  2. trim: Specifies that ending zero decimals should be trimmed. Defaults to true.
  3. trimLeadZero: Specifies that the leading zero should be excluded. Eg. ".123" instead of "0.123". Defaults to false.
  4. forceSign: Specifies that the '+'-sign must be included for positive numbers. Defaults to false.
  5. forceDecimal: Specifies that the decimal symbol must be included. Defaults to false.
  6. zeropad: Specifies that zeros should be padded to the resulting string to fit the given width. Defaults to false.
  7. width: Specifies the width of the resulting string. Defaults to 0.
  8. separator: Specifies the decimal symbol. Defaults to '.'.
  9. cyclicLimit: Specifies the cyclic limit. Defaults to 0 (disabled).
  10. cyclicSign: Specifies the cyclic sign. Defaults to 0.
  11. scale: Specifies the scale. Defaults to 1.
  12. offset: Specifies the offset. Defaults to 0.
  13. prefix: Specifies the prefix. Defaults to empty string.
  14. suffix: Specifies the suffix. Defaults to empty string.
  15. inherit: Specifies the format to inherit.
var xFormat = createFormat({decimals:3, trim:false, forceSign:true});
xFormat.format(4.5); // returns "+4.500"
var yFormat = createFormat({decimals:3, forceSign:true});
yFormat.format(4.5); // returns "+4.5"
var toolFormat = createFormat({decimals:0, zeropad:true, width:2});
toolFormat.format(7); // returns "07"
var aFormat = createFormat({decimals:3, forceSign:true, forceDecimal:true, scale:DEG});
aFormat.format(Math.Pi); // returns "+180."

◆ createIncrementalVariable()

IncrementalVariable createIncrementalVariable ( Map  specifiers,
Format  format 
)

Creates a new IncrementalVariable instance.

The supported specifiers are:

Parameters
specifiersThe specifiers.
formatThe desired format.
  1. prefix: Specifies a prefix to be prepended the formatted value.
  2. force: Specifies that the value always must be output.
  3. first: Specifies the first value to be output. The default is 0.

◆ createMachineConfiguration()

MachineConfiguration createMachineConfiguration ( Map  specifiers)

Constructs a new machine configuration.

The supported specifiers are:

  1. model: Specifies the machine model.
  2. description: Describes the machine configuration.
  3. vendor: Specifies the machine vendor.
  4. vendorUrl: Specifies the machine vendor link.
  5. width: Specifies the width of the machine.
  6. depth: Specifies the depth of the machine.
  7. height: Specifies the height of the machine.
  8. weight: Specifies the weight of the machine.
  9. weightCapacity: Specifies the weight capacity of the machine.
  10. spindleAxis: Specifies the spindle axis.
  11. maximumSpindlePower: Specifies the maximum spindle power.
  12. maximumSpindleSpeed: Specifies the maximum spindle speed.
  13. collectChuck: Specifies the collect chuck. Tool-holder interface.
  14. x: Specifies the X axis.
  15. y: Specifies the Y axis.
  16. z: Specifies the Z axis.
  17. u: Specifies the U axis.
  18. v: Specifies the V axis.
  19. w: Specifies the W axis.
Parameters
specifiersThe specifiers.

◆ createModal()

Modal createModal ( Map  specifiers,
Format  format 
)

Creates a new Modal instance.

Parameters
specifiersThe format specifiers.
formatThe desired format (optional).

The supported specifiers are:

  1. prefix: Specifies the prefix.
  2. suffix: Specifies the suffix.
  3. force: Specifies that the value must always be returned.
  4. onchange: Specifies a method to be invoked when format() results in output.

◆ createModalGroup()

ModalGroup createModalGroup ( Map  specifiers,
Array  groups,
Format  format 
)

Creates a new ModalGroup instance.

The supported specifiers are:

  1. force: Specifies that output is forced. The default is false.
  2. strict: Specifies the strict mode. The default is true.
Parameters
specifiersThe specifiers.
groupsThe code groups (e.g. [[1, 2, 3, 4], [17, 18, 19]]).
formatThe format.

◆ createReferenceVariable()

ReferenceVariable createReferenceVariable ( Map  specifiers,
Format  format 
)

Creates a new ReferenceVariable instance.

The supported specifiers are:

Parameters
specifiersThe behavior specifiers.
formatThe instance of type Format used to format the output values.

The supported specifiers are:

  1. prefix: Specifies a prefix to be prepended the formatted value.
  2. force: Specifies that the value always must be output.

◆ createToolRenderer()

ToolRenderer createToolRenderer ( )

Returns a new tool renderer.

◆ createVariable()

Variable createVariable ( Map  specifiers,
Format  format 
)

Creates a new Variable instance.

Parameters
specifiersThe specifiers.
formatThe desired format.

The supported specifiers are:

  1. prefix: Specifies a prefix to be prepended the formatted value.
  2. force: Specifies that the value always must be output.
  3. onchange: Specifies a method to be invoked when format() results in output.

◆ cycleNotSupported()

cycleNotSupported ( )

Returns an error message if the current cycle is not supported.

◆ deactivatePolarMode()

deactivatePolarMode ( )

Call to deactivate Polar Mode. This should be called in onSectionEnd() if activePolarMode has been called in onSection().

Since
r45636

◆ debug()

debug ( String  message)

Writes the specified debug message to the log if debugging mode is enabled (i.e. debugMode is true).

Multiple arguments are allowed

Since
r41291 where the arguments will be concatenated using formatWords().

◆ error()

error ( String  message)

Writes an error message and aborts the script.

◆ execute()

Integer execute ( String  path,
String  arguments,
Boolean  hide,
String  workingFolder 
)

Runs the specified command. Note that you cannot open the primary output file until the onTerminate() is invoked. Post processor waits for the program to complete.

Security: Requires security level 0.

Parameters
pathThe path of the command.
argumentsThe arguments to be parsed to the command.
hideHide application.
workingFolderThe working folder.
Returns
Returns the exit code for the command.

Security: Requires security level 0.

◆ executeNoWait()

executeNoWait ( String  path,
String  arguments,
Boolean  hide,
String  workingFolder 
)

Runs the specified command. Same as execute() but doesn't wait for application to complete.

Security: Requires security level 0.

Parameters
pathThe path of the command.
argumentsThe arguments to be parsed to the command.
hideHide application.
workingFolderThe working folder.

Security: Requires security level 0.

◆ expandCyclePoint()

expandCyclePoint ( Number  x,
Number  y,
Number  z 
)

May be invoked in cycle mode to expand a well-known cycle. Used when a specific cycle is not supported by a control.

Parameters
xThe X coordiante of the cycle point.
yThe Y coordiante of the cycle point.
zThe Z coordiante of the cycle point.

◆ expandManualNC()

expandManualNC ( Integer  command,
Value  value 
)

Processes Manual NC commands that are not handled in onManualNC.

Parameters
commandThe Manual NC command.
valueThe value.
Since
42292

◆ exportNCAs()

exportNCAs ( String  path,
String  format 
)

Exports the toolpath data to the given file.

Security: Requires security level 0.

Parameters
pathThe destination path.
formatThe file format.

◆ filterText()

String filterText ( String  text,
String  keep 
)

Returns a new string with all characters not present in keep removed.

Parameters
textThe original text.
keepThe characters to be preserved in the string.

◆ findFile()

String findFile ( String  path)

Returns the full path for the specified relative path if found in the include paths.

Parameters
paththe relative path.

◆ flatten()

Array flatten ( Array  array)

Flattens the specified array.

Parameters
arrayThe array to flatten.
flatten([1, 2, 3, [4, 5, [6]]]); // returns [1, 2, 3, 4, 5, 6]

◆ formatWords()

String formatWords ( String  message)

Returns the string output by writeWords() without end-of-line.

◆ getAsFloat()

Number getAsFloat ( String  text)

Converts the specified text to a float. Raises an exception if all the specified text cannot be converted.

Parameters
textThe text to be converted.

◆ getAsInt()

Integer getAsInt ( String  text)

Converts the specified text to an integer. Raises an exception if all the specified text cannot be converted.

Parameters
textThe text to be converted.

◆ getCascadingPath()

String getCascadingPath ( )

Returns the cascading path set by the previous post. By default this will be the getOutputPath().

Since
41546

◆ getCircularCenter()

Vector getCircularCenter ( )

Returns the center for the current circular motion. Returns an unspecified value if the current motion is not circular.

◆ getCircularChordLength()

Number getCircularChordLength ( )

Returns the chord length for the current circular motion. Returns an unspecified value if the current motion is not circular. Returns 0 for full circular motion.

◆ getCircularMotion()

CircularMotion getCircularMotion ( )

Returns the circular motion description for the current circular record.

◆ getCircularNormal()

Vector getCircularNormal ( )

The CCW-normal of the circular plane. However, the normal is flipped if isClockwise() is true. This behavior ensures direct compatibility with RS274 for the right hand G17, G18, and G19 plane convention.

if (clockwise) {
n = Vector.product(n, -1);
}

◆ getCircularPlane()

Integer getCircularPlane ( )

Returns the circular plane. Returns -1 is the plane is not in a primary plane.

◆ getCircularRadius()

Number getCircularRadius ( )

Returns the end radius for the current circular motion. Returns an unspecified value if the current motion is not circular.

◆ getCircularStartRadius()

Number getCircularStartRadius ( )

Returns the start radius for the current circular motion. Returns an unspecified value if the current motion is not circular. The start radius can only be different from the end radius returned by getCircularRadius() for spiral motion.

◆ getCircularSweep()

Number getCircularSweep ( )

Returns the sweep for the current circular motion. Returns an unspecified value if the current motion is not circular.

◆ getCodePage()

Integer getCodePage ( )

Returns the current output code page id.

◆ getCommandStringId()

String getCommandStringId ( Integer  command)

Returns the string id for the specified command.

◆ getCompensationOffset()

Integer getCompensationOffset ( )

Returns the current compensation offset.

◆ getConfigurationFolder()

String getConfigurationFolder ( )

Returns the path on the configuration folder.

◆ getConfigurationPath()

String getConfigurationPath ( )

Returns the path on the configuration file.

◆ getCoolantName()

String getCoolantName ( Integer  coolant)

Returns the specified coolant as a string.

◆ getCurrentChannel()

Integer getCurrentChannel ( )

Returns the id for the current channel.

Since
r42045

◆ getCurrentDirection()

Vector getCurrentDirection ( )

Returns the current direction.

◆ getCurrentGlobalPosition()

Vector getCurrentGlobalPosition ( )

Returns the current position in the global coordinate system.

◆ getCurrentNCLocation()

String getCurrentNCLocation ( )

Returns a description of the current NC location.

◆ getCurrentPosition()

Vector getCurrentPosition ( )

Returns the current position.

◆ getCurrentRecordId()

Integer getCurrentRecordId ( )

Returns the id of the current record.

◆ getCurrentSectionId()

Integer getCurrentSectionId ( )

Returns the id of the current section. Returns -1 is no section is active.

◆ getCurrentSpindleSpeed()

Number getCurrentSpindleSpeed ( )

Returns the current spindle speed.

Since
r42066

◆ getCurrentSyncGroup()

Integer getCurrentSyncGroup ( )

Returns the multi-channel sync group for the current channel. Starting from 0.

Since
r42045

◆ getCyclePoint()

Vector getCyclePoint ( Integer  index)

Returns the specified cycle point for the current cycle.

Parameters
indexThe index of the point. Must be less than the value returned by getNumberOfCyclePoints().
Since
r19569

◆ getCyclePointId()

Integer getCyclePointId ( )

Returns the id of the current cycle point. Returns 0 if cycle is not active.

Since
r19569

◆ getDirection()

Vector getDirection ( )

Returns the direction for the current motion.

◆ getDogLeg()

Boolean getDogLeg ( )

Returns the dog-leg flag. The default is false.

◆ getEnd()

Vector getEnd ( )

Returns the end position for the current motion.

◆ getFeedrate()

Number getFeedrate ( )

Returns the current feedrate.

◆ getFirstTool()

Tool getFirstTool ( )

Returns the first tool.

◆ getFixture()

BoundingBox getFixture ( )

Returns the fixture bounding box.

Since
r40294

◆ getFrameDirection()

Vector getFrameDirection ( Vector  direction)

Returns the specified section direction in the current frame specified using setRotation().

◆ getFramePosition()

Vector getFramePosition ( Vector  position)

Returns the specified section position in the current frame specified using setRotation() and setTranslation().

◆ getGlobalParameter()

Value getGlobalParameter ( String  name,
Value  defaultValue 
)

Returns the first value of the specified global parameter.

Parameters
nameThe name of the parameter to return
defaultValue(optional, since r45606) The default value of the parameter to return if it is not defined.

e.g.

if (hasGlobalParameter("document-path")) {
if (filename) {
writeln("(" + filename + ")");
}
}
Since
r16737

◆ getGlobalPosition()

Vector getGlobalPosition ( Vector  p)

Returns the specified position in the current section as the corresponding global position.

◆ getHeader()

String getHeader ( )

Returns the header of the post configuration where header is the first multi-line comment.

Since
r41192

◆ getHeaderCommit()

String getHeaderCommit ( )

Returns the commit from the header of the post configuration. Where commit is the second string within the

Revision
...

. Returns empty string if not found.

Since
r41192

◆ getHeaderDate()

String getHeaderDate ( )

Returns the modification date as string from the header of the post configuration. Where date is the string within the Date: ... $. Returns empty string if not found.

Since
r41192

◆ getHeaderDate2()

Date getHeaderDate2 ( )

Returns the modification date as Date from the header of the post configuration. Where date is the string within the Date: ... $. Returns undefined if not found.

Since
r41192

◆ getHeaderSnippet()

String getHeaderSnippet ( String  keyword)

Returns the string following the given keyword from the header of the post configuration. Returns empty string if not found.

Parameters
keywordThe keyword to look for. The keyword must match this regular expression [a-zA-Z][a-zA-Z0-9_]*.
Since
r41192

◆ getHeaderVersion()

String getHeaderVersion ( )

Returns the version from the header of the post configuration. Where version is the first string within the

Revision
...

. Returns empty string if not found.

Since
r41192

◆ getHelicalDistance()

Number getHelicalDistance ( )

Returns the helical distance of the current circular motion. Returns 0 for non-helical motion. Returns an unspecified value if the current motion is not circular.

◆ getHelicalOffset()

Vector getHelicalOffset ( )

Returns the helical offset of the current circular motion. Returns (0, 0, 0) for non-helical motion. Returns an unspecified value if the current motion is not circular.

◆ getHelicalPitch()

Number getHelicalPitch ( )

Returns the helical pitch of the current circular motion. Returns 0 for non-helical motion. Returns an unspecified value if the current motion is not circular.

◆ getHighFeedMapping()

Integer getHighFeedMapping ( )

Returns the high feed rapid traversal mapping mode.

◆ getHighFeedrate()

Number getHighFeedrate ( )

Returns the high feedrate used for mapping rapid traversal.

◆ getIntermediatePath()

String getIntermediatePath ( )

Returns the path on the intermediate file.

Since
r37310

◆ getInverseTime()

Number getInverseTime ( Number  distance,
Number  speed 
)

Returns the inverse time (F).

◆ getISOPlane()

Integer getISOPlane ( Integer  plane)

Returns the standard G-code plane number (17, 18, or 19).

PLANE_XY: 17 PLANE_ZX: 18 PLANE_YZ: 19

Returns 0 for all other planes.

◆ getLangId()

String getLangId ( )

Returns the language id.

◆ getLength()

Number getLength ( )

Returns the length of the current motion.

◆ getMachineConfiguration()

MachineConfiguration getMachineConfiguration ( )

Returns the active machine configuration.

◆ getMachineConfigurationAsText()

String getMachineConfigurationAsText ( MachineConfiguration  machine)

Returns a description of the specified machine configuration.

Parameters
machineThe machine configuration.

◆ getMachineConfigurationByName()

MachineConfiguration getMachineConfigurationByName ( String  name)

Returns the specified machine configuration by name.

Parameters
nameThe name of the machine configuration.

◆ getMachineConfigurations()

String getMachineConfigurations ( )

Returns list of the available machine configurations.

◆ getMachiningDistance()

Number getMachiningDistance ( Integer  tool)

Returns the machining distance for the specified tool at the current position.

◆ getMaterialName()

String getMaterialName ( Integer  material)

Returns the specified material as a string.

◆ getMovement()

Integer getMovement ( )

Returns the current movement type.

◆ getMultiAxisMoveLength()

MoveLength getMultiAxisMoveLength ( Number  x,
Number  y,
Number  z,
Number  a,
Number  b,
Number  c 
)

Returns an object containing length information about the current multiaxis move.

Parameters
xThe end linear x coordinate of the move
yThe end linear y coordinate of the move
zThe end linear z coordinate of the move
aThe end radial a coordinate of the move
bThe end radial b coordinate of the move
cThe end radial c coordinate of the move

◆ getNextRecord()

Record getNextRecord ( )

Returns the next record for the current section.

◆ getNextSection()

Section getNextSection ( )

Returns the next section.

◆ getNextTool() [1/2]

Tool getNextTool ( Integer  number)

Returns the next tool with a different tool number.

Returns
Returns the next tool

◆ getNextTool() [2/2]

Tool getNextTool ( )

Returns the next tool, based on the given criteria as arguments. The function can take any number of string arguments, which are the comparison criteria for the current and next tools. These can be "number", "description", "diameter", or any other property on the tool object.

Returns
Returns the next tool
Since
r45600

◆ getNumberOfChannels()

Integer getNumberOfChannels ( )

Returns the number of channels for a multi-channel program.

Since
r42045

◆ getNumberOfCyclePoints()

Integer getNumberOfCyclePoints ( )

Returns the number of cycle points for the current cycle.

Since
r19569

◆ getNumberOfRecords()

Integer getNumberOfRecords ( )

Returns the number of records.

◆ getNumberOfSections()

Integer getNumberOfSections ( )

Returns the number of sections.

◆ getNumberOfSegments()

Integer getNumberOfSegments ( Number  tolerance)

Returns the number of segments required to linearize the current record.

◆ getNumberOfSyncGroups()

Integer getNumberOfSyncGroups ( Integer  channel)

Returns the number of sync groups in the program.

Since
r42045

◆ getOutputPath()

String getOutputPath ( )

Returns the path on the destination file.

◆ getOutputUnit()

Integer getOutputUnit ( )

Returns the output unit.

◆ getParameter()

Value getParameter ( String  name,
Value  defaultValue 
)

Returns the value of the specified parameter.

Only parameters before the current record will be checked.

Parameters
nameThe name of the parameter to return.
defaultValue(optional, since r45606) The default value of the parameter to return if it is not defined.

e.g.

if (hasParameter("operation:tolerance") && hasParameter("operation:strategy")) {
var tolerance = getParameter("operation:tolerance");
if ((getParameter("operation:strategy") == "pocket2d") &&
(tolerance > 0) &&
(tolerance < spatial(10, MM))) {
// override defaults
} else {
// use defaults
}
}

◆ getPlane()

Integer getPlane ( Vector  direction)

Returns the plane id for the given direction vector.

Vector(0, 0, 1): PLANE_XY Vector(0, 1, 0): PLANE_ZX Vector(1, 0, 0): PLANE_YZ

Returns
Returns undefined for all other directions.

◆ getPlatform()

String getPlatform ( )

Returns the platform identifier. E.g. "WIN32" for Windows and "OSX" for Mac OS X.

◆ getPolarPosition()

VectorPair getPolarPosition ( Number  x,
Number  y,
Number  z 
)

Call to get the polar transformed direction from the given position. This function does not update the current position and direction. Call setCurrentPositionAndDirection() after to update.

Parameters
xThe x coordinate of point to be transformed
yThe y coordinate of point to be transformed
zThe z coordinate of point to be transformed
Returns
Returns the polar transformed position and direction.
var posDir = getPolarPosition(_x, _y, _z, cOutput.getCurrent());
var x = posDir.first.x;
var y = posDir.first.y;
var z = posDir.first.z;
var a = posDir.second.x;
var b = posDir.second.y;
var c = posDir.second.z;
Since
r45636

◆ getPositionU()

Vector getPositionU ( Number  u)

Returns the position at the specified u coordinate for the current motion. The u coordinate is clamped to the range [0; 1].

◆ getPostProcessorFolder()

String getPostProcessorFolder ( )

Returns the folder path on the running post processor.

◆ getPostProcessorPath()

String getPostProcessorPath ( )

Returns the path on the running post processor.

◆ getPower()

Boolean getPower ( )

Returns the current power mode (water jet, laser cutter, and plasma cutter).

◆ getPreviousRecord()

Record getPreviousRecord ( )

Returns the previous record for the current section.

◆ getPreviousSection()

Section getPreviousSection ( )

Returns the previous section. Must be called within a section.

◆ getProduct()

String getProduct ( )

Returns the formal name of the product.

◆ getProductUri()

String getProductUri ( )

Returns the unique id of the software component (i.e. 'http://www.autodesk.com/namespace/campostprocessor').

◆ getProductUrl()

String getProductUrl ( )

Returns the url for the product.

◆ getProgramNameAsInt()

Integer getProgramNameAsInt ( Integer  min,
Integer  max 
)

Get the program name as an Integer if it is within the [min, max] range, or error otherwise.

Parameters
minThe minimum possible value for program name (inclusive).
maxThe maximum possible value for program name (inclusive).
Since
r42272

◆ getProgramNameAsString()

String getProgramNameAsString ( Integer  charLimit)

Get the program name as a String, truncated if it's longer than the character limit.

Parameters
charLimitThe maximum number of characters for program name.
Since
r42272

◆ getProperty()

Value getProperty ( ScriptObject  property,
Integer  sectionId 
)

Returns the value of the specified post properties. If the specified property doesn't exist, it returns undefined.

Parameters
propertyThe property object or the property name.
sectionId(optional) The property value of the specified section will be returned.

e.g.

getProperty("propName");
getProperty(properties.propName, sectionId);
getProperty("propName" sectionId);
Since
r45702

◆ getQuadrant()

Integer getQuadrant ( Number  angle)

Returns the quadrant for the specified angle (0 -> 3).

◆ getRadiusCompensation()

Integer getRadiusCompensation ( )

Returns the current radius compensation

◆ getRecord()

Record getRecord ( Integer  id)

Returns the specified record.

◆ getRedirectionBuffer()

String getRedirectionBuffer ( )

Returns the current content of the redirection buffer.

◆ getRedirectionBuffer2()

String getRedirectionBuffer2 ( Boolean  clear)

Returns the current content of the redirection buffer.

Parameters
clearClears the redirection buffer if true.

◆ getRotation()

Matrix getRotation ( )

Returns the current rotation.

◆ getSection()

Section getSection ( Integer  index)

Returns the specified section. The index must be in the range [0; getNumberOfSections()].

◆ getSectionFrameDirection()

Vector getSectionFrameDirection ( Vector  frameDirection)

Returns the specified frame direction in the current section frame. Reverse mapping of getFrameDirection().

◆ getSectionFramePosition()

Vector getSectionFramePosition ( Vector  framePosition)

Returns the specified frame position in the current section frame. Reverse mapping of getFramePosition().

◆ getSectionPosition()

Vector getSectionPosition ( Vector  p)

Returns the specified global position as the corresponding position in the current section.

◆ getSectionsInChannel()

Array getSectionsInChannel ( Number  channel)

Returns the array of sections which use the given channel.

Parameters
channelThe channel.
Since
r42040

◆ getSecurityLevel()

Integer getSecurityLevel ( )

Returns the security level in which is post processor is running.

Since
41349

◆ getSpindleSpeed()

Number getSpindleSpeed ( )

Returns the current spindle speed.

◆ getSystemUnit()

Integer getSystemUnit ( )

Returns the system unit as defined in the regional settings.

◆ getToolTable()

ToolTable getToolTable ( )

Returns the tools. The order of the tools within the tool table is unspecified.

◆ getToolTypeName()

String getToolTypeName ( tool  )

Returns the specified tool as a string.

◆ getTranslation()

Vector getTranslation ( )

Returns the current translation.

◆ getVendor()

String getVendor ( )

Returns the vendor of the product.

◆ getVendorUrl()

String getVendorUrl ( )

Returns the url for the vendor.

◆ getVersion()

String getVersion ( )

Returns the version of the software component.

◆ getWCSPosition()

Vector getWCSPosition ( Vector  p)

Returns the specified position in the current section in the WCS. You likely want to use getGlobalPosition() instead.

◆ getWordSeparator()

String getWordSeparator ( )

Returns the separator for word-based the line output.

◆ getWorkpiece()

BoundingBox getWorkpiece ( )

Returns the workpiece bounding box.

Since
r19573

◆ hasGlobalParameter()

Boolean hasGlobalParameter ( String  name)

Returns true if the specified parameter has been defined globally.

Since
r16737

◆ hasNextRecord()

Boolean hasNextRecord ( )

Returns true if the section has a next record.

◆ hasNextSection()

Boolean hasNextSection ( )

Returns true if the current section is succeeded by a section.

◆ hasParameter()

Boolean hasParameter ( String  name)

Returns true if the specified parameter has been defined.

Only parameters before the current record will be checked.

◆ hasPreviousRecord()

Boolean hasPreviousRecord ( )

Returns true if the section has a previous record.

◆ hasSymbol()

Boolean hasSymbol ( Integer  symbol)

Returns true if the specified character exists in the current code page.

◆ include()

include ( String  path)

Includes the specified post processing script.

Parameters
paththe path of the script to be included.

◆ interval()

Array interval ( Number  from,
Number  to 
)

Returns an array with values in the requested interval. Also see range(). from must be less than or equal to to.

Parameters
fromThe first value (inclusive).
toThe last value (inclusive).
interval(10, 15); // returns [10, 11, 12, 13, 14, 15]

◆ invokeOnCircular()

Boolean invokeOnCircular ( Boolean  clockwise,
Number  cx,
Number  cy,
Number  cz,
Number  x,
Number  y,
Number  z,
Number  nx,
Number  ny,
Number  nz,
Number  feedrate 
)

Called to invoke onCircular in the post engine.

Parameters
clockwiseTrue if tool should move in a clockwise direction.
cxThe x value of the point the tool will arc around.
cyThe y value of the point the tool will arc around.
czThe z value of the point the tool will arc around.
xThe x value of the point the tool will arc to.
yThe y value of the point the tool will arc to.
zThe z value of the point the tool will arc to.
nxThe x value of the direction perpendicular to the arc.
nyThe y value of the direction perpendicular to the arc.
nzThe z value of the direction perpendicular to the arc.
feedrateThe feedrate of the tool.
Returns
Returns true on success.
Since
r45605

◆ invokeOnLinear()

Boolean invokeOnLinear ( Number  x,
Number  y,
Number  z,
Number  feedrate 
)

Called to invoke onLinear in the post engine.

Parameters
xThe x value of the point the tool will move to.
yThe y value of the point the tool will move to.
zThe z value of the point the tool will move to.
feedrateThe feedrate of the tool.
Returns
Returns true on success.
Since
r45605

◆ invokeOnLinear5D()

Boolean invokeOnLinear5D ( Number  x,
Number  y,
Number  z,
Number  dx,
Number  dy,
Number  dz,
Number  feedrate 
)

Called to invoke onLinear5D in the post engine.

Parameters
xThe x value of the point the tool will move to.
yThe y value of the point the tool will move to.
zThe z value of the point the tool will move to.
dxthe x value of the direction the tool will be orientated.
dythe y value of the direction the tool will be orientated.
dzthe z value of the direction the tool will be orientated.
feedrateThe feedrate of the tool.
Returns
Returns true on success.
Since
r45605

◆ invokeOnRapid()

Boolean invokeOnRapid ( Number  x,
Number  y,
Number  z 
)

Called to invoke onRapid in the post engine.

Parameters
xThe x value of the point the tool will move to.
yThe y value of the point the tool will move to.
zThe z value of the point the tool will move to.
Returns
Returns true on success.
Since
r45605

◆ invokeOnRapid5D()

Boolean invokeOnRapid5D ( Number  x,
Number  y,
Number  z,
Number  dx,
Number  dy,
Number  dz 
)

Called to invoke onRapid5D in the post engine.

Parameters
xThe x value of the point the tool will move to.
yThe y value of the point the tool will move to.
zThe z value of the point the tool will move to.
dxthe x value of the direction the tool will be orientated.
dythe y value of the direction the tool will be orientated.
dzthe z value of the direction the tool will be orientated.
Returns
Returns true on success.
Since
r45605

◆ is3D()

Boolean is3D ( )

Returns true if the program is a 3D program (i.e. the tool axis points along the Z-axis for all the sections).

◆ isClockwise()

Boolean isClockwise ( )

Returns true if the current circular motion is clockwise. Returns an unspecified value if the current motion is not circular.

◆ isClockwiseSpindleDirection()

Boolean isClockwiseSpindleDirection ( )

Returns true if the current spindle direction is clockwise. The spindle may be stopped. The direction is assumed to be clockwise by default.

◆ isCoolantActive()

Boolean isCoolantActive ( )

Returns true if the coolant is active. The coolant is assumed to be inactive by default.

◆ isExpanding()

Boolean isExpanding ( )

Returns true if the current motion is a result of an expanded motion. Expanded motion is for instance produced by expandCyclePoint().

◆ isFirstCyclePoint()

Boolean isFirstCyclePoint ( )

Returns true if the current cycle point is the first motion for the current cycle. Returns false if cycle is not active.

◆ isFirstSection()

Boolean isFirstSection ( )

Returns true if the current section is the first section.

◆ isFullCircle()

Boolean isFullCircle ( )

Returns true if the current circular motion is a full circle (360deg). Returns an unspecified value if the current motion is not circular.

◆ isHelical()

Boolean isHelical ( )

Returns true if the current circular motion is helical. Returns an unspecified value if the current motion is not circular.

◆ isInspectionOperation()

Boolean isInspectionOperation ( )

Returns whether the current section is an inspection operation

Returns
Returns true if current section is inspection, otherwise returns false
Since
r45600

◆ isInteractionAllowed()

Boolean isInteractionAllowed ( )

Returns true if user interaction is allowed.

◆ isJet()

Boolean isJet ( )

Returns true for jet toolpath (waterjet, laser, and plasma cutting).

◆ isLastCyclePoint()

Boolean isLastCyclePoint ( )

Returns true if the current cycle point is the last motion for the current cycle. Returns false if cycle is not active.

◆ isLastSection()

Boolean isLastSection ( )

Returns true if the current section is the last section.

◆ isMilling()

Boolean isMilling ( )

Returns true for milling toolpath.

◆ isMultiAxis()

Boolean isMultiAxis ( )

Returns true if the post processor is in multi-axis mode.

◆ isMultiChannelProgram()

Boolean isMultiChannelProgram ( )

Returns true if the program is a multi-channel program.

Since
r42045

◆ isNewWorkPlane()

Boolean isNewWorkPlane ( Section  section)

Returns whether a new work plane is needed for the given section. If section is omitted, it assumes it is the current section.

Parameters
sectionThe section that will be checked.
Since
r42290

◆ isPolarModeActive()

Boolean isPolarModeActive ( )

Call to check if Polar Mode is active.

Returns
Returns true if activatePolarMode() has been called.
Since
r45636

◆ isProbeOperation()

Boolean isProbeOperation ( )

Returns whether the current section is a probe operation

Returns
Returns true if current section is probing, otherwise returns false
Since
r45600

◆ isProbingCycle()

Boolean isProbingCycle ( String  uri)

Returns true if the given cycle is a probing cycle.

Parameters
uriThe identifier of the cycle.
Since
r41188

◆ isRedirecting()

Boolean isRedirecting ( )

Returns true if the output is being redirected.

◆ isSafeText()

Boolean isSafeText ( String  text,
String  permitted 
)

Returns true if the specified string only contains the specified characters.

Parameters
textThe string.
permittedThe permitted characters.

◆ isSameDirection()

Boolean isSameDirection ( ,
 
)

Returns true if the 2 specified normalized vectors are in the same direction.

The built-in implementation is:

function isSameDirection(a, b) {
return Vector.dot(a, b) > (1 - 1e-7);
}

You can easily change the post behavior by adding your own implementation of the function.

◆ isSectionSpecialCycle()

Boolean isSectionSpecialCycle ( String  uri)

Returns true if the given cycle is considered a special cycle for which to call onSectionSpecialCycle()/onSectionEndSpecialCycle() instead of onSection()/onSectionEnd().

Parameters
uriThe unique identifier of the cycle.
Since
r41185

◆ isSpeedFeedSynchronizationActive()

Boolean isSpeedFeedSynchronizationActive ( )

Returns true if the speed-feed asynchronization is active. The synchronization is assumed to be inactive by default.

◆ isSpindleActive()

Boolean isSpindleActive ( )

Returns true if the spindle is active. The direction is assumed to be inactive by default.

◆ isSpindleSpeedDifferent()

Boolean isSpindleSpeedDifferent ( )

Returns whether this section's maximum spindle speed is different to the last section's maximum spindle speed

Returns
True is spindle speed is current spindle speed differs to previous section, false if they are the same
Since
45600

◆ isSpiral()

Boolean isSpiral ( )

Returns true if the current circular motion is a spiral (i.e. the start and end radii do not match). Returns an unspecified value if the current motion is not circular.

◆ isSubSpindleCycle()

Boolean isSubSpindleCycle ( String  uri)

Returns true if the given cycle is a sub spindle cycle.

Parameters
uriThe identifier of the cycle.
Since
r41188

◆ isSupportedText()

Boolean isSupportedText ( String message)

Returns true if the specified text can be output in the active code page/encoding without change.

◆ isTextSupported()

Boolean isTextSupported ( String  text)

Returns true if all the characters exist in the given text for the current code page.

◆ isToolChangeNeeded()

Boolean isToolChangeNeeded ( )

Returns whether a tool change is needed, based on the given criteria as arguments. The function can take any number of string arguments, which are the comparison criteria for the current and previous tools. These can be "number", "description", "diameter", or any other property on the tool object.

Returns
Returns whether a tool change is needed
Since
r45600

◆ isTurning()

Boolean isTurning ( )

Returns true for turning toolpath.

◆ isWellKnownCommand()

Boolean isWellKnownCommand ( Integer  command)

Returns true if the specified command is well-known.

◆ isWellKnownCycle()

Boolean isWellKnownCycle ( )

Returns true if the current cycle is a well-known cycle.

◆ isWorkpieceDefined()

Boolean isWorkpieceDefined ( )

Returns true if the workpiece stock is defined.

◆ linearize()

linearize ( Number  tolerance)

Linearizes the current motion to the specified tolerance. Use canLinearize() to determine if the current record can be linearized. The start position is not output.

◆ loadLocale()

Boolean loadLocale ( String  langId)

Loads the specified locale.

Parameters
langIdThe language id of the locale file.

◆ loadMachineConfiguration()

MachineConfiguration loadMachineConfiguration ( String  path)

Loads the specified machine configuration.

Parameters
pathThe path of the machine configuration.

◆ loadText()

String loadText ( String  url,
String  encoding 
)

Returns the text loaded from the specified url. The url is relative to the configuration script. The file size is limited to 1Mb.

Parameters
urlThe url.
encodingThe encoding (ascii, utf-7, utf-8, or utf-16). Alternative you can specify the code page as a string (e.g. 437).

◆ localize()

String localize ( String  message)

Returns the localized text for the specified native text if the result is supported in the active code page/encoding. Otherwise the original text is returned.

◆ localize2()

String localize2 ( String  section,
String  message 
)

Returns the localized text for the specified native text of the given section if the result is supported in the active code page/ encoding. Otherwise the original text is returned.

◆ log()

log ( String  message)

Writes the specified message to the log.

◆ onBedTemp()

onBedTemp ( Number  temp,
Boolean  wait 
)

Entry function invoked when the bed temperature is changed in an additive FFF toolpath.

Parameters
tempThe target temperature.
waitIf true, wait to reach the desired temperature before continuing.

◆ onCircular()

onCircular ( Boolean  clockwise,
Number  cx,
Number  cy,
Number  cz,
Number  x,
Number  y,
Number  z,
Number  feed 
)

Entry function for circular motion.

Parameters
clockwiseSpecifies that the motion is clockwise.
cxThe X coordinate of the center position.
cyThe Y coordinate of the center position.
czThe Z coordinate of the center position.
xThe X coordinate of the end position.
yThe Y coordinate of the end position.
zThe Z coordinate of the end position.
feedThe feedrate.

◆ onCircularExtrude()

onCircularExtrude ( Boolean  clockwise,
Number  cx,
Number  cy,
Number  cz,
Number  x,
Number  y,
Number  z,
Number  feed,
Number  extrusionLength 
)

Entry function invoked for circular extrusion motion at feed.

Parameters
clockwiseSpecifies that the motion is clockwise.
cxThe X coordinate of the center position.
cyThe Y coordinate of the center position.
czThe Z coordinate of the center position.
xThe X coordinate of the end position.
yThe Y coordinate of the end position.
zThe Z coordinate of the end position.
feedThe feedrate.
extrusionLengthThe extrusion length.

◆ onClose()

onClose ( )

Invoked after the last section.

◆ onCommand()

onCommand ( Integer  command)

Entry function invoked for well-known commands.

Parameters
commandThe well-known command.

The known commands are:

  • COMMAND_STOP - Program stop (M00)
  • COMMAND_OPTIONAL_STOP - Optional program stop (M01)
  • COMMAND_END - Program end (M02)
  • COMMAND_SPINDLE_CLOCKWISE - Clockwise spindle direction (M03)
  • COMMAND_SPINDLE_COUNTERCLOCKWISE - Counterclockwise spindle direction (M04)
  • COMMAND_START_SPINDLE - Start spindle M03 (clockwise) or M04 (counterclockwise)
  • COMMAND_STOP_SPINDLE - Stop spindle (M05)
  • COMMAND_ORIENTATE_SPINDLE - Orientate spindle - +X direction by default (M19)
  • COMMAND_LOAD_TOOL - Tool change (M06)
  • COMMAND_COOLANT_ON - Coolant on (M08)
  • COMMAND_COOLANT_OFF - Coolant off (M09)
  • COMMAND_ACTIVATE_SPEED_FEED_SYNCHRONIZATION - Active feed-speed synchronization
  • COMMAND_DEACTIVATE_SPEED_FEED_SYNCHRONIZATION - Deactive feed-speed synchronization
  • COMMAND_LOCK_MULTI_AXIS - Locks the 4th and 5th axes
  • COMMAND_UNLOCK_MULTI_AXIS - Unlocks the 4th and 5th axes
  • COMMAND_EXACT_STOP - Exact stop
  • COMMAND_START_CHIP_TRANSPORT - Close chip transport
  • COMMAND_STOP_CHIP_TRANSPORT - Stop chip transport
  • COMMAND_OPEN_DOOR - Open primary door
  • COMMAND_CLOSE_DOOR - Close primary door
  • COMMAND_BREAK_CONTROL - Break control
  • COMMAND_TOOL_MEASURE - Measure tool
  • COMMAND_CALIBRATE - Run calibration cycle
  • COMMAND_VERIFY - Verify part/tool/machine integrity
  • COMMAND_CLEAN - Run cleaning cycle
  • COMMAND_ALARM - Alarm
  • COMMAND_ALERT - Alert
  • COMMAND_CHANGE_PALLET - Change pallet
  • COMMAND_POWER_ON - Power on
  • COMMAND_POWER_OFF - Power off
  • COMMAND_MAIN_CHUCK_OPEN - Open main chuck
    Since
    r41179
  • COMMAND_MAIN_CHUCK_CLOSE - Close main chuck
    Since
    r41179
  • COMMAND_SECONDARY_CHUCK_OPEN - Open secondary chuck
    Since
    r41179
  • COMMAND_SECONDARY_CHUCK_CLOSE - Close secondary chuck
    Since
    r41179
  • COMMAND_SECONDARY_SPINDLE_SYNCHRONIZATION_ACTIVATE - Activate spindle synchronization
    Since
    r41179
  • COMMAND_SECONDARY_SPINDLE_SYNCHRONIZATION_DEACTIVATE - Deactivate spindle synchronization
    Since
    r41179
  • COMMAND_SYNC_CHANNEL - Sync channels
    Since
    r42013
  • COMMAND_PROBE_ON - Probe on
    Since
    r42013
  • COMMAND_PROBE_OFF - Probe off
    Since
    r42013

◆ onComment()

onComment ( String  comment)

Entry function for comments.

Parameters
commentThe comment.

◆ onCycle()

onCycle ( )

The onCycle() entry function is invoked for each cycle.

◆ onCycleEnd()

onCycleEnd ( )

The onCycleEnd() entry function is invoked on cycle termination.

◆ onCyclePath()

onCyclePath ( )

The onCyclePath() entry function is invoked at the beginning of cycle toolpath.

◆ onCyclePathEnd()

onCyclePathEnd ( )

The onCyclePathEnd() entry function is invoked at the ending of cycle toolpath.

◆ onCyclePoint()

onCyclePoint ( Number  x,
Number  y,
Number  z 
)

onCyclePoint() is the entry function for cycle positions. The function expands all well-known cycles by default. The specified position is the center of the hole for drilling or equivalent cycles. You should always use cycle.bottom as the bottom coordinate if defined.

Parameters
xThe x coordinate for the drill position.
yThe y coordinate for the drill position.
zThe z coordinate for the drill position.

◆ onDwell()

onDwell ( Number  time)

Entry function invoked for dwelling.

Parameters
timeThe dwelling time in seconds.

◆ onExpandedLinear()

onExpandedLinear ( Number  x,
Number  y,
Number  z,
Number  feed 
)

onExpandedLinear() calls the onLinear() entry function and lets the post processor know that the current position has changed at the same time. You should generally not call onLinear() directly.

◆ onExpandedRapid()

onExpandedRapid ( Number  x,
Number  y,
Number  z 
)

onExpandedRapid() calls the onRapid() entry function and lets the post processor know that the current position has changed at the same time. You should generally not call onRapid() directly.

◆ onExpandedSpindleSpeed()

onExpandedSpindleSpeed ( Number  spindleSpeed)

onExpandedSpindleSpeed() calls the onSpindleSpeed() entry function and lets the post processor know that the current spindle speed has changed at the same time. You should generally not call onSpindleSpeed() directly.

◆ onExtruderChange()

onExtruderChange ( Number  extruderId)

Entry function invoked when the extruder is changed in an additive FFF toolpath.

Parameters
extruderIdThe id of the extruder to change to.

◆ onExtruderTemp()

onExtruderTemp ( Number  temp,
Boolean  wait,
Integer  extruderId 
)

Entry function invoked when the extruder temperature is changed in an additive FFF toolpath.

Parameters
tempThe target temperature.
waitIf true, wait to reach the desired temperature before continuing.
extruderIdThe extruder id.

◆ onExtrusionReset()

onExtrusionReset ( Number  length)

Entry function invoked when the extrusion length is reset in an additive FFF toolpath.

Parameters
lengthThe extrusion length.

◆ onFanSpeed()

onFanSpeed ( Number  speed,
Integer  fanId 
)

Entry function invoked when the fan speed is changed in an additive FFF toolpath.

Parameters
speedThe fan speed.
fanIdThe fan id.

◆ onImpliedCommand()

onImpliedCommand ( Integer  command)

Invoke this method to tell the post processor about state changes without triggering invocation of onCommand(). This method must be invoked when a state doesn't originate from an invocation of an entry function. If this method is not invoked the post processor may not know certain current state (e.g. whether the coolant is active). For instance, the state is important when the post processor is asked to expand cycles.

◆ onLayer()

onLayer ( Number  layerNumber)

Entry function invoked at the start of a layer in an additive FFF toolpath.

Parameters
layerNumberThe layer number.

◆ onLinear()

onLinear ( Number  x,
Number  y,
Number  z,
Number  feed 
)

Entry function invoked for linear motion at feed.

Parameters
xThe X coordinate of the end position.
yThe Y coordinate of the end position.
zThe Z coordinate of the end position.
feedThe feedrate.

◆ onLinear5D()

onLinear5D ( Number  x,
Number  y,
Number  z,
Number  dx,
Number  dy,
Number  dz,
Number  feed 
)

Entry function invoked for linear 5-axis motion at feed. The tool axis may also be returned in machine angles depending on the mode in accordance with the active machine configuration.

Parameters
xThe x coordinate of the position.
yThe y coordinate of the position.
zThe z coordinate of the position.
dxThe dx coordinate of the tool axis direction.
dyThe dy coordinate of the tool axis direction.
dzThe dz coordinate of the tool axis direction.
feedThe feedrate.

◆ onLinearExtrude()

onLinearExtrude ( Number  x,
Number  y,
Number  z,
Number  feed,
Number  extrusionLength 
)

Entry function invoked for linear extrusion motion at feed.

Parameters
xThe X coordinate of the end position.
yThe Y coordinate of the end position.
zThe Z coordinate of the end position.
feedThe feedrate.
extrusionLengthThe extrusion length.

◆ onMachine()

onMachine ( )

Invoked during post processing when the machine configuration changes.

◆ onMovement()

onMovement ( Integer  movement)

Entry function invoked when the movement type changes.

◆ onMoveToSafeRetractPosition()

onMoveToSafeRetractPosition ( )

Entry function invoked during a machine rewind procedure. It needs to output the code for retracting to safe position before indexing rotaries(usually a retract in Z).

Since
r45400

◆ onOpen()

onOpen ( )

Invoked during initialization before the first section.

◆ onOrientateSpindle()

onOrientateSpindle ( Number  angle)

This function must set the spindle orientation. The function may be invoked when expanding cycles.

Parameters
angleThe requested spindle orientation.

◆ onParameter()

onParameter ( String  name,
Value  value 
)

Parameter entry function.

Parameters
nameThe name of the parameter.
valueThe value of the parameter.

◆ onPassThrough()

onPassThrough ( Value  value)

Pass-through entry function.

Parameters
valueThe value.

◆ onPower()

onPower ( Boolean  power)

Entry function invoked when the power mode changes (used for water jet, laser cutter, and plasma cutter).

◆ onRadiusCompensation()

onRadiusCompensation ( )

Entry function invoked when the radius compensation mode changes.

◆ onRapid()

onRapid ( Number  x,
Number  y,
Number  z 
)

Entry function invoked for linear motion at rapid traverse.

Parameters
xThe X coordinate of the end position.
yThe Y coordinate of the end position.
zThe Z coordinate of the end position.

◆ onRapid5D()

onRapid5D ( Number  x,
Number  y,
Number  z,
Number  dx,
Number  dy,
Number  dz 
)

Entry function invoked for linear rapid 5-axis motion at rapid traverse. The tool axis may also be returned in machine angles depending on the mode in accordance with the active machine configuration.

Parameters
xThe x coordinate of the position.
yThe y coordinate of the position.
zThe z coordinate of the position.
dxThe dx coordinate of the tool axis direction.
dyThe dy coordinate of the tool axis direction.
dzThe dz coordinate of the tool axis direction.

◆ onReturnFromSafeRetractPosition()

onReturnFromSafeRetractPosition ( Number  x,
Number  y,
Number  z 
)

Entry function invoked during a machine rewind procedure. It needs to output the code for returning from safe position after indexing rotaries.

Parameters
xThe X coordinate to return to.
yThe Y coordinate to return to.
zThe Z coordinate to return to.
Since
r45400

◆ onRewindMachine()

onRewindMachine ( Number  a,
Number  b,
Number  c 
)

DEPRECATED. Entry function invoked for 5-axis motion when machine axis rewind is required.

Parameters
aThe A coordinate of the machine orientation.
bThe B coordinate of the machine orientation.
cThe C coordinate of the machine orientation.

◆ onRewindMachineEntry()

onRewindMachineEntry ( Number  a,
Number  b,
Number  c 
)

Entry function invoked for 5-axis motion when machine axis rewind is required. This is called before performing a machine rewind in the kernel, as onRewindMachine() is now deprecated.

Parameters
aThe A coordinate of the machine orientation.
bThe B coordinate of the machine orientation.
cThe C coordinate of the machine orientation.
Returns
True if we don't want the kernel to perform the machine rewind, False otherwise.
Since
r45400

◆ onRotateAxes()

onRotateAxes ( Number  x,
Number  y,
Number  z,
Number  a,
Number  b,
Number  c 
)

Entry function invoked during a machine rewind procedure. It needs to output the code for rotating the axes to new position above re-entry position.

Parameters
xThe X coordinate to rotate to.
yThe Y coordinate to rotate to.
zThe Z coordinate to rotate to.
aThe A coordinate to rotate to.
bThe B coordinate to rotate to.
cThe C coordinate to rotate to.
Since
r45400

◆ onSectionEnd()

onSectionEnd ( )

Entry function invoked at the end of each section.

◆ onSpindleSpeed()

onSpindleSpeed ( Number  spindleSpeed)

Entry function invoked for spindle speed changes.

Parameters
spindleSpeedThe spindle speed in RPM.

◆ onToolCompensation()

onToolCompensation ( Integer  compensation)

Entry function invoked when the tool compensation changes. Only used for specific tool types for which dual compensation is defined.

◆ onUnsupportedCommand()

onUnsupportedCommand ( Integer  command)

Writes an error message for the specified command.

◆ onUnsupportedCoolant()

onUnsupportedCoolant ( Integer  coolant)

Writes an error message for the specified coolant.

◆ openUrl()

openUrl ( String  url)

Opens the specified url.

◆ optimizeMachineAngles()

optimizeMachineAngles ( )

Optimizes the machine angles for 5-axis motion using the active machine configuration. The tool tip position is maintained (TCPM).

The directions for onRapid5D() and onLinear5D() are hereafter mapped to machine angles from the initial direction vector. The work plane and origin are mapped into the WCS plane and origin.

◆ optimizeMachineAngles2()

optimizeMachineAngles2 ( Integer  optimizeType)

Optimizes the machine angles for 5-axis motion using the active machine configuration.

optimizeType options are:

  1. OPTIMIZE_NONE: Maintain tool tip position (TCPM).
  2. OPTIMIZE_BOTH: Map tool tip position.
  3. OPTMIZE_TABLES: Map tool tip position for machine axes for tables only.
    Since
    r41179
  4. OPTMIZE_HEADS: Map tool tip position for machine axes for heads only.
    Since
    r45270
  5. OPTMIZE_AXIS: Map tool tip position for machine axes per the Axis definition.
    Since
    r45270
    The directions for onRapid5D() and onLinear5D() are hereafter mapped to machine angles from the initial direction vector. The work plane and origin are mapped into the WCS plane and origin.

◆ optimizeMachineAnglesByMachine()

optimizeMachineAnglesByMachine ( MachineConfiguration  machine,
Integer  optimizeType 
)

Optimizes the machine angles for 5-axis motion given the specified machine configuration.

The directions for onRapid5D() and onLinear5D() are hereafter mapped to machine angles from the initial direction vector. The work plane and origin are mapped into the WCS plane and origin.

Parameters
machineThe machine configuration.
optimizeTypeCan be one of the following values.
  1. OPTIMIZE_NONE: Maintain tool tip position (TCPM).
  2. OPTIMIZE_BOTH: Map tool tip position.
  3. OPTMIZE_TABLES: Map tool tip position for machine axes for tables only.
Since
r41179
  1. OPTMIZE_HEADS: Map tool tip position for machine axes for heads only.
r45270
  1. OPTMIZE_AXIS: Map tool tip position for machine axes per the Axis definition.
r45270

◆ parseSpatial()

Number parseSpatial ( String value)

Returns the given value and spatial unit in the current spatial unit.

The value can start with a sign (+ or -) followed by the digits and decimal ('.') and end with the unit.

The supported units are: yd, ft, in, mil or mils, thou, m, cm, mm, um, nm

yd = 3 ft ft = 12 in in = 1000 mil in = 1000 thou

m = 100 cm cm = 10 mm mm = 1000 um um = 1000 nm

◆ printDocument()

Boolean printDocument ( String  path)

Prints the specified document. Note that you cannot open the primary output file until the onTerminate() is invoked. The document type must have the "print" command registered in the Windows Registry.

Parameters
pathThe path of the document.
Returns
Returns true on success.
printDocument("C:\\myfile.html");

◆ printDocumentTo()

Boolean printDocumentTo ( String  path,
String  printerName 
)

Prints the specified document. Note that you cannot open the primary output file until the onTerminate() is invoked. The document type must have the "printto" command registered in the Windows Registry. If the "printto" command is not registered for a given document type you can sometimes print using the execute() function by referrencing the proper application and parsing appropriate parameters.

Parameters
pathThe path of the document.
printerNameThe printer name.
Returns
Returns true on success.
printDocumentTo("C:\\myfile.doc", "\"Microsoft XPS Document Writer\"");

◆ promptKey()

String promptKey ( String  title,
String  description 
)

Waits for the user to hit a key. In console mode ESC or RETURN cancels. Not supported in graphical user interaction mode.

Parameters
titleThe title.
descriptionThe description.
Returns
Returns the empty string on cancel. Always returns the lower case character.

◆ promptKey2()

String promptKey2 ( String  title,
String  description,
String  accept 
)

Waits for the user to hit a key. In console mode ESC or RETURN cancels or returns the first character in the accept string. The following accept modes are available in graphical user interface:

  1. YN: Yes/No
  2. YNC: Yes/No/Cancel
  3. RC: Retry/Cancel
  4. OC: Ok/Cancel
  5. ARI: Abort/Retry/Ignore
Parameters
titleThe title.
descriptionThe description.
acceptThe allowed characters. Case is ignored. The first character in the string is the default.
Returns
Returns the empty string on cancel. Always returns the lower case character.

◆ promptKey3()

String promptKey3 ( String  title,
String  description,
String  accept,
String  keys 
)

Waits for the user to hit a key. In console mode ESC or RETURN cancels or returns the first character in the accept string. The following accept modes are available in graphical user interface:

  1. YN: Yes/No
  2. YNC: Yes/No/Cancel
  3. RC: Retry/Cancel
  4. OC: Ok/Cancel
  5. ARI: Abort/Retry/Ignore
Parameters
titleThe title.
descriptionThe description.
acceptThe allowed answers. Case is ignored. The first character in the string is the default.
keysThe allowed characters used in console mode. Case is ignored. The first character in the string is the default.
Returns
Returns the empty string on cancel. Always returns the lower case character.

◆ promptText()

String promptText ( String  title,
String  description 
)

Waits for user to enter a text string. Not supported in graphical user interface mode.

Returns
Returns the empty string on cancel.

◆ range()

Array range ( Number  first,
Number  end,
Number  step 
)

Returns an array with values in the requested range.

range(end) range(first, end) range(first, end, step)

range(); returns []
range(5); // returns [0, 1, 2, 3, 4]
range(10, 15); // returns [10, 11, 12, 13, 14]
range(10, 15, 2); // returns [10, 12, 14]
range(15, 10, -1); // returns [15, 14, 13, 12, 11]
for (var value in range(-10, -20, -1) { // output -10 to -19
writeln(value);
}

◆ redirectToBuffer()

redirectToBuffer ( )

Redirects the output to the global buffer. Use getRedirectionBuffer() to access the current buffer content. Use getRedirectionBuffer2() to clear the buffer during redirection. Close redirection again using closeRedirection().

◆ redirectToFile()

redirectToFile ( String  path)

Redirects output to the specified file.

Security: Requires security level 0.

Attention
The file is overwritten if it already exists.
function onSection() {
var fileIndexFormat = createFormat({width:3, zeropad: true, decimals:0});
fileIndexFormat.format(getCurrentSectionId()) + ".nc"); redirectToFile(path);
}
function onSectionEnd() {
}

◆ registerPostProcessing()

registerPostProcessing ( String  path)

Registers post processing of the output file using the specified executable.

◆ registerTerminationHandler()

registerTerminationHandler ( Function  function)

Registers a termination handler to be called after onTerminate(). The termination handlers are called in the opposite order of registration.

Parameters
functionThe termination handler. Must be a function.
Since
41664

◆ repositionToCycleClearance()

repositionToCycleClearance ( Map  cycle,
Number  x,
Number  y,
Number  z 
)

Repositions to cycle clearance plane. Attention: The tool is not moved over the hole if not required. The spindle axis must be along the Z-axis.

Parameters
cycleThe cycle parameters.
xThe X position of the cycle.
yThe Y position of the cycle.
zThe Z position of the cycle.

◆ setCascadingPath()

setCascadingPath ( String  )

Sets the path used as the primary source for a cascading post. By default this will be the getOutputPath(). A cascading post is a specific post that takes as input the output from a previous post. The cascading post is run after the onTerminate() entry function.

Since
41546

◆ setCodePage()

setCodePage ( String  name)

Sets the output code page.

The code page can be changed at any time but using different code pages in the same text file does normally not make sense. For binary output it can be relevant in some cases.

◆ setCurrentABC()

setCurrentABC ( Vector  abc)

Called to pass the current machine angles back to the post engine.

This function allows machine angles chosen in a post script to be passed back to the post engine. This is used to drive simulation and should accompany calls to setRotation().
The machine angles set by this function will be cleared by a call to cancelRotation() or cancelTransformation()

Parameters
abcA vector representing the machine axis angles where a, b, and c map to the vector's x, y, and z respectively.
Since
r45672

◆ setCurrentDirection()

setCurrentDirection ( Vector  currentDirection)

Sets the current direction.

◆ setCurrentPosition()

setCurrentPosition ( Vector  currentPosition)

Sets the current position.

◆ setCurrentPositionAndDirection()

setCurrentPositionAndDirection ( VectorPair  posDir)

Call to set the current position and direction at the same time.

Parameters
posDirA pair of vectors containing the position and direction wanting to be set.
Since
r45635

◆ setCurrentPositionX()

setCurrentPositionX ( Number  x)

Sets only the current X position.

◆ setCurrentPositionY()

setCurrentPositionY ( Number  y)

Sets only the current Y position.

◆ setCurrentPositionZ()

setCurrentPositionZ ( Number  z)

Sets only the current Z position.

◆ setCurrentSpindleSpeed()

setCurrentSpindleSpeed ( Number  spindleSpeed)

Sets the current spindle speed.

Since
r42066

◆ setDogLeg()

setDogLeg ( Boolean  dogLeg)

Sets the dog-leg style. 3-axis rapid traversal will be substituted with dog-leg style rapid traversal when this flag is set to true.

◆ setEOL()

setEOL ( String  eol)

Sets the EOL style. Windows EOL style CRLF is the default.

Parameters
eolThe EOL to use. Only these are allowed CR, LF, CRLF, and LFCR.

◆ setExitCode()

setExitCode ( Integer  code)

Sets the desired exit code. The default exit code is usually fine. The behavior is unspecified if the exit code is not a value in the range [1000; 1999].

◆ setHighFeedMapping()

setHighFeedMapping ( Integer  mode)

Sets the high feed rapid traversal mapping mode.

See HIGH_FEED_NO_MAPPING, HIGH_FEED_MAP_MULTI, HIGH_FEED_MAP_XY_Z, and HIGH_FEED_MAP_ANY.

◆ setHighFeedrate()

setHighFeedrate ( Number  feedrate)

Sets the high feedrate used for mapping rapid traversal.

◆ setMachineConfiguration()

setMachineConfiguration ( MachineConfiguration  machine)

Sets the active machine configuration.

Parameters
machineThe new machine configuration.

◆ setOutputUnit()

setOutputUnit ( Integer  unit)

Sets the output unit.

◆ setRotation()

setRotation ( Matrix  rotation)

Sets the rotation. This is normally used for rotating around the tool axis.

◆ setSectionSpecialCycle()

setSectionSpecialCycle ( String  uri,
Boolean  specialCycle 
)

Tells the post processor to call onSectionSpecialCycle()/onSectionEndSpecialCycle() instead of onSection()/onSectionEnd() for sections starting with the given cycle.

Parameters
uriThe unique identifier of the cycle.
specialCycleIndicates if the cycle should be considered special. Set to false to remove a built-in special cycles.
Since
r41185

◆ setTranslation()

setTranslation ( Vector  translation)

Sets the translation.

◆ setWordSeparator()

setWordSeparator ( String  message)

Sets the separator for word-based line output. Defaults to a space (i.e. " ").

◆ setWriteInvocations()

setWriteInvocations ( Boolean  writeInvocations)

Specifies that the entry function should be written.

◆ setWriteStack()

setWriteStack ( Boolean  writeStack)

Specifies that a stack dump should be written when text is output by the post processor.

◆ skipRemainingSection()

skipRemainingSection ( )

Tells the post processor to skip the remaining of the current section. onSectionEnd() will still be invoked.

◆ spatial()

Number spatial ( Number  value,
Integer  unit 
)

Returns the specified spatial value and unit in the internal unit.

Note: IN values are scaled with 25 relative to MM.

Parameters
valueThe value.
unitThe unit of the value.

◆ subst()

String subst ( String  message,
  ... 
)

Returns a new string with the named substrings of the first argument substituted by the specified arguments. This method supports up to 16 arguments.

subst("My first name is %1 and last name is %2", "John", "Doe"); // returns "My first name is
John and last name is Doe"

◆ toDeg()

Number toDeg ( Number  radians)

Returns the specified angle in degrees.

Parameters
radiansthe angle in radians

◆ toolZRange()

Range toolZRange ( )

Returns the Z range for the currently active tool, for the current and upcoming consecutive sections that use this tool. Returns undefined if the tool does not have a Z axis (e.g. on 2D operations).

Returns
Returns the Range for the tool's Z axis.
Since
r45600

◆ toRad()

Number toRad ( Number  degrees)

Returns the specified angle in radians.

Parameters
degreesthe angle in degrees.

◆ translateText()

String translateText ( String  text,
String  src,
String  dest 
)

Translates the specified string into a new string. The characters in src will be mapped to the character at the same index in dest.

Parameters
textThe original text.
srcThe chars to be mapped.
destThe destination characters.

◆ validate()

validate ( Value  expression,
String  message 
)

Raises an exception if the expression is false. Use this function to make sure that you have protected your code against invalid cases.

Parameters
expressionThe boolean expression.
messageOptional description of the constraint.
var feedVariable = createVariable({prefix:" F"}, createFormat({decimals:0, separator:","}));
function doSomething(feed) {
validate(feed > 0, localize("Feedrate must be greater than 0."));
return feedVariable.format(feed);
}

◆ validateProperties()

Boolean validateProperties ( )

Returns true if all user defined properties are valid according to the property definitions.

◆ validatePropertyDefinitions()

Boolean validatePropertyDefinitions ( )

Validates the property definitions.

◆ warning()

warning ( String  message)

Writes a warning.

◆ warningOnce()

warningOnce ( String message,
Integer  id 
)

Writes the specified warning if the given warning id has not been used before.

◆ write()

write ( String  message)

Writes the specified text to the NC output file excluding an end-of-line marker.

◆ writeln()

writeln ( String  message)

Writes the specified text to the NC output file including an end-of-line marker.

◆ writeSectionNotes()

writeSectionNotes ( )

Writes the notes for the current section as comments.

Since
r45600

◆ writeSetupNotes()

writeSetupNotes ( )

Writes the notes for the current setup as comments.

Since
r45600

◆ writeToolTable()

writeToolTable ( Integer  orderBy)

Prints the tool table.

Parameters
orderByAn enum of the column to order the table by. It can be:
  • TOOL_NUMBER_COL
  • DIAMETER_COL
  • CORNER_RADIUS_COL
  • TAPER_COL
  • ZMIN_COL
  • DESCRIPTION_COL
  • TOOL_TABLE_NUM_COLS
Since
r45600

◆ writeWords()

writeWords ( String  message,
  ... 
)

Writes the specified words to the NC output file including an end-of-line marker using the word separator (see getWordSeparator() and setWordSeparator()). Empty strings or undefined values are ignored. No line is output for completely empty lines.

writeWords("first", "second", "third"); // writes "first, second, third" on a new line
writeWords(["first", "second"], "third"); // writes "first, second, third" on a new line
function writeBlock() {
writeWords("first", arguments);
}
writeBlock("second", "third"); // writes "first, second, third" on a new line
writeBlock(""); // writes "first" on a new line
writeBlock(undefined); // writes "first" on a new line

◆ writeWords2()

writeWords2 ( String  message,
  ... 
)

This method is similar to writeWords() with the exception that text is only output if the 2 argument or above results in text.

This function is useful when outputting block numbers to avoid output.

function writeBlock() {
if (properties.showSequenceNumbers) {
writeWords2("N" + sequenceNumber, arguments);
sequenceNumber += properties.sequenceNumberIncrement;
} else {
writeWords(arguments);
}
}

Member Data Documentation

◆ abortOnDeprecation

Boolean abortOnDeprecation

This property specifies that the post processing should be aborted if the post processor is deprecated. Defaults to true.

Specifies that the post processing should be aborted if the post processor has been deprecated.

◆ allowedCircularPlanes

Integer allowedCircularPlanes

Specifies the allowed circular planes to be output. Set to 0 to linearize all circular motion and undefined to allow any motion. Circular motion in disabled planes will be output as linear motion using the globally specified tolerance. allowedCircularPlanes is a bit mask. PLANE_XY, PLANE_ZX, and PLANE_YZ can be used for accessing the appropriate bits. Handling all planes in onCircular() gives more flexibility with regard to the used tolerances.

allowedCircularPlanes = 0; // disable all circular planes
allowedCircularPlanes = undefined; // allow all circular planes
allowedCircularPlanes = (1 << PLANE_XY) | (1 << PLANE_ZX) | (1 << PLANE_YZ); // only XY, ZX,
and YZ planes

◆ allowHelicalMoves

Boolean allowHelicalMoves

Specifies that helical motion is allowed. The helical motion is linearized if false.

◆ allowMachineChangeOnSection

Boolean allowMachineChangeOnSection

Specifies that the machine configuration may change during post processing when no machine configuration is defined in the post configuration. Only one machine configuration is allowed by default when they are defined/embedded in the toolpath. This property must be set to true to allow multiple machines to be defined during post processing in which case the machine configuration will become active on onSection() calls. Any machine configuration defined in the post configuration always takes precedence.

◆ allowSpiralMoves

Boolean allowSpiralMoves

Specifies that spiral motion is allowed (i.e. the start and end radii are different). The spiral motion is linearized if false.

◆ capabilities

Integer capabilities

Specifies the capability flags. CAPABILITY_MILLING, CAPABILITY_TURNING, CAPABILITY_JET, CAPABILITY_SETUP_SHEET, CAPABILITY_INTERMEDIATE, and CAPABILITY_CASCADING. The default is "CAPABILITY_MILLING".

◆ certificationLevel

Integer certificationLevel

Certification level of the post configuration. The post configuration must always use the property certificationLevel to set its certification level. The level should never be set higher than the current certification level of the post processor. The level defaults to 1 for all configurations. A warning will be output if the certication level of the post configuration is less than the level required by the post processor. This ensures that users will be notified when post configurations may not run properly in future releases of the post processor. The certification level of the post processor is rarely incremented.

The current certification level is 2.

◆ COMMAND_MAIN_CHUCK_CLOSE

Integer COMMAND_MAIN_CHUCK_CLOSE

Close main chuck.

Since
r41179

◆ COMMAND_MAIN_CHUCK_OPEN

Integer COMMAND_MAIN_CHUCK_OPEN

Open main chuck.

Since
r41179

◆ COMMAND_ORIENTATE_SPINDLE

Integer COMMAND_ORIENTATE_SPINDLE

Orientate spindle direction (well-known command M19). The property machineParameters.spindleOrientation must be set to the machine spindle orientation.

◆ COMMAND_SECONDARY_CHUCK_CLOSE

Integer COMMAND_SECONDARY_CHUCK_CLOSE

Close secondary chuck.

Since
r41179

◆ COMMAND_SECONDARY_CHUCK_OPEN

Integer COMMAND_SECONDARY_CHUCK_OPEN

Open secondary chuck.

Since
r41179

◆ COMMAND_SECONDARY_SPINDLE_SYNCHRONIZATION_ACTIVATE

Integer COMMAND_SECONDARY_SPINDLE_SYNCHRONIZATION_ACTIVATE

Activate spindle synchronization.

Since
r41179

◆ COMMAND_SECONDARY_SPINDLE_SYNCHRONIZATION_DEACTIVATE

Integer COMMAND_SECONDARY_SPINDLE_SYNCHRONIZATION_DEACTIVATE

Deactivate spindle synchronization.

Since
r41179

◆ COMMAND_START_SPINDLE

Integer COMMAND_START_SPINDLE

Spindle start (well-known command M03 or M04). This is a virtual command which maps to either COMMAND_SPINDLE_CLOCKWISE or COMMAND_SPINDLE_COUNTERCLOCKWISE dependent on the current spindle direction.

◆ currentSection

Section currentSection

The current section. This property is unspecified outside onSection() and onSectionEnd() invocations.

◆ cycle

Map cycle

Specifies the current cycle parameters in canned cycle mode.

◆ cycleExpanded

Boolean cycleExpanded

Specifies that a previous cycle point has been expended for the current cycle. Defaults to false.

◆ cycleType

String cycleType

Specifies the type of the current cycle in canned cycle mode.

◆ debugMode

Boolean debugMode

Specifies the debugging mode.

◆ deprecated

Boolean deprecated

Specifies that this version of the engine has been deprecated.

◆ description

String description

Description for the post processor configuration.

◆ end

Vector end

The end position of the current motion.

◆ extension

String extension

The default output extension (defaults to 'nc').

◆ feedrate

Number feedrate

The current feedrate.

◆ filename

String filename

The default filename (defaults to program name).

◆ HIGH_FEED_MAP_XY_Z

Integer HIGH_FEED_MAP_XY_Z

Map rapid travesal not in the X-Y plane or along the Z-axis to high feed.

◆ highFeedMapping

Integer highFeedMapping

Specifies the high feed mapping mode for rapid traversal.

◆ highFeedrate

Number highFeedrate

Specifies the high feedrate for rapid traversal to high feed mapping.

◆ initialCyclePosition

Vector initialCyclePosition

The initial cycle position.

◆ legal

String legal

Legal comment for the post processor configuration.

◆ length

Number length

The length of the current motion.

◆ lineNumber

Integer lineNumber

Specifies the line number in the source document. Will be 0 if the line number is unknown.

◆ machineConfiguration

MachineConfiguration machineConfiguration

The machine configuration.

◆ machineParameters

MachineParameters machineParameters

Machine parameters.

◆ mapToWCS

Boolean mapToWCS

Specifies that the section work plane should be mapped to the WCS. When disabled the post is responsible for handling the WCS and section work plane. By default this is enabled.

This is a special variable, and, therefore, it should be put in a comment, as per example.

// mapToWCS = false;

◆ mapWorkOrigin

Boolean mapWorkOrigin

Specifies that the section origin should be mapped to (0, 0, 0). When disabled the post is responsible for handling the section origin. By default this is enabled.

This is a special variable, and, therefore, it should be put in a comment, as per example.

// mapWorkOrigin = false;

◆ maximumCircularRadius

Number maximumCircularRadius

The maximum circular radius.

◆ maximumCircularSweep

Number maximumCircularSweep

The maximum circular sweep in radians.

◆ minimumChordLength

Number minimumChordLength

The minimum chord length. Not used for full circle motion.

◆ minimumCircularRadius

Number minimumCircularRadius

The minimum circular radius.

◆ minimumCircularSweep

Number minimumCircularSweep

The minimum circular sweep in radians.

◆ minimumRevision

Integer minimumRevision

Specifies the minimum allowed revision of the post processor (defaults to 1).

◆ movement

Integer movement

The current movement type. The supported types are: MOVEMENT_RAPID, MOVEMENT_LEAD_IN, MOVEMENT_CUTTING, MOVEMENT_LEAD_OUT, MOVEMENT_LINK_TRANSITION, MOVEMENT_LINK_DIRECT, MOVEMENT_RAMP_HELIX, MOVEMENT_RAMP_PROFILE, MOVEMENT_RAMP_ZIG_ZAG, MOVEMENT_RAMP, MOVEMENT_PLUNGE, MOVEMENT_PREDRILL, MOVEMENT_FINISH_CUTTING, MOVEMENT_REDUCED, and MOVEMENT_HIGH_FEED.

◆ outputUnit

Integer outputUnit

Specifies the output unit. Set to -1 to use original unit.

◆ plane

Integer plane

The circular plane of the current circular motion (PLANE_INVALID for non-primary planes).

◆ preventPost

Boolean preventPost

Denies post processing.

◆ programName

String programName

The program name.

◆ programNameIsInteger

Boolean programNameIsInteger

Specifies that the program name must be an integer.

◆ properties

Map properties

User-defined properties.

◆ radiusCompensation

Integer radiusCompensation

The current radius compensation mode. The modes are: RADIUS_COMPENSATION_OFF, RADIUS_COMPENSATION_LEFT, and RADIUS_COMPENSATION_RIGHT.

The current radius compensation. Defaults to RADIUS_COMPENSATION_OFF.

◆ revision

Integer revision

Specifies the revision of the post processor.

◆ SINGULARITY_LINEARIZE_LINEAR

Integer SINGULARITY_LINEARIZE_LINEAR

Keep top of tool in line with tool axis during multi-axis singularity linearization.

Since
41535

◆ SINGULARITY_LINEARIZE_OFF

Integer SINGULARITY_LINEARIZE_OFF

Don't linearize moves around multi-axis singularities.

Since
41535

◆ SINGULARITY_LINEARIZE_ROTARY

Integer SINGULARITY_LINEARIZE_ROTARY

Keep rotary axes in line during multi-axis singularity linearization.

Since
41535

◆ spindleAxis

Integer spindleAxis

The spindle axis. Defaults to TOOL_AXIS_Z.

◆ spindleSpeed

Number spindleSpeed

The current spindle speed in RPM. Positive for clockwise direction.

◆ tolerance

Number tolerance

Linearization tolerance.

◆ tool

Tool tool

The current tool.

◆ unit

Integer unit

The output unit (defaults to the specified measurement system in the regional settings).

◆ vendor

String vendor

The vendor of the post processor configuration.

◆ vendorUrl

String vendorUrl

The vendor url of the post processor configuration.

◆ version

String version

Specifies the configuration version (defaults to '1.0').



Generated by Autodesk, Inc. 16 October 2020
Copyright (c) 2012-2020 by Autodesk, Inc.