Skip to main content
1-Visitor
July 26, 2018
Question

Is it possible to get each point on surface by UV point?

  • July 26, 2018
  • 1 reply
  • 2308 views

what I want to do is extracting surface data by ProSurfaceDataGet.

then transfer the UV point to XYZpoint.

after that, transferring  XYZ point according to assembly coordinate system.

 

Below is my concept of getting each point on a surface.

However,  I'm not sure if the XYZ point is the exact point on the surface.

 

--


err=ProSurfaceDataGet(SurfsArray,&surf_data);
for(int U=0;U<50;U++)
{
    for(int V=0;V<50;V++)
    {
        double v_temp_test;
        v_temp_test=(surf_data->data.p_surface_data->uv_max[1]-surf_data->data.p_surface_data->uv_min[1])/10;
        double u_temp_test;
        u_temp_test=(surf_data->data.p_surface_data->uv_max[0]-surf_data->data.p_surface_data->uv_min[0])/10;
        test_uv[0]=surf_data->data.p_surface_data->uv_min[0]+u_temp_test*U;
        test_uv[1]=surf_data->data.p_surface_data->uv_min[1]+v_temp_test*V;
        err=ProSurfaceXyzdataEval(SurfsArray,test_uv,xyz_point1,NULL,NULL,NULL);
        err=ProPntTrfEval(xyz_point1,start_transformation_part,out_trans_point);

        }

    }

-----

 

1 reply

1-Visitor
July 27, 2018

One should range from 0 to 1 for U and V with interval 0.01 (as lower value as you want, but iteration wili increase)

 

You can check status of uv point (and hence XYZ point) on surface with the help of API ProSurfaceUvpntVerify().

 

For example, take two scenarios... 1. there is a hole at center of the surface and 2. No hole on surface. Check API behaviour for uv point as u =0.5 and V =0.5. 

 

- HIH

Ketan

timy1-VisitorAuthor
1-Visitor
July 27, 2018

But what is that means when I used ProSurfaceDataGet to get the surface uv_max and uv_min, the value does not range from 0-1?

 

1-Visitor
July 31, 2018

You might be talking about max and min point. I guess ProUvParam          uv_min,uv_max.

 

ASAIK, uv_max is max point with UV as 1,1 and uv_min is min point with UV as 0,0. Range of U and V varies from 0 to 1.

 

This is my understanding. If anyone or you find something different, please share it..