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