Anonymous
198 Views, 2 Replies
12-18-2020
02:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-18-2020
02:56 PM
Hey
I'm trying to get the Shopsabre Plasma post to output the X and Y coordinates on each line similar to this:
However when I try to force it at the top in the ,
var xOutput = createVariable({prefix:"X"}, xyzFormat);
var yOutput = createVariable({prefix:"Y"}, xyzFormat);
area I receive three separate coordinates for the G0 lines.
I'm assuming this is because these are global variables. Is there a way to edit the G1, G2, and G3 modals to output both X and Y every time instead of this:
Solved! Go to Solution.
12-18-2020
03:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-18-2020
03:56 PM
You can force X & Y on every block by modifying the xOutput and yOutput definitions at the top of the program to look like this.
// <<< ADD 'force:true'
var xOutput = createVariable({prefix:"X", force:true}, xyzFormat);
var yOutput = createVariable({prefix:"Y", force:true}, xyzFormat);
This may give you duplicate points in the output that you do not want. You can disable duplicate points from being output by adding the following lines to the top of the onRapid and onLinear functions.
function onRapid(_x, _y, _z) { // MODIFY onLinear ALSO
// don't output duplicate points
var currentPosition = getCurrentPosition();
if ((xyzFormat.getResultingValue(_x - currentPosition.x) == 0) && (xyzFormat.getResultingValue(_y - currentPosition.y) == 0)) { // ignore zero length lines
return;
}

Bob Schultz
Sr. Post Processor Developer
12-21-2020
07:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Fusion