NX7.5 使用UF_MODL_create_proj_curves创建投影曲线
Posted Bizca 【UGNX 二次开发】
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了NX7.5 使用UF_MODL_create_proj_curves创建投影曲线相关的知识,希望对你有一定的参考价值。
1 [DllImport("libufun.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "UF_MODL_create_proj_curves")] 2 internal static extern int _CreateProjCurves(System.IntPtr curveRefs, System.IntPtr faceRefs, int alongFaceNormal, double[] projVector, out NXOpen.Tag projCurveFeature); 3 4 [DllImport("libufun.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "UF_MODL_create_list")] 5 internal static extern int CreateList(out System.IntPtr list); 6 [DllImport("libufun.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "UF_MODL_put_list_item")] 7 internal static extern int PutListItem(System.IntPtr list, NXOpen.Tag objId); 8 9 internal static System.IntPtr ListFromArray(NXOpen.Tag[] array) 10 { 11 System.IntPtr intPtr; 12 CreateList(out intPtr); 13 for (int i = 0; i < array.Length; i++) 14 { 15 PutListItem(intPtr, array[i]); 16 } 17 return intPtr; 18 } 19 20 /// <summary> 21 /// 创建投影特征 22 /// </summary> 23 /// <param name="curveRefs">需要投影的曲线</param> 24 /// <param name="faceRefs">投影面</param> 25 /// <param name="alongFaceNormal">是否使用面的法向</param> 26 /// <param name="projVector">指定矢量</param> 27 /// <param name="projCurveFeature">投影的特征</param> 28 public void CreateProjCurves(NXOpen.Tag[] curveRefs, NXOpen.Tag[] faceRefs, int alongFaceNormal, double[] projVector, out NXOpen.Tag projCurveFeature) 29 { 30 System.IntPtr curveRefs2 = ListFromArray(curveRefs); 31 System.IntPtr faceRefs2 = ListFromArray(faceRefs); 32 NXOpen.Utilities.JAM.StartUFCall(); 33 int error = _CreateProjCurves(curveRefs2, faceRefs2, alongFaceNormal, projVector, out projCurveFeature); 34 NXOpen.Utilities.JAM.EndUFCall(); 35 if (error != 0) 36 { 37 throw NXOpen.NXException.Create(error); 38 } 39 }
以上是关于NX7.5 使用UF_MODL_create_proj_curves创建投影曲线的主要内容,如果未能解决你的问题,请参考以下文章
在使用加载数据流步骤的猪中,使用(使用 PigStorage)和不使用它有啥区别?
Qt静态编译时使用OpenSSL有三种方式(不使用,动态使用,静态使用,默认是动态使用)