/*====================================================================*\
Function : ProTestExtFeatRefProcess()
Purpose :
\*====================================================================*/
ProError ProTestExtFeatRefProcess( ProExtFeatRef ref)
{
ProError err = PRO_TK_NO_ERROR;
ProRefState state = PRO_REF_ACTIVE;
ProType type;
ProAsmcomppath own_comp, ref_comp;
ProSolid solid;
ProFeature feature;
ProModelitem modelitem;
own_comp.table_num = ref_comp.table_num = 0;
feature.type = PRO_TYPE_UNUSED;
modelitem.type = PRO_TYPE_UNUSED;
err = ProExtRefStateGet ( ref, &state);
TEST_CALL_REPORT ("ProExtRefStateGet()",
"ProTestExtFeatRefProcess()", err ,
err != PRO_TK_NO_ERROR);
err = ProExtRefTypeGet ( ref, &type);
TEST_CALL_REPORT ("ProExtRefTypeGet()",
"ProTestExtFeatRefProcess()", err ,
err != PRO_TK_NO_ERROR);
err = ProExtRefAsmcompsGet (ref, &own_comp, &ref_comp);
TEST_CALL_REPORT ("ProExtRefAsmcompsGet()",
"ProTestExtFeatRefProcess()", err ,
err != PRO_TK_NO_ERROR);
/* if (ref_comp.table_num != 0)
{
ProTKFprintf (qcr_ref, "owner's asmcomppath model:\n");
err = ProTestSolidInfoWrite (qcr_ref, own_comp.owner);
ProTKFprintf (qcr_ref, "Reference's asmcomppath model:\n");
err = ProTestSolidInfoWrite (qcr_ref, ref_comp.owner);
}
*/
//ProTKFprintf (qcr_ref, "Owner's asmcomppath:\n");
/* for (i=0; i<own_comp.table_num; i++)*/
//ProTKFprintf (qcr_ref, "%d ", own_comp.comp_id_table[i]);
// ProTKFprintf (qcr_ref, "\nReference's asmcomppath:\n");
// for (i=0; i<ref_comp.table_num; i++)
ProTKFprintf (qcr_ref, "%d ", ref_comp.comp_id_table[i]);
err = ProExtRefOwnMdlGet (ref, &solid);
TEST_CALL_REPORT ("ProExtRefOwnMdlGet()",
"ProTestExtFeatRefProcess()", err ,
err != PRO_TK_NO_ERROR);
// ProTKFprintf (qcr_ref, "\nOwner model:\n");
//err = ProTestSolidInfoWrite (qcr_ref, solid);
err = ProExtRefMdlGet (ref, &solid);
TEST_CALL_REPORT ("ProExtRefMdlGet()",
"ProTestExtFeatRefProcess()", err ,
err != PRO_TK_NO_ERROR);
// ProTKFprintf (qcr_ref, "Reference model:\n");
// err = ProTestSolidInfoWrite (qcr_ref, solid);
err = ProExtRefOwnFeatGet (ref, &feature);
TEST_CALL_REPORT ("ProExtRefOwnFeatGet()",
"ProTestExtFeatRefProcess()", err ,
err != PRO_TK_NO_ERROR);
if (feature.type != PRO_TYPE_UNUSED)
{
//ProTKFprintf (qcr_ref, "Owner feature ID: %d\n", feature.id);
//ProTKFprintf (qcr_ref, "Owner feature type: %d\n", feature.type);
/* err = ProTestSolidInfoWrite (qcr_ref, (ProSolid)feature.owner);*/
}
err = ProExtRefFeatGet (ref, &feature);
TEST_CALL_REPORT ("ProExtRefFeatGet()",
"ProTestExtFeatRefProcess()", err ,
err != PRO_TK_NO_ERROR);
if (feature.type != PRO_TYPE_UNUSED)
{
//ProTKFprintf (qcr_ref, "Reference feature ID: %d\n", feature.id);
//ProTKFprintf (qcr_ref, "Reference feature type: %d\n", feature.type);
// err = ProTestSolidInfoWrite (qcr_ref, (ProSolid)feature.owner);
}
err = ProExtRefModelitemGet (ref, &modelitem);
TEST_CALL_REPORT ("ProExtRefModelitemGet()",
"ProTestExtFeatRefProcess()", err ,
err != PRO_TK_NO_ERROR);
ProName name;
err = ProModelitemNameGet(&modelitem,name);
ASSERT_STATUS(err);
if (modelitem.type != PRO_TYPE_UNUSED)
{
/*ProTKFprintf (qcr_ref, "Reference modelitem ID: %d\n", modelitem.id);
ProTKFprintf (qcr_ref, "Reference modelitem type: %d\n", modelitem.type);*/
}
return (err);
}