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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to use the function ProSurfaceTessellationGet

mlee-9
1-Visitor

How to use the function ProSurfaceTessellationGet

My program is as follow:

ProSurfaceInit(owner,model_item.id,&surface);

ProSurfacetessellationinputAlloc(&input);              

ProSurfacetessellationinputStepsizeSet(input,0.02);     

ProSurfacetessellationinputChordheightSet(input,0.01);   

ProSurfacetessellationinputAnglecontrolSet(input,0.0);   

ProSurfacetessellationinputUvprojectionSet(input,PRO_SRFTESS_DEFAULT_PROJECTION,NULL);

ProSurfaceTessellationGet(surface,input,&tessellation);

ProTessellationVerticesGet(tessellation, &p_points);

when the program go on the function ProSurfaceTessellationGet ,there is something wrong,PRO_TK_GENERAL_ERROR,‌see the online help ,it means The function could not generate the tessellation for the input surface.


it bothers me for several days,so I really really need someone's help.

2 REPLIES 2
FV
17-Peridot
17-Peridot
(To:mlee-9)

Hello all,

Meng, I would do something like this to pinpoint angle and chord values:

ProSurfacetessellationinputUvprojectionSet(input,PRO_SRFTESS_DEFAULT_PROJECTION,NULL);

double step = 0.02; //???

ProSurfacetessellationinputStepsizeSet(input,step);     

double chord = 0.01;

double angle = 0.25;

ProSurfacetessellationinputChordheightSet(input,chord);   

ProSurfacetessellationinputAnglecontrolSet(input,angel);   

int iterations = 20;

ProBoolean success = PRO_B_FALSE;

for ( int i = 0; i < iterations; ++i ) {

if( PRO_TK_NO_ERROR == ProSurfaceTessellationGet(surface,input,&tessellation)){

success == PRO_B_TRUE;

break;

}

chord *= 2.0;

angle *= 2.0;

ProSurfacetessellationinputChordheightSet(input,chord);  

ProSurfacetessellationinputAnglecontrolSet(input,angel);  

}

if( PRO_B_TRUE == success)

ProTessellationVerticesGet(tessellation, &p_points);

HIH.

Feliks.

mlee-9
1-Visitor
(To:FV)

hello Feliks,

     Thank you for your advice. and I have  been tried  debug as your way,I understand your method is very effective to improve the accuracy of tessellation. but there are still other problems,maybe something I mistake. I'll try it again.

     I have another question ,the parameter of the SurfaceTessellationInput how to affect the type of surface? I have tried to set the Stepsize and chordheight to match the different type of surface e.g. the plane the spherical etc.but my program occurs debugging fault.

    If I do in  sample way, it could be success,but the function ProSurfaceTessellationGet always be PRO_TK_GENERAL_ERROR,can you tell me why?

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags