[MOAB-dev] ray_intersect_sets function

hongjun at mcs.anl.gov hongjun at mcs.anl.gov
Mon Mar 15 21:33:20 CDT 2010


I tried to run "ray_fire_test" with sphere, but I only can get one intersection per surface.

Could you please explain more how you tested it?
Did you get any case that the number of intersected distances/surfaces/facets are more than 1?

Since "MBOrientedBoxTreeTool::ray_intersect_sets" just find one leaf tree node intersected and check intersection test with triangles in the node, I think there can not be more than 1 intersections per surface.

Hong-Jun


----- Original Message -----
From: "Brandon Smith" <bsmith82 at yahoo.com>
To: hongjun at mcs.anl.gov
Cc: moab-dev at mcs.anl.gov
Sent: Saturday, March 13, 2010 10:53:24 PM GMT -06:00 US/Canada Central
Subject: Re: [MOAB-dev] ray_intersect_sets function

Hi Hong-Jun,

I like to use the ray_fire_test that Steve recently improved. 

As a quick check, I was able to determine both intersections of a ray passing through a spherical surface. In Cubit I created a spherical volume, with one surface. I used ray_fire_test to cast a ray through the sphere (in one side, out the other). I set the tolerance in MBOrientedBoxTreeTool::ray_intersect_sets to a very large number. 

This worked as desired and I found both intersections in a single surface meshset.

Brandon


----- Original Message ----
From: "hongjun at mcs.anl.gov" <hongjun at mcs.anl.gov>
To: Brandon Smith <bsmith82 at yahoo.com>
Cc: moab-dev at mcs.anl.gov
Sent: Sat, March 13, 2010 9:57:25 PM
Subject: Re: [MOAB-dev] ray_intersect_sets function

Thank you for your reply.

I used "min_tolerance_intersections" as 20000 which is large enough.

I think "ray_intersect_sets" finds an intersected box of leaf tree node and then, triangles only in the leaf tree node are checked for intersection again.
"min_tolerance_intersections" is used just for the latter triangle intersection check as a maximum number of intersection checks.
Therefore, only one intersection per geometry surface meshset is found.

If it is correct and it is not intended, I will change it.
Thanks.

Hong-Jun


----- Original Message -----
From: "Brandon Smith" <bsmith82 at yahoo.com>
To: hongjun at mcs.anl.gov, moab-dev at mcs.anl.gov
Sent: Friday, March 12, 2010 6:23:11 PM GMT -06:00 US/Canada Central
Subject: Re: [MOAB-dev] ray_intersect_sets function

Hi Hong-jun,

If I remember correctly (which I may not), this function returns up to min_tolerance_intersections outside of the tolerance distance, and all intersections inside of the tolerance distance. This is an optimization for particle tracking where in general, only the closest intersection is desired.

If you want all intersections, set the tolerance larger than the maximum extent of your geometry. Alternatively, set min_tolerance_intersections to a large number.

Brandon


----- Original Message ----
From: "hongjun at mcs.anl.gov" <hongjun at mcs.anl.gov>
To: moab-dev at mcs.anl.gov
Sent: Fri, March 12, 2010 5:30:44 PM
Subject: [MOAB-dev] ray_intersect_sets function

Hi! All

I have a question about ray tracing function,

MBOrientedBoxTreeTool::ray_intersect_sets( 
                                    std::vector<double>& distances_out,
                                    std::vector<MBEntityHandle>& sets_out,
                                    std::vector<MBEntityHandle>& facets_out,
                                    MBEntityHandle root_set,
                                    double tolerance,
                                    unsigned min_tolerace_intersections,
                                    const double ray_point[3],
                                    const double unit_ray_dir[3],
                                    const double* ray_length, 
                                    TrvStats* accum );

When I use this function, it just returns one intersection distance/set/facet for sphere or curved surfaces.
Is it a bug or is it intended?
Otherwise, am I using incorrectly?

Could any body give me some advices for me?
Thanks.

Hong-Jun


      


More information about the moab-dev mailing list