I am trying to draw a simple Wafermap which works fine with the following code.
However, when I substitute variables in for the numbers I get a missing reference error and can't for the life of me understand why this is happening. I need some JSL Expert Wisdom
F_makeWaferMap = function({myScale, myWhiteSpace, myWaferDiameter},{},
myKeepOutZone = 2000;
myGraphBox = graphBox(
frameSize( (myWaferDiameter/2)/myScale, (myWaferDiameter/2)/myScale ),
xScale( -myWhiteSpace, myWaferDiameter + myWhiteSpace),
yScale( -myWhiteSpace, myWaferDiameter + myWhiteSpace)
);
frame = myGraphBox[FrameBox(1)];
frame << Add Graphics Script(penColor( "red" ); circle( {150000,150000}, 150000));
frame << Add Graphics Script(penColor( "red" ); circle( {150000,150000}, 150000-2000));
return(myGraphBox);
);
myWmDispObj = F_makeWaferMap(200, 20000, 300000); // Scale, Whitespace, Wafer Diameter
newWindow("Test", vListBox(myWmDispObj));
I am happily making references to the Frame Box as you can see from the log:
So, now lets substitute in some variables.
frame << Add Graphics Script(penColor( "red" ); circle( {myWaferDiameter/2, myWaferDiameter/2}, myWaferDiameter/2));
frame << Add Graphics Script(penColor( "red" ); circle( {myWaferDiameter/2, myWaferDiameter/2}, (myWaferDiameter/2) - myKeepOutZone));
And I get the following Error, suggesting I have lost the reference to my passed in variables when I try to add them to the frame box.
I'm stumped