Skip to main content

I want to produce an animation of a non-sequential model.  The only way I know to do this is based upon a Knowledge Base article: ( Link to Article ).  Based upon the article, I can grab snapshots of the analysis window and store these as “frames” and later animate them.

A non-sequential model can take a while to trace.  Lightning Trace can dramatically speed this up.  However, there are several issues:

  1. Lightning Trace does not seem available through the ZPL.  A script cannot execute lightning trace and update the graphics window.
  2. If an NSC Shaded Model window is used, and the settings are adjusted to Use LightningTrace, then all my rays turn black, obscuring the view of the detector where I want the person viewing the animation to see the illumination.

Are there alternatives that enable a Lightning Trace to operate such that an animation can be created?

Changing Display Mode to Lightning Trace
Black Rays Obscure Detector Results

 

Hello Brian

  • I have checked and you are right, there is no keywords or functions for the Lightning Trace in ZPL. So I think that a solution could be to work with the Interactive Extension, either in Python or Matlab. You could run a Lightning Trace from there.

    MyLightningTrace = TheSystem.Tools.OpenLightningTrace();

    //MyLightningTrace.LTRaySampling

    //MyLightningTrace.LTEdgeSasmpling

    MyLightningTrace.RunAndWaitForCompletion();


    The advantage of the Interactive Extension is that it loads our graphic libraries. Then you could create a ZPLM operand that saves the shaded model window.
    In ZOS-API, you can just call that ZPLM with:

    TheSystem.MFE.GetOperandValue
     
  • In the Detector Viewer, there is a setting for the Detector and a setting for the rays.
    For the Detector, if you set it to Color Pixel by Last Analysis, when you run a raytrace with Lightning Trace, the detector will be updated with the Lightning Trace Results.
    For the rays, by default these are the standard layout rays (I would leave this setting). The two other options will show rays from the LightingTrace mesh. You can’t change the color of the two other options. In your case, the rays are probably not in the visible. If you want to display less rays, you can simply add a filter like for example {#10}. It will show the first 10 rays.
     

Let us know if that helps or not. Thank you.


Reply