访问基准轴
ProSolidAxisVisit() --遍历零件或者组件中的基准轴
ProAxisIdGet() --获取基准轴的标识符
ProAxisInit() --初始化基准轴的句柄,该句柄是一个模糊句柄.
ProGeomitemFeatureGet() --取回几何元素所创建的特征。
ProAxisSu易做图ceGet() --获取指定的轴所属的曲面句柄。
ProAxisToGeomitem()--将指定的基准轴句柄转换为几何元素句柄
从上面的函数组就可以访问到指定的基准轴所属的特征。
/*=========================================================================*\
Function: ProUtilCollectSolidAxis()
转载请注明出处:http://blog.csdn.net/jh2005
Purpose: 返回实体中的基准轴列表
Returns: PRO_TK_NO_ERROR - 成功;
PRO_TK_BAD_INPUTS - 无效的参数
\*=========================================================================*/
ProError ProUtilCollectSolidAxis(
ProSolid p_solid, /* In: 实体的句柄*/
ProAxis **p_axis /* Out:基准轴的返回值,本函数进行了内存分配,
但是没有回收,必须用ProArrayFree()
进行内存回收。 */
)
{
ProError status;
if( p_axis != NULL )
{
status = ProArrayAlloc( 0, sizeof(ProAxis), 1, (ProArray*)p_axis );
if( status == PRO_TK_NO_ERROR )
{
status = ProSolidAxisVisit( p_solid,
(ProAxisVisitAction)ProUtilCollect3ParamOpaqueVisitAction,
(ProAxisFilterAction)ProUtilDefaultFilter,
(ProAppData)&p_axis );
if( status != PRO_TK_NO_ERROR )
{
ProArrayFree( (ProArray*)p_axis );
*p_axis = NULL;
}
}
}
else
status = PRO_TK_BAD_INPUTS;
return (status);
}
ProError ProUtilCollect2ParamDBVisitAction(
void *p_object, /* In: The pointer to the object
being visited */
ProAppData app_data) /* In: In fact it's ProArray** */
{
ProError status;
ProArray *p_array;
p_array = (ProArray*)((void**)app_data)[0];
status = ProArrayObjectAdd(p_array, PRO_VALUE_UNUSED, 1, p_object );
return (status);www.zzzyk.com
}
ProError ProUtilCollect3ParamOpaqueVisitAction(
void *p_object, /* In: The opaque handle being visited */
ProError status, /* In: The status returned by filter func */
ProAppData app_data) /* In: In fact it's ProArray** */
{
return (ProUtilCollect2ParamDBVisitAction((void*)&p_object, app_data));
}
ProError ProUtilDefaultFilter()
{
return (PRO_TK_NO_ERROR);
}