cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

RayTracing, how to display my ray?

Emilie
1-Newbie

RayTracing, how to display my ray?

Hello,

I would like to display a ray I created, I'm using

ProMdl model;

ProRay ray;

ProError err;

int n_hits;

ProSelection *p_sel;

ProMdlCurrentGet(&model);

ray.start_point[0] = 0.0;

ray.start_point[1] = 0.0;

ray.start_point[2] = 0.0;

ray.dir_vector[0] = 1.0;

ray.dir_vector[1] = 1.0;

ray.dir_vector[2] = 1.0;

ProGraphicsPenPosition( ray.start_point );

ProGraphicsLineDraw( ray.dir_vector );

ProWindowRefresh( -1 );

err = ProSolidRayIntersectionCompute(model, 10.0, &ray, &p_sel, &n_hits);

I though this would be enough but apparently not...

Could you help please?

Thank you!

Emilie


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 REPLY 1
Emilie
1-Newbie
(To:Emilie)

I found it!

The problem is that my vector is way to small to be seen and also it is cleared by the ProWindowRefresh.

Top Tags