User Tools


Photonic3D controls the printing process via G-code templates for the firmware commands, and JavaScript calculators for computing the movement and exposure parameters based on a variety of available input values.

More documentation about this is available in the old GitHub wiki.

All calculators can use these variables:

  1. `now` = The current time and date as a java.util.Date.
  2. `$shutterOpen` = The state of whether the shutter should be open at the time this gcode executes.
  3. `$bulbHours` = The number of hours that your projector's bulb has been turned on. (Your projector must support this feature)
  4. `$CURSLICE` = Zero based index of the current slice being shown on your light source.
  5. `$LayerThickness` = The height in MM of the each slice.
  6. `$ZDir` = The direction that printer prints 1=Bottom_Up -1=Top_Down
  7. `$ZLiftRate` = The speed that the printer moves in mm per second.(This can be dynamic based on calculators)
  8. `$ZLiftDist` = The distance that the printer will move when performing a pear sequence.(This can be dynamic based on calculators)
  9. `$buildAreaMM` = The surface area of the platform that is covered by lighted pixels measured in MM square.
  10. `$LayerTime` = The amount of time to spend on exposing a layer with the light source measured in MM.(This can be dynamic based on calculators)
  11. `$FirstLayerTime` = The amount of time to spend exposing the “first” layers with the light source measured in MM.
  12. `$NumFirstLayers` = The number of “first” layers to be exposed with the “FirstLayerTime” variable above.
  13. `$SlideTiltVal` = A variable that means nothing to Photonic3D. (yet)
  14. `$buildPlatformXPixels` = The count of pixels from left to right.
  15. `$buildPlatformYPixels` = The count of pixels from top to bottom.
  16. `pixelsPerMMX` = The number of pixels(from left to right) that are in a single MM as defined and calibrated with your light source on the printer controls page.
  17. `pixelsPerMMY` = The number of pixels(from top to bottom) that are in a single MM as defined and calibrated with your light source on the printer controls page.
  18. `hostProperties` = A variable that contains all of the settings that Photonic3D has been setup with from it's config.properties file.
  19. `job` = A variable(org.area515.resinprinter.job.PrintJob) that contains all information related to the print job that this gcode is being executed.
  20. `printer` = A variable(org.area515.resinprinter.printer.Printer) that contains all the information related to the printer and it's related configuration that this gcode is being executed.

When run from an imaging context(Base Platform Calculator, Image Manipulation Calculator and AffineTransform Calculator) you have further variables that you can use:

  1. `buildPlatformImage` = A variable that allows the user to make modifications directly to the build platform image with java.awt.image.BufferedImage.
  2. `buildPlatformGraphics` = A variable that allows the user to make modifications directly to the build platform graphics context using a java.awt.Graphics2D.
  3. `buildPlatformRaster` = A variable that allows the user to set individual pixels on the build platform using a java.awt.image.WritableRaster.
  4. `printImage` = A variable that allows the user to make modifications directly to the printable image itself with java.awt.image.BufferedImage.
  5. `printGraphics` = A variable that allows the user to make modifications directly to the printable graphics context using a java.awt.Graphics2D.
  6. `printRaster` = A variable that allows the user to set individual pixels using a java.awt.image.WritableRaster.
  7. `centerX` = $buildPlatformXPixels / 2
  8. `centerY` = $buildPlatformYPixels / 2

When run from an Image Manipulation Calculator, you have one extra variable to use:

  1. `affineTransform` = This transform is built based upon the return value of the Image Transformation Calculator. This means that it can only be available in the Image Manipulation Calculator

When a 2 dimensional file is printed, the Base Platform Calculator can use this variable:

  1. `totalPlatformSlices` = The total number of slices to use for the base platform.