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 an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

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

timy
8-Gravel

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 4
Ketan_Lalcheta
19-Tanzanite
(To:timy)

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

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?

 

Ketan_Lalcheta
19-Tanzanite
(To:timy)

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

FV
17-Peridot
17-Peridot
(To:Ketan_Lalcheta)

Hello all,

 

UV parameters ranging from 0 to 1 are for untrimmed surfaces. Surfaces have contours (ProContour) - one need to check if a point is within a contour boundary... The functions ProSurfaceUvpntVerify() and ProContourUvpntVerify() need to be used. ProContour could be external or internal, so another test needs to be run for this...

 

The easier approach is to tessellate a surface and to use ProTessellationVerticesGet() to get an array of Pro3dPnt.

HIH.

FV.

Announcements


Top Tags