casting ProFeature to ProAsmcomppath ?
Hi,
I use ProSolidFeatVisit to get the assembly component, the output data type is <ProFeature>. (i put code below)
Now, I want to get the transformation matrix of two csys,
but , ProAsmcomppathTrfGet need the input <ProAsmcomppath> ,i don't know how to get it.
And is possible to change the ProFeature to ProAsmcomppath?
hope someone can help me.
thanks.
P.S. I don't have the memb_id_tab, so i can't use ProAsmcomppathInit .
the code that get all part
ProError getAsmFeature( ProMdl asm_mdl,ProFeature** appdata)
{
ProError err;
err = ProArrayAlloc(0, sizeof(ProFeature), 1, (ProArray*)appdata);
err = ProSolidFeatVisit((ProSolid)asm_mdl,FeatureVisitActionFn,
FeatureFilterActionFn,(ProAppData)&appdata);
return err;
}
ProError FeatureVisitActionFn(ProFeature *feature,ProError err,ProAppData app_data)
{
ProMdl prtMdl;
ProMdlType p_type;
ProArray *pArray;
pArray=(ProArray*)((ProSurface **)app_data)[0];
err=ProAsmcompMdlGet(feature , &prtMdl);
err=ProMdlTypeGet(prtMdl,&p_type);
if (p_type == PRO_MDL_PART)
{
err=ProArrayObjectAdd(pArray,PRO_VALUE_UNUSED,1,feature);
}
else if (p_type == PRO_MDL_ASSEMBLY)
{
err = ProSolidFeatVisit((ProSolid)prtMdl, FeatureVisitActionFn, FeatureFilterActionFn, app_data);
}
if (feature != NULL) return(PRO_TK_NO_ERROR);
return(PRO_TK_CONTINUE);
}
ProError FeatureFilterActionFn(ProFeature *feature,ProAppData app_data)
{
ProFeattype FeatType;
ProFeatureTypeGet(feature,&FeatType);
if (FeatType==PRO_FEAT_COMPONENT)
return PRO_TK_NO_ERROR;
else
return PRO_TK_CONTINUE;
}

