Skip to main content
Solved

Hide raytrace rays between certain objects in the NSC 3D Layout?


joshdfreeman
Ultraviolet
Forum|alt.badge.img

Hi, 

after/during running a raytrace, is there a way to hide the rays that go from one object to another?

I very much need these rays to be in the Path Analysis but would much prefer not to see this subset of rays in the NSC 3D Editor as they obscure everything else in the system. 

To give some context, there’s a source rectangle that needs to be quite a bit larger than the field of primary reflectors and detectors. I put a “ground plane” detector roughly the same size as the source rectangle behind everything else and I need to determine how much energy is hitting this “ground plane” detector. The problem for the NSC 3D Editor is there’s to many of these rays hitting the “ground plane” and I can’t see the details of the light hitting the other objects in the system.

 

Thanks!

Best answer by MichaelH

Hi Josh,

Since you want to hide all the rays hitting a certain object in the NSC 3D Layout, you can simply use a filter string with “H” for hitting the object and the exclamation point (!) negate/exclude those rays.  If the “ground plane” is object 2, then the Filter String for the NSC 3D Layout would be:

!H2

In general though, you cannot hide segments of a ray, you can only hide the entire ray itself (children rays upon splitting can be considered a new “ray” for most Filter Strings).  If you want to hide a segment of a ray (i.e., if a ray hits objects A-B-C-D and you want to hide segments between B-C), you will need to parse the ZRD via the API, remove the undesired segments, and then treat downstream segments as a new ray.  In the A-B-C-D example, you would terminate the ray after it hits A-B and then create a new ray with the XYZ/LMN values for the C-D segment.  This is non-trivial and I would suggest sticking to Filter Strings as much as possible. 

View original
Did this topic help you find an answer to your question?

8 replies

MichaelH
Ansys Staff
Forum|alt.badge.img+2
  • Ansys Staff
  • 342 replies
  • Answer
  • May 13, 2022

Hi Josh,

Since you want to hide all the rays hitting a certain object in the NSC 3D Layout, you can simply use a filter string with “H” for hitting the object and the exclamation point (!) negate/exclude those rays.  If the “ground plane” is object 2, then the Filter String for the NSC 3D Layout would be:

!H2

In general though, you cannot hide segments of a ray, you can only hide the entire ray itself (children rays upon splitting can be considered a new “ray” for most Filter Strings).  If you want to hide a segment of a ray (i.e., if a ray hits objects A-B-C-D and you want to hide segments between B-C), you will need to parse the ZRD via the API, remove the undesired segments, and then treat downstream segments as a new ray.  In the A-B-C-D example, you would terminate the ray after it hits A-B and then create a new ray with the XYZ/LMN values for the C-D segment.  This is non-trivial and I would suggest sticking to Filter Strings as much as possible. 


joshdfreeman
Ultraviolet
Forum|alt.badge.img
  • Author
  • Ultraviolet
  • 34 replies
  • May 15, 2022

Thanks Michael, 

that works perfect! No need to deal with segments, the whole ray is enough. 

Thanks again,

Josh


joshdfreeman
Ultraviolet
Forum|alt.badge.img
  • Author
  • Ultraviolet
  • 34 replies
  • May 21, 2022

Follow up question - how can I hide all the rays that only go between two objects. I’m not looking to exclude those “segments” of a ray, just the complete rays that start at one object and end at another. I would still like to see complete rays that start at the same object and end at the same object, but also reflect off other objects on the way.


joshdfreeman
Ultraviolet
Forum|alt.badge.img
  • Author
  • Ultraviolet
  • 34 replies
  • January 10, 2024

Hi, 

is there an easy way to hide ALL the rays, so I can just see the objects?

Thanks!


joshdfreeman
Ultraviolet
Forum|alt.badge.img
  • Author
  • Ultraviolet
  • 34 replies
  • January 11, 2024

Turns out it’s “#0”, which is display no rays :)


Sean Turner
Ultraviolet
Forum|alt.badge.img+1
  • Ultraviolet
  • 88 replies
  • January 11, 2024

I don’t believe #0 is a valid filter string, and as such results in no rays being shown. You can enter any string of characters that does not evaluate to a defined filter string flag to hide all rays. This behavior is not explicitly stated in the help file, but from practice seems to be true. 


joshdfreeman
Ultraviolet
Forum|alt.badge.img
  • Author
  • Ultraviolet
  • 34 replies
  • January 14, 2024

Thanks Sean, helpful response!


Mark.Nicholson
Luminary
Forum|alt.badge.img+3

If you don’t want to see any rays, just set Layout Rays on the Source object to zero


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings