Skip to main content
3-Newcomer
May 18, 2023
Question

Programmatically create "Seed and Boundary" surface using TOOLKIT

  • May 18, 2023
  • 0 replies
  • 1035 views

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