Skip to main content
1-Visitor
Jul 26, 2018 1:15 PM UTC
Question

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

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);

        }

    }

-----

 

4 replies

2-Explorer
Jul 27, 2018 4:11 AM UTC

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

Translate
timy1-VisitorAuthor
1-Visitor
Jul 27, 2018 4:53 AM UTC

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?

 

Translate
2-Explorer
Jul 31, 2018 6:09 AM UTC

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..

Translate