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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Programmatically create "Seed and Boundary" surface using TOOLKIT

Alok_Bhasme
3-Visitor

Programmatically create "Seed and Boundary" surface using TOOLKIT

Hi all,

I am trying to create a "Seed and Boundary" surface collection using creo toolkit.

I have various APIs such as ProSurfacesCollect(), ProSrfcollectionAlloc() etc.

Can anyone help me out using a code snippet? 

I am attaching the code I have written to create the same.

ProError usercollectsurfaces()
{
ProError status = PRO_TK_GENERAL_ERROR;
ProMessageDisplay(PT_MSGFIL, (char*)"CTT Select Surface");

ProCollection collection;
status = ProSrfcollectionAlloc(&collection);

ProCollectioninstrType types[] = {PRO_SURFCOLL_SEED_N_BND };
ProSelection* coll_sels;
int coll_sels_size;

status = ProSurfacesCollect(types, 0, (ProCollFilter )NULL, (ProAppData )NULL, collection, &coll_sels, &coll_sels_size);
ProMessageClear();


ProSelection* regen_sels;
int n_regen_sels;

ProSrfcollectionRegenerate(collection, &regen_sels, &n_regen_sels);


status = ProCollectionFree(&collection);
status = ProSelectionarrayFree(regen_sels);
status = ProSelectionarrayFree(coll_sels);

return status;

 

}

 

Do I have to use some Buffer here? if yes, which one? Will this API be required?

ProSelbufferSelectionAdd()

 

 

 

0 REPLIES 0
Top Tags