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

📄 utilcollect.c

📁 Pro.TOOLKIT.Wildfire插件设计.配套光盘-141M.zip
💻 C
📖 第 1 页 / 共 5 页
字号:
	    ACTION_TYPE( "ProSolidRelsetVisitAction", "" )	    status = ProSolidRelsetVisit( p_mdl,		(ProSolidRelsetVisitAction)ProUtilCollect2ParamDBVisitAction,                (ProAppData)&p_relset );	    TEST_CALL_REPORT("ProSolidRelsetVisit()", 		"ProUtilCollectRelset()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_relset );		*p_relset = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);}/*=========================================================================*\    Function:	ProUtilCollectFeatureGeomitems()    Purpose:	Return a list of geometry items created by the feature    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectFeatureGeomitems(     ProFeature	    *p_feature,	    /* In:  The feature handle */    ProType	    item_type,	    /* In:  The type of expected geometry item */    ProGeomitem	    **p_geomitems   /* Out: ProArray with collected geometry 					    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_geomitems != NULL )    {	status = ProArrayAlloc( 0, sizeof(ProGeomitem), 1, 	    (ProArray*)p_geomitems );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectFeatureGeomitems()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProGeomitemAction", "ProGeomitemFilter" )	    status = ProFeatureGeomitemVisit( p_feature, item_type, 		(ProGeomitemAction)ProUtilCollect3ParamDBVisitAction,                (ProGeomitemFilter)ProUtilDefaultFilter,                (ProAppData)&p_geomitems );	    TEST_CALL_REPORT("ProFeatureGeomitemVisit()", 		"ProUtilCollectFeatureGeomitems()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_geomitems );		*p_geomitems = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);}/*=========================================================================*\    Function:	ProUtilCollectExtobjReferences()    Purpose:	Return a list of external objects references    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectExtobjReferences(     ProExtobj	    *p_extobj,	    /* In:  The handle to the external object */    ExtobjReference **p_extobj_refs	    /* Out: ProArray with collected external 					    object references. The function 					    allocates memory for this argument, 					    but you must free it. To free 					    the memory, call the function 					    ProArrayFree() */){    ProError	    status;    if( p_extobj_refs != NULL )    {	status = ProArrayAlloc( 0, sizeof(ExtobjReference), 1, 	    (ProArray*)p_extobj_refs );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectExtobjReferences()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProExtobjRefVisitAction", 		"ProExtobjRefFilterAction" )	    status = ProExtobjRefVisit( p_extobj, 		(ProExtobjRefVisitAction)ProUtilCollectExtobjReferencesVisitAction,                (ProExtobjRefFilterAction)ProUtilDefaultFilter,                (ProAppData)&p_extobj_refs );	    TEST_CALL_REPORT( "ProExtobjRefVisit()",		"ProUtilCollectExtobjReferences()", status,		(status != PRO_TK_NO_ERROR) && 		(status != PRO_TK_GENERAL_ERROR) &&		(status != PRO_TK_E_NOT_FOUND) );	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_extobj_refs );		*p_extobj_refs = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);}/*=========================================================================*\    Function:	ProUtilCollectExtobj()    Purpose:	Return a list of external objects which belong to the model    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectExtobj(     ProMdl	    p_model,	    /* In:  The handle to the solid */    ProExtobjClass  *p_extobj_class,/* In:  The external object class */    ProExtobj	    **p_extobjs	    /* Out: ProArray with collected external 					    objects. The function allocates 					    memory for this argument, but 					    you must free it. To free 					    the memory, call the function 					    ProArrayFree() */){    ProError	    status;    if( p_extobjs != NULL )    {	status = ProArrayAlloc( 0, sizeof(ProExtobj), 1, 	    (ProArray*)p_extobjs );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectExtobj()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProExtobjVisitAction", "ProExtobjFilterAction" )	    status = ProExtobjVisit( p_model, p_extobj_class, 		(ProExtobjVisitAction)ProUtilCollect3ParamDBVisitAction,                (ProExtobjFilterAction)ProUtilDefaultFilter,                (ProAppData)&p_extobjs );	    TEST_CALL_REPORT("ProExtobjVisit()", 		"ProUtilCollectExtobj()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_extobjs );		*p_extobjs = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);}/*=========================================================================*\    Function:	ProUtilCollectElemtreeElements()    Purpose:	Return a list of the subelements of the specified element		in the element tree.     Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectElemtreeElements(    ProElement	    p_elemtree,	/* In:	The element tree */    ProElempath	    p_elempath,	/* In:	The path to the element */    ElemtreeElement **p_elements    /* Out: ProArray with collected elements. 					    The function allocates memory 					    for this argument, but you must 					    free it. To free the memory, 					    call the function ProArrayFree()*/){    ProError	    status;    if( p_elements != NULL )    {	status = ProArrayAlloc( 0, sizeof(ElemtreeElement), 1, 	    (ProArray*)p_elements );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectElemtreeElements()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProElemtreeVisitAction", "ProElemtreeVisitFilter" )	    status = ProElemtreeElementVisit( p_elemtree, p_elempath,	        (ProElemtreeVisitFilter)ProUtilDefaultFilter, 		(ProElemtreeVisitAction)ProUtilCollectElemtreeElementVisitAction,                (ProAppData)&p_elements );	    TEST_CALL_REPORT("ProElemtreeElementVisit()", 		"ProUtilCollectElemtreeElements()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_elements );		*p_elements = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);}/*=========================================================================*\    Function:	ProUtilElemtreeElementArrayFree()    Purpose:	Free memory allocated by ProUtilCollectElemtreeElements    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilElemtreeElementArrayFree(    ElemtreeElement **p_elements){   int i, num;   ProError status;      status = ProArraySizeGet ((ProArray)*p_elements, &num);   TEST_CALL_REPORT ("ProArraySizeGet()",        "ProUtilElemtreeElementArrayFree()",        status, status != PRO_TK_NO_ERROR);   for (i = 0; i < num; i++)   {       status = ProElempathFree (&((*p_elements)[i].p_elempath));       TEST_CALL_REPORT ("ProElempathFree()",            "ProUtilElemtreeElementArrayFree()",            status, status != PRO_TK_NO_ERROR);   }   status = ProArrayFree ((ProArray*)p_elements);   TEST_CALL_REPORT ("ProArrayFree()",        "ProUtilElemtreeElementArrayFree()",        status, status != PRO_TK_NO_ERROR);   return (status);}/*=========================================================================*\    Function:	ProUtilCollectCurveComponents()    Purpose:	Return a list the components of the specified composite curve.     Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectCurveComponents(    ProCurve	    p_curve,	/* In:  The composite curve being processed */    CurveComponent  **p_components  /* Out: ProArray with collected components. 					    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_components != NULL )    {	status = ProArrayAlloc( 0, sizeof(CurveComponent), 1, 	    (ProArray*)p_components );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectCurveComponents()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProCurveCompAction", "ProCurveCompFilter" )	    status = ProCurveCompVisit( p_curve,		(ProCurveCompAction)ProUtilCollectCurveComponentVisitAction,                (ProCurveCompFilter)ProUtilDefaultFilter,                (ProAppData)&p_components );	    TEST_CALL_REPORT("ProCurveCompVisit()", 		"ProUtilCollectCurveComponents()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_components );		*p_components = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);#endif}/*=========================================================================*\    Function:	ProUtilCollectContourEdges()    Purpose:	Return a list of edges which belong to the contour    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectContourEdges(     ProSurface	    p_surface,	    /* In:  The surface of the contour */    ProContour	    p_contour,	    /* In:  The handle to the contour */    ProEdge	    **p_edges	    /* Out: ProArray with collected edges . 					    The function allocates memory 					    for this argument, but you must 					    free it. To free the memory, 					    call the function ProArrayFree()*/){    ProError	    status;    if( p_edges != NULL )    {	status = ProArrayAlloc( 0, sizeof(ProEdge), 1, (ProArray*)p_edges );	TEST_CALL_REPORT("ProArrayAlloc()", "ProUtilCollectContourEdges()",					    status, status != PRO_TK_NO_ERROR);	if( status == PRO_TK_NO_ERROR )	{	    ACTION_TYPE( "ProContourEdgeVisitAction", 		"ProContourEdgeFilterAction" )	    status = ProContourEdgeVisit( p_surface, p_contour, 		(ProContourEdgeVisitAction)ProUtilCollect3ParamOpaqueVisitAction,                (ProContourEdgeFilterAction)ProUtilDefaultFilter,                (ProAppData)&p_edges );	    TEST_CALL_REPORT("ProContourEdgeVisit()", 		"ProUtilCollectContourEdges()", status, 		status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND);	    if( status != PRO_TK_NO_ERROR )	    {		ProArrayFree( (ProArray*)p_edges );		*p_edges = NULL;	    }	}    }    else	status = PRO_TK_BAD_INPUTS;    return (status);}/*=========================================================================*\    Function:	ProUtilCollectSolidCsys()    Purpose:	Return a list of csys which belong to the solid    Returns:	PRO_TK_NO_ERROR - success;		PRO_TK_BAD_INPUTS - invalid parameters\*=========================================================================*/ProError ProUtilCollectSolidCsys(     ProSolid	    p_solid,	    /* In:  The handle to the solid */    ProCsys	    **p_csys	    /* Out: ProArray with collected csys . 					    The function allocates memory 					    for this argument, but you must 					    free it. To free the memory, 					    call the function ProArrayFree()*/){    ProError	    status;    if( p_csys != NULL )

⌨️ 快捷键说明

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