#!filter=enabled;

"Initialize the toolpath",      InitToolpathPass,         "",             all
"Apply the momentum rule",      MomentumRulePass,         "",             all
"Apply the cent accel rule",    CentAccelPass,            "",             all
"Apply extrustion limit rule",  ExtLimitPass,             "",             all
"Apply pre processing rule",    PreProcessPass,           "",             all
"Apply resonance rule",         ResonancePass,            "",             all
"Set final velocity",           SetFinalVelocityPass,     "",             all
"S profile",                    SProfilePass,             "",             all
"Time slice",                   TimeSlicePass,            "",             all
"Impulse Smoothing",            ImpulseSmoothingPass,     "servo",        all
"Flick",                        FlickPass,                "",             all
"PrePump",                      PrePumpPass,              "timeSlice",    all
"Mainflow",                     LiquefierPass,            "",             all
"PrePumpLink",                  PrePumpLinkPass,          "",             all
"Rollback",                     RollbackPass,             "timeSlice",    all
"LimitAccelPass",               LimitAccelPass,           "",             all
"MeltflowBackflowPass",         MeltflowBackflowPass,     "timeSlice",    all
"CalibrationPass",              CalibrationPass,          "useResultInput", all
"Generate PMD commands",        PMDPass,                  "useResultInput;servo", all



#"Generate PMD commands",        PMDPass,                  "",             all
#"Toolpath Statistics",          ToolpathStatisticsPass,   "useResultInput",             all
#"Print Parameters",             PrintParameters,          "",             all
#"DumpToolpathPass",             DumpToolpathPass,         "fmt_hdg=%|1$6| %|2$2| %|4$9| %|5$9| %|7$9| %|15$9| %|14$9| %|13$9| %|28$9| %|29$10| %|30$11| %|38$9| %|39$9| %|40$9| %|41$9| %|42$9| %|43$9| %|44$9| %|45$9| ;fmt_data=%|1$06i| %|2$02X| %|4$9.6f| %|5$9.6f| %|7$9.6f| %|15$9.3f| %|14$9.6f| %|13$9.6f| %|28$9.6f| %|29$10.3e| %|30$10X| %|38$9.6f| %|39$9.6f| %|40$9.6f| %|41$9.3f| %|42$9.6f| %|43$9.6f| %|44$9.3f| %|45$9.3f|",   all
#"Dump Toolpath CMBView",        DumpToolpathCMBViewPass,  "format=cmp;includeFlick;useResultInput",  all
#"Dump Toolpath CMBView",        DumpToolpathCMBViewPass,  "format=vel;includeFlick;useResultInput",  all
#"Dump Toolpath CMBView",        DumpToolpathCMBViewPass,  "format=ext;includeFlick;useResultInput",  all
#"Velocity Stats",               VelocityStatsPass,        "minvel=0.0;maxvel=7.01;bincount=28;mindist=0.0;maxdist=36.0;distbincount=360", all


##################################################################################
#
#       Copyright (c) 2009-2012, Stratasys Inc.
#       All Rights Reserved Worldwide.
#
#       MMC.CDF FILE FOR KAHUKU GENDER
#
################################################################################
#
# History:
# Rev A:  Initial Release
# Rev B:  Changed Prepump, Rollback, and Meltflow to timeslice to avoid bogus acceleration values.     BND 8-28-12
# Rev C:  Added prepump link pass.   BND 2-11-13
#
#
# This file defines the steps that occur when compiling a file, and also define
# options that affect the behavior of the compiler.
#
# The first line of this file provides a means for supplying high level options
# that control the behavior of the compiler as a whole. The options on this line
# are only valid if the first character of the line is '#' and the second "!".
# Available options are:
#
#       option          value           meaning
#       ------          ------          -------
#       filter          enabled         turns on filtering at the pass level
#                                       any other value turns it off
#
# The remaining entries in this file define the compiler passes that will be
# performed. The order of the entries defines the order of the passes. For each
# pass, the fields are defined as follows:
#
#    field   description
#    -----   -----------
#    desc    User description, need not be unique, shows up in error messages.
#    key     Key used to look up pass in shared library.
#    options String defining options that are recognized by a pass. These
#            may be of the form "option=value" or simply "option". The former
#            are stored in an stl map _optionMap and the latter in an 
#            stl list _optionList. Both of these data structures are available
#            to the code in the compiler pass.
#    filter  Describes when the pass should be performed. May contain:
#               all - run this pass on all toolpaths             
#               none - don't run this on any toolpaths
#               toolpath.index - allows specifying particular toolpaths
#               pi
#               toolpath.size
#               toolpath.length
#               toolpath.layerNumber
#               toolpath.layerIndex
#               toolpath.index
#               toolpath.type
#
# Note that passes may appear more than once. Note also that the filter may 
# consist of expressions containing c-style comparison and logical operators.
#
# The following is an example of a compiler pass entry
#
#       "My test pass",  MyTestPass, "debug=on;verbose", toolpath.index > 2 && toolpath.index <= 5
#
# The above example would result run MyTestPass on toolpaths 3, 4 and 5. That
# code would be able to check the value of "debug" in _optionMap and for the
# existence of "verbose" in _optionList.
#
# Some example entries follow:
#
#"S profile",                                    SProfilePass,           "",             all
#"Dump Toolpath begin",                          DumpToolpathPass,       "",             toolpath.index == 237 || toolpath.index == 241
#"Dump Toolpath 1",                              DumpToolpathPass,       "",             toolpath.layerNumber == 1
#"Initialize the toolpath",                      InitToolpathPass,       "",             toolpath.index > 510 && toolpath.index < 535
#
#
# Common sequences of passes for Stepper or Servo motors:
#--------------------------------------------------------
#
# Stepper without impulse smoothing:
#
# "S profile",                    SProfilePass,             "",             all
# "Time slice",                   TimeSlicePass,            "",             all
# "Time slice correction",        TimeSliceCorrectionPass,  "",             all
# "PrePump",                      PrePumpPass,              "",             all
# "Mainflow",                     LiquefierPass,            "",             all
# "Rollback",                     RollbackPass,             "",             all
# "MeltflowBackflowPass",         MeltflowBackflowPass,     "",             all
# "CalibrationPass",              CalibrationPass,          "",             all
# "Generate PMD commands",        PMDPass,                  "useResultInput;stepper",             all
#
# Stepper with impulse smoothing:
#
# "S profile",                    SProfilePass,             "",             all
# "Time slice",                   TimeSlicePass,            "",             all
# "Time slice correction",        TimeSliceCorrectionPass,  "",             all
# "Impulse Smoothing",            ImpulseSmoothingPass,     "stepper",      all
# "PrePump",                      PrePumpPass,              "",             all
# "Mainflow",                     LiquefierPass,            "",             all
# "Rollback",                     RollbackPass,             "",             all
# "MeltflowBackflowPass",         MeltflowBackflowPass,     "",             all
# "CalibrationPass",              CalibrationPass,          "useResultInput",             all
# "Generate PMD commands",        PMDPass,                  "useResultInput;stepper", all
#
# Servo without impulse smoothing:
#
# "S profile",                    SProfilePass,             "",             all
# "Time slice",                   TimeSlicePass,            "",             all
# "PrePump",                      PrePumpPass,              "",             all
# "Mainflow",                     LiquefierPass,            "",             all
# "Rollback",                     RollbackPass,             "",             all
# "MeltflowBackflowPass",         MeltflowBackflowPass,     "",             all
# "CalibrationPass",              CalibrationPass,          "",             all
# "Generate PMD commands",        PMDPass,                  "useResultInput",             all
#
# Servo with impulse smoothing:
#
# "S profile",                    SProfilePass,             "",             all
# "Time slice",                   TimeSlicePass,            "",             all
# "Impulse Smoothing",            ImpulseSmoothingPass,     "servo",        all
# "PrePump",                      PrePumpPass,              "",             all
# "Mainflow",                     LiquefierPass,            "",             all
# "Rollback",                     RollbackPass,             "",             all
# "MeltflowBackflowPass",         MeltflowBackflowPass,     "",             all
# "CalibrationPass",              CalibrationPass,          "useResultInput",             all
# "Generate PMD commands",        PMDPass,                  "useResultInput", all
#
# Debug passes:
# -------------
#
# Without impulse smoothing or calibration (no useResultInput):
#
# "Toolpath Statistics",          ToolpathStatisticsPass,   "",                       all
# "DumpToolpathPass",             DumpToolpathPass,         "fmt_hdg=%|1$6| %|2$2| %|4$9| %|5$9| %|7$9| %|15$9| %|14$9| %|13$9| %|28$9| %|29$10| %|30$9| %|38$9| %|39$9| %|40$9| %|41$9| %|42$9| %|43$9| %|44$9| %|45$9| ;fmt_data=%|1$06i| %|2$02X| %|4$9.6f| %|5$9.6f| %|7$9.6f| %|15$9.3f| %|14$9.6f| %|13$9.6f| %|28$9.6f| %|29$10.3e| %|30$08X| %|38$9.6f| %|39$9.6f| %|40$9.6f| %|41$9.3f| %|42$9.6f| %|43$9.6f| %|44$9.3f| %|45$9.3f|",    toolpath.index==31
# "Dump Toolpath CMBView",        DumpToolpathCMBViewPass,  "format=cmp",             toolpath.layerNumber>20 && toolpath.layerNumber <40
# "Dump Toolpath CMBView",        DumpToolpathCMBViewPass,  "format=ts",              all
# "Dump Toolpath CMBView",        DumpToolpathCMBViewPass,  "format=ext",             all
#
# With impulse smoothing or calibration (useResultInput):
#
# "Toolpath Statistics",          ToolpathStatisticsPass,   "useResultInput",            all
# "DumpToolpathPass",             DumpToolpathPass,         "fmt_hdg=%|1$6| %|2$2| %|4$9| %|5$9| %|7$9| %|15$9| %|14$9| %|13$9| %|28$9| %|29$10| %|30$9| %|38$9| %|39$9| %|40$9| %|41$9| %|42$9| %|43$9| %|44$9| %|45$9| ;fmt_data=%|1$06i| %|2$02X| %|4$9.6f| %|5$9.6f| %|7$9.6f| %|15$9.3f| %|14$9.6f| %|13$9.6f| %|28$9.6f| %|29$10.3e| %|30$08X| %|38$9.6f| %|39$9.6f| %|40$9.6f| %|41$9.3f| %|42$9.6f| %|43$9.6f| %|44$9.3f| %|45$9.3f|",    toolpath.index==31
# "Dump Toolpath CMBView",        DumpToolpathCMBViewPass,  "format=cmp;useResultInput", toolpath.layerNumber>20 && toolpath.layerNumber <40
# "Dump Toolpath CMBView",        DumpToolpathCMBViewPass,  "format=ts;useResultInput",  all
# "Dump Toolpath CMBView",        DumpToolpathCMBViewPass,  "format=ext;useResultInput", all

###############################################################################
# Implementation Trace options
#
# If TP = no, just use Option (ie "pmdGetMaxN;")
# If TP = yes, specify Option and Toolpath Index (ie "calcMaxDist = 34;")
# If preceded by minus sign, the option is on by default. Use this to turn off.
#
###############################################################################
# Pass                          TP      Option
# -----------------             --      -----------------------------------------------
# LiquefierPass                 yes     LiquefierPass, MainflowCalculation
# PrePumpPass                   no      pmdInsertTimeSliceScrewpump
# PrePumpPass                   no      pmdGetMaxN
# ValidateToolpathPass          no      -validateVertexNumbers
# ValidateToolpathPass          no      -validateProfiling
# ValidateToolpathPass          no      -validateSegments

###############################################################################
# DumpToolpathPass format fields
#
# sample: "fmt_hdg=%|1$4| %|2$4| %|14$9|;fmt_data=%|1$4| %|2$4| %|14$9.3|"
#
# The above sample would print the vertex number, profile type and time
#
###############################################################################
# f % getVertexNumber();      // parameter %1%
# f % getProfType();          // parameter %2%
# f % getVarBeadArea();       // parameter %3%
# f % getX();                 // parameter %4%
# f % getY();                 // parameter %5%
# f % getZ();                 // parameter %6%
# f % getVFinal();            // parameter %7%
# f % getVSeg();              // parameter %8%
# f % getVArc();              // parameter %9%
# f % getVCent();             // parameter %10%
# f % getVRes();              // parameter %11%
# f % getVExtLimit();         // parameter %12%
# f % getLen();               // parameter %13%
# f % getTime();              // parameter %14%
# f % getAcc();               // parameter %15%
# f % pmdRegs._t;             // parameter %16%
# f % pmdRegs._x;             // parameter %17%
# f % fmt1616(pmdRegs._xv);   // parameter %18%
# f % fmt1616(pmdRegs._xa);   // parameter %19%
# f % pmdRegs._y;             // parameter %20%
# f % fmt1616(pmdRegs._yv);   // parameter %21%
# f % fmt1616(pmdRegs._ya);   // parameter %22%
# f % pmdcalc.time();         // parameter %23%
# f % x;                      // parameter %24%
# f % y;                      // parameter %25%
# f % pmdcalc.vmag();         // parameter %26%
# f % pmdcalc.amag();         // parameter %27%
# f % getQ();                 // parameter %28%
# f % getV();                 // parameter %29%
# f % vertexFlags;            // parameter %30%
# f % profileTime;            // parameter %31%
# f % pmdTime;                // parameter %32%
# f % pmdRegs._q;             // parameter %33%
# f % fmt1616(pmdRegs._qv);   // parameter %34%
# f % fmt1616(pmdRegs._qa);   // parameter %35%
# f % pmdcalc.q();            // parameter %36%
# f % getQrb();               // parameter %37%
# f % getXResult();           // parameter %38%
# f % getYResult();           // parameter %39%
# f % getVResult();           // parameter %40%
# f % getAResult();           // parameter %41%
# f % getVXResult();          // parameter %42%
# f % getVYResult();          // parameter %43%
# f % getAXResult();          // parameter %44%
# f % getAYResult();          // parameter %45%
