Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Solidify doesn’t work

würfel

New member
Hi,


this might be my last question here ;-)


I havea surface that intersects a solid (all edges are outside of the solid) and I want to create a solidify feature (surface cuts material from the solid).


------------------------------------------------------------ -----------------------


int UserSolidifyCreate()
{
ProError status;
ProMdl model;

ProSelection *sel1, *sel2;
int n_sel1, n_sel2;
ProFeature solidify_feature;


ProElement elem_feature_tree;
ProElement elem_feature_type;
ProElement elem_feature_form;
ProElement elem_patch_quilt;
ProValue value;
ProValueData value_data;

ProFeatureCreateOptions options[1];
ProErrorlist errors;


ProMessageDisplay (UserMsg, "USER Select Patch Quilt");
status = ProSelect("feature", 1, NULL, NULL, NULL, NULL, &sel1, &n_sel1);
if(status != PRO_TK_NO_ERROR)
return(0);

//Create the root of the element tree.
ProElementAlloc (PRO_E_FEATURE_TREE, &elem_feature_tree);


//Allocate the feature type element.
ProElementAlloc (PRO_E_FEATURE_TYPE, &elem_feature_type);
value_data.type = PRO_VALUE_TYPE_INT;
value_data.v.i = PRO_FEAT_CUT;
ProValueAlloc (&value);
ProValueDataSet (value, &value_data);
ProElementValueSet (elem_feature_type, value);
ProElemtreeElementAdd (elem_feature_tree, NULL, elem_feature_type);


//Allocate the feature form element.
ProElementAlloc (PRO_E_FEATURE_FORM, &elem_feature_form);
value_data.type = PRO_VALUE_TYPE_INT;
value_data.v.i = PRO_USE_SURFS;
ProValueAlloc (&value);
ProValueDataSet (value, &value_data);
ProElementValueSet (elem_feature_form, value);
ProElemtreeElementAdd (elem_feature_tree, NULL, elem_feature_form);


//Allocate the patch quilt element.//CASE_6
ProElementAlloc (PRO_E_PATCH_QUILT, &elem_patch_quilt);
value_data.type = PRO_VALUE_TYPE_SELECTION;
value_data.v.r = sel1[0];
ProValueAlloc (&value);
ProValueDataSet (value, &value_data);
ProElementValueSet (elem_patch_quilt, value);
ProElemtreeElementAdd (elem_feature_tree, NULL, elem_patch_quilt);


//Allocate the patch type element.
/*
optional
*/


//Allocate the patch material side element.
/*
optional*/


//Allocate the feature name element.
/*
optional
*/


//Create Feature.
ProMdlCurrentGet (&model);
options[0]= PRO_FEAT_CR_FIX_MODEL_ON_FAIL;
ProFeatureCreate(model, elem_feature_tree, options, 1, &solidify_feature,&errors);



return(0);
}


------------------------------------------------------------ -------------


In Pro/Engineer, I can select the surface but then noting happens. Anyone an idea why this doesn't work? Do I have to get the surface information from the selected feature?


Thank you very much, w
 
Ok, it works now. It has to be "dtmqlt" in ProSelect and not "feature".


But now I have a new problem:


I want pro/toolkit to select the surface automatically and not with:


ProSelect("surface", 1, NULL, NULL, NULL, NULL, &sel1, &n_sel1);


How do I do that? I have the feature, its name and id, but how do I get the "surface" information that I get so easly with ProSelect? In the end I have to use ProSelectionAlloc, thats clear, but how do I get the modelitem that is required there from the surface-feature?


Thanks a lot for any help!<edited><editID>w
 

Sponsor

Articles From 3DCAD World

Back
Top