Home
Reply
Contributor
Shaib
Posts: 15

Need help with the rays

[ Edited ]

Dea all,

 

I need to know what is the type of the Entity the ray hit

 

 

for simple ex ..

 

 

        BODY* block;

        api_solid_block(SPAposition(0, 0, 0), SPAposition (100, 100, 100), block);

 

        SPAposition ray_pos = SPAposition(50, 50, 50);

 

        SPAunit_vector ray_dir = normalise(SPAvector(-70,-70,-70));

        ENTITY_LIST results;

    

         double* params = NULL;

          // 0.1 = ray radius, 1 = number of hits wanted

        api_ray_test_body(ray_pos, ray_dir, 0.1, 1, block, results, params);

 

 

if (results.count() != 0)

        {

 

   // I need to know what did the ray hit (face, Edge, Coedge ..etc)

   // then I need to ask if this ray hit face ( keep the ray and do something)

 

        }

Spatial Employee
asdf
Posts: 93

Re: Need help with the rays

Dear Shaib

 

Please see the page http://doc.spatial.com/qref/ACIS/html/group__ACISQUERIES.html#g6420c1d574d288564bb7de855d59408c  in the Spatial documentation.  As it details, the functionality you need is declared in the file acistype.hxx.

 

best regards

 

Eric

Contributor
Shaib
Posts: 15

Re: Need help with the rays

Thanks Eric for your quick response.