⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utilcollect.c

📁 Pro.TOOLKIT.Wildfire插件设计.配套光盘-141M.zip
💻 C
📖 第 1 页 / 共 5 页
字号:
    {	status = ProArrayAlloc( 0, sizeof(ProCsys), 1, (ProArray*)p_csys );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectSolidCsys()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProCsysVisitAction", "ProCsysFilterAction" )	    status = ProSolidCsysVisit( p_solid, 		(ProCsysVisitAction)ProUtilCollect3ParamOpaqueVisitAction,                (ProCsysFilterAction)ProUtilDefaultFilter,                (ProAppData)&p_csys );	    TEST_CALL_REPORT("ProSolidCsysVisit()", 		"ProUtilCollectSolidCsys()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_csys );		*p_csys = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);}/*=========================================================================*\    Function:	ProUtilCollectSolidAxis()    Purpose:	Return a list of axis which belong to the solid    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectSolidAxis(     ProSolid	    p_solid,	    /* In:  The handle to the solid */    ProAxis	    **p_axis	    /* Out: ProArray with collected axis . 					    The function allocates memory 					    for this argument, but you must 					    free it. To free the memory, 					    call the function ProArrayFree()*/){    ProError	    status;    if( p_axis != NULL )    {	status = ProArrayAlloc( 0, sizeof(ProAxis), 1, (ProArray*)p_axis );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectSolidAxis()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProAxisVisitAction", "ProAxisFilterAction" )	    status = ProSolidAxisVisit( p_solid, 		(ProAxisVisitAction)ProUtilCollect3ParamOpaqueVisitAction,                (ProAxisFilterAction)ProUtilDefaultFilter,                (ProAppData)&p_axis );	    TEST_CALL_REPORT("ProSolidAxisVisit()", 		"ProUtilCollectSolidAxys()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_axis );		*p_axis = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);}/*=========================================================================*\    Function:	ProUtilCollectSolidQuilts()    Purpose:	Return a list of quilts which belong to the solid    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectSolidQuilts(     ProSolid	    p_solid,	    /* In:  The handle to the solid */    ProQuilt	    **p_quilts	    /* Out: ProArray with collected quilts . 					    The function allocates memory 					    for this argument, but you must 					    free it. To free the memory, 					    call the function ProArrayFree()*/){#ifndef PT_PRODUCTS_BUILD    ProError	    status;    if( p_quilts != NULL )    {	status = ProArrayAlloc( 0, sizeof(ProQuilt), 1, (ProArray*)p_quilts );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectSolidQuilts()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProQuiltVisitAction", "ProQuiltFilterAction" )	    status = ProSolidQuiltVisit( p_solid, 		(ProQuiltVisitAction)ProUtilCollect3ParamOpaqueVisitAction,                (ProQuiltFilterAction)ProUtilDefaultFilter,                (ProAppData)&p_quilts );	    TEST_CALL_REPORT("ProSolidQuiltVisit()", 		"ProUtilCollectSolidQuilts()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_quilts );		*p_quilts = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);#endif}/*=========================================================================*\    Function:	ProUtilCollectSolidSurfaces()    Purpose:	Return a list of surfaces which belong to the solid    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectSolidSurfaces(     ProSolid	    p_solid,	    /* In:  The handle to the solid */    ProSurface	    **p_surfaces    /* Out: ProArray with collected surfaces. 					    The function allocates memory 					    for this argument, but you must 					    free it. To free the memory, 					    call the function ProArrayFree()*/){    ProError	    status;    if( p_surfaces != NULL )    {	status = ProArrayAlloc(0,sizeof(ProSurface), 1, (ProArray*)p_surfaces);	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectSolidSurfaces()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProSurfaceVisitAction", "ProSurfaceFilterAction" )	    status = ProSolidSurfaceVisit( p_solid, 		(ProSurfaceVisitAction)ProUtilCollect3ParamOpaqueVisitAction,                (ProSurfaceFilterAction)ProUtilDefaultFilter,                (ProAppData)&p_surfaces );	    TEST_CALL_REPORT("ProSolidSurfaceVisit()", 		"ProUtilCollectSolidSurfaces()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_surfaces );		*p_surfaces = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);}/*=========================================================================*\    Function:	ProUtilCollectQuiltSurfaces()    Purpose:	Return a list of surfaces which belong to the quilt    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectQuiltSurfaces(     ProQuilt	    p_quilt,	    /* In:  The handle to the quilt */    ProSurface	    **p_surfaces    /* Out: ProArray with collected surfaces. 					    The function allocates memory 					    for this argument, but you must 					    free it. To free the memory, 					    call the function ProArrayFree()*/){#ifndef PT_PRODUCTS_BUILD    ProError	    status;    if( p_surfaces != NULL )    {	status = ProArrayAlloc(0,sizeof(ProSurface), 1, (ProArray*)p_surfaces );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectQuiltSurfaces()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProQuiltSurfaceVisitAction",		"ProQuiltSurfaceFilterAction" )	    status = ProQuiltSurfaceVisit( p_quilt, 		(ProQuiltSurfaceVisitAction)ProUtilCollect3ParamOpaqueVisitAction,                (ProQuiltSurfaceFilterAction)ProUtilDefaultFilter,                (ProAppData)&p_surfaces );	    TEST_CALL_REPORT("ProQuiltSurfaceVisit()", 		"ProUtilCollectQuiltSurfaces()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_surfaces );		*p_surfaces = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);#endif}/*=========================================================================*\    Function:	ProUtilCollectSolidSimpreps()    Purpose:	Return a list of simplified representations in the solid    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectSolidSimpreps(     ProSolid	    p_solid,	    /* In:  The solid handle */    ProSimprep	    **p_simpreps    /* Out: ProArray with collected simp reps					    items. The function allocates 					    memory for this argument, but 					    you must free it. To free 					    the memory, call the function 					    ProArrayFree() */){#ifndef PT_PRODUCTS_BUILD    ProError	    status;    if( p_simpreps != NULL )    {	status = ProArrayAlloc(0,sizeof(ProSimprep), 1, (ProArray*)p_simpreps);	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectSolidSimpreps()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProGeomitemAction", "ProGeomitemFilter" )	    status = ProSolidSimprepVisit( p_solid,                 (ProGeomitemFilter)ProUtilDefaultFilter,		(ProGeomitemAction)ProUtilCollect3ParamDBVisitAction,                (ProAppData)&p_simpreps );	    TEST_CALL_REPORT("ProSolidSimprepVisit()", 		"ProUtilCollectSolidSimpreps()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_simpreps );		*p_simpreps = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);#endif}/*=========================================================================*\    Function:	ProUtilCollectSimprepsdataitems()    Purpose:	Return a list of simplified representations in the solid    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectSimprepsdataitems(     ProSimprepdata   *p_simprepdata,/* In:  The simprepdata handle */    ProSimprepitem    **p_simprepitems    /* Out: ProArray with collected simp reps					    items. The function allocates 					    memory for this argument, but 					    you must free it. To free 					    the memory, call the function 					    ProArrayFree() */){#ifndef PT_PRODUCTS_BUILD    ProError	    status;    if( p_simprepitems != NULL )    {	status = ProArrayAlloc(0,sizeof(ProSimprepitem), 1, (ProArray*)p_simprepitems);	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectSolidSimpreps()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProFunction", "ProFunction" )	    status = ProSimprepdataitemsVisit( p_simprepdata,                 (ProFunction)ProUtilDefaultFilter,		(ProFunction)ProUtilCollect3ParamDBVisitAction,                (ProAppData)&p_simprepitems );	    TEST_CALL_REPORT("ProSolidSimprepVisit()", 		"ProUtilCollectSolidSimpreps()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_simprepitems );		*p_simprepitems = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);#endif}/*=========================================================================*\    Function:	ProUtilCollectSolidFeaturesWithFilter()    Purpose:	Return a list of features in the solid    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectSolidFeaturesWithFilter(     ProSolid	    p_solid,	    /* In:  The solid handle */    ProFeatureFilterAction     filter,  /* In:  Filter function */    ProFeature	    **p_features    /* Out: ProArray with collected features					    items. The function allocates 					    memory for this argument, but 					    you must free it. To free 					    the memory, call the function 					    ProArrayFree() */){    ProError	    status;    if( p_features != NULL )    {	status = ProArrayAlloc(0,sizeof(ProFeature), 1, (ProArray*)p_features);	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectSolidFeatures()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProFeatureVisitAction", "ProFeatureFilterAction" )	    status = ProSolidFeatVisit( p_solid, 		(ProFeatureVisitAction)ProUtilCollect3ParamDBVisitAction,                (ProFeatureFilterAction)filter,                (ProAppData)&p_features );	    TEST_CALL_REPORT("ProSolidFeatVisit()", 		"ProUtilCollectSolidFeatures()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_features );		*p_features = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -