NX9+VS2012

     #include <uf.h>
#include <uf_curve.h>
#include <uf_modl.h>
#include <uf_ui.h> UF_initialize(); //创建直线
UF_CURVE_line_t LineCoods1;
LineCoods1.start_point[] = 0.0;
LineCoods1.start_point[] = 0.0;
LineCoods1.start_point[] = 20.0;
LineCoods1.end_point[] = 100.0;
LineCoods1.end_point[] = 100.0;
LineCoods1.end_point[] = 100.0;
tag_t Line1Tag = NULL_TAG;
UF_CURVE_create_line(&LineCoods1, &Line1Tag); UF_CURVE_line_t LineCoods2;
LineCoods2.start_point[] = 50.0;
LineCoods2.start_point[] = 50.0;
LineCoods2.start_point[] = 0.0;
LineCoods2.end_point[] = -50.0;
LineCoods2.end_point[] = -50.0;
LineCoods2.end_point[] = 100.0;
tag_t Line2Tag = NULL_TAG;
UF_CURVE_create_line(&LineCoods2, &Line2Tag); int IntersectionsNum;
UF_MODL_intersect_info_p_t * Intersections;
UF_MODL_intersect_objects(Line1Tag, Line2Tag, 0.01, &IntersectionsNum, &Intersections);//输入两个对象tag,找交点 double IntersectionsPoint[];//交点坐标
for (int i = ; i < IntersectionsNum; i++)
{
int type = Intersections[i]->intersect_type;
if (type == UF_MODL_INTERSECT_POINT)
{
IntersectionsPoint[] = Intersections[i]->intersect.point.coords[];
IntersectionsPoint[] = Intersections[i]->intersect.point.coords[];
IntersectionsPoint[] = Intersections[i]->intersect.point.coords[];
}
} //打印
char msg[];
sprintf_s(msg, "X坐标:%f\nY坐标:%f\nZ坐标:%f\n", IntersectionsPoint[], IntersectionsPoint[], IntersectionsPoint[]);
UF_UI_open_listing_window();
UF_UI_write_listing_window(msg); //释放
UF_free(Intersections); UF_terminate();

NX二次开发-UF_MODL_intersect_objects获取两个对象的交点的更多相关文章

  1. NX二次开发-UFUN求两个对象最短距离UF_MODL_ask_minimum_dist

    NX9+VS2012 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize() ...

  2. 【NX二次开发】获取两个面之间的所有面

    已知两个蓝色面,使用遍历面的方法求紫色面.算法例子: 1 bool is_NeighborFace(tag_t tagFace1, tag_t tagFace2) 2 { 3 vector<ta ...

  3. NX二次开发-UFUN获取NX系统默认导出CGM的选项设置UF_CGM_ask_default_export_options

    文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...

  4. NX二次开发-UFUN获取当前导出CGM选项设置UF_CGM_ask_session_export_options

    文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...

  5. 【NX二次开发】获取指定矩阵标识的矩阵值

    函数:UF_CSYS_ask_matrix_values () 函数说明:获取指定矩阵标识的矩阵值. 用法: #include <uf.h> #include <uf_csys.h& ...

  6. 【NX二次开发】获取当前鼠标选择的对象 UF_UI_ask_global_sel_object_list

    先选择多个对象object,然后使用此函数获取选择的对象的tag,最后就可以使用object的一些函数了. ufun例子: extern DllExport void ufusr(char *parm ...

  7. NX二次开发-UFUN获取系统相关信息UF_ask_system_info

    NX9+VS2012 #include <uf.h> UF_initialize(); UF_system_info_t Info; UF_ask_system_info(&Inf ...

  8. 【NX二次开发】 获取产品曲面上多个点对应的面的垂直矢量!

    说明:选择一个产品面,选择面上的点,生成点在此面上的法线反向,生成直线.生成矢量的起点坐标,和矢量方向信息.可用于三坐标测量,如果需要可以自己编个插件用! 效果图: 源码: //----------- ...

  9. NX二次开发-UFUN获取直线的两个端点UF_CURVE_ask_line_data

    NX9+VS2012 #include <uf.h> #include <uf_obj.h> #include <uf_ui.h> UF_initialize(); ...

随机推荐

  1. react-native run-android出现红屏错误

    react-native run-android出现 unable to load script from assets 'index.android.bundle'.Make sure your b ...

  2. python补充4

    一 如何判断一个对象是不是函数类型 #方法一def func(arg): if callable(arg): print("是函数"+arg()) else: print(arg) ...

  3. Selenium_随记要点

      1.selenium不支持定位复合元素定位:     像上图的class元素有两个值: op_weather4_twoicon_today  -----    OP_LOG_LINK    像这种 ...

  4. 【dart学习】-- Dart之元数据

    一,概述 元数据概述  元数据(Metadata),又称中介数据.中继数据,为描述数据的数据(data about data),主要是描述数据属性(property)的信息,用来支持如指示存储位置.历 ...

  5. linux文件目录颜色及特殊权限对应的颜色

    白色:表示普通文件蓝色:表示目录绿色:表示可执行文件红色:表示压缩文件浅蓝色:链接文件红色闪烁:表示链接的文件有问题黄色:表示设备文件灰色:表示其它文件 各种背景颜色的显示和文件的权限有关红色背景:特 ...

  6. js文字转语音(speechSynthesis)

    环境: windows 官网网址: https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis 基础使用: var msg = n ...

  7. android ellipsize的使用及实现跑马灯效果总结

    参考资料: http://blog.csdn.net/huiwolf2008/article/details/7901084 http://www.cnblogs.com/Gaojiecai/arch ...

  8. 框架-.NET:Spring.Net

    ylbtech-框架-Spring.Net:Spring.Net Spring.NET为建立企业级应用提供了一套轻量级的解决方案.通过Spring.NET,我们可以用统一且透明的方式来配置应用程序.S ...

  9. 京东云Ubuntu下安装mysql

    1.sudo apt-get install mysql-server,输入y后输入密码 2.sudo apt isntall mysql-client 3.sudo apt install libm ...

  10. Mentor_丝印检查——手工绘制丝印线条(标注)到丝印位号距离的检查

    http://www.eda365.com/thread-193942-1-1.html 在此之前丝印的检查基本是停留在丝印与阻焊的距离检查,而器件丝印框和手工绘制的线条与器件位号的检查都不到位,据我 ...