How does one do a bulk raytrace in ZPL, similar to pressing the “Ray Trace” button in regular, non-sequential mode. From the help files, it looks like RAYTRACE and RAYTRACEX only traces one particular ray, which is not useful for determining the total illumination on a detector. Thanks!
Best answer by David.NguyenView original
The Keyword you are looking for is NSTR (more details in the Help File under The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > NSTR) and its syntax is as follow:
NSTR surf, source, split, scatter, usepolar, ignore_errors, random_seed, save, savefilename, filter, zrd_format
The last four parameters are optional. Surf should be 1 for pure non-sequential systems. If source is zero, it traces all sources otherwise it traces the corresponding source. The following parameters are the usual checkbox for your raytrace, and if random_seed is zero, I think the random_seed is randomly generated somehow (meaning every raytrace will be different).
The other Numeric Function that is helpful to use in conjunction with NSTR is NSDD, this function can be used similarly to the NSDD operand, and is often used to clear the detectors before running the raytrace as follows:
NSDD(1, 0, 0, 0)
NSTR 1, 0, 0, 0, 0, 1, 0
You can find more information about NSDD (the numeric function) under The Programming Tab > About the ZPL > Numeric Functions in the Help File.
Let me know if this is clear, and take care,
Thanks again David, big help!
My pleasure, any time Josh.