NX9+VS2012

     #include <uf.h>
#include <uf_ui.h>
#include <uf_vec.h>
#include <uf_curve.h> UF_initialize(); //创建直线1
UF_CURVE_line_t LineCoords1;
LineCoords1.start_point[] = 0.0;
LineCoords1.start_point[] = 0.0;
LineCoords1.start_point[] = 0.0;
LineCoords1.end_point[] = 0.0;
LineCoords1.end_point[] = 100.0;
LineCoords1.end_point[] = 0.0;
tag_t Line1Tag = NULL_TAG;
UF_CURVE_create_line(&LineCoords1, &Line1Tag); //创建直线2
UF_CURVE_line_t LineCoords2;
LineCoords2.start_point[] = 0.0;
LineCoords2.start_point[] = 0.0;
LineCoords2.start_point[] = 0.0;
LineCoords2.end_point[] = 110.0;
LineCoords2.end_point[] = 80.0;
LineCoords2.end_point[] = 0.0;
tag_t Line2Tag = NULL_TAG;
UF_CURVE_create_line(&LineCoords2, &Line2Tag); //直线1的向量方向,终点减起点
double Vec1[] = {LineCoords1.end_point[]-LineCoords1.start_point[], LineCoords1.end_point[]-LineCoords1.start_point[], LineCoords1.end_point[]-LineCoords1.start_point[]}; //直线2的向量方向,终点减起点
double Vec2[] = {LineCoords2.end_point[]-LineCoords2.start_point[], LineCoords2.end_point[]-LineCoords2.start_point[], LineCoords2.end_point[]-LineCoords2.start_point[]}; //求两个向量的叉乘
double CrossProduct[];
UF_VEC3_cross(Vec1, Vec2, CrossProduct); //已知两个向量求夹角(输出的是弧度)
double Angle;
UF_VEC3_angle_between(Vec1, Vec2, CrossProduct, &Angle); //打印
char msg[];
sprintf(msg, "%f",RADEG*Angle );//角度=180度/π*弧度,或者用宏定义RADEG*弧度
uc1601(msg, ); UF_terminate();

NX二次开发-UFUN求两个向量的叉乘UF_VEC3_cross的更多相关文章

  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二次开发-UFUN求对象的最大边界框UF_MODL_ask_bounding_box

    NX9+VS2012 #include <uf.h> #include <uf_obj.h> #include <uf_modl.h> #include <u ...

  3. NX二次开发-UFUN已知两个向量方向求夹角角度UF_VEC3_angle_between

    NX9+VS2012 #include <uf.h> #include <uf_ui.h> #include <uf_vec.h> #include <uf_ ...

  4. NX二次开发-Ufun API Example

    UF公共类型 UF_begin_timer计时函数 https://www.cnblogs.com/nxopen2018/p/10957135.html UF_end_timer计时函数 https: ...

  5. NX二次开发-UFUN将工程图转成CGM和PDF文件UF_CGM_export_cgm

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

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

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

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

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

  8. NX二次开发-UFUN修改当前导出CGM文件选项设置UF_CGM_set_session_export_options

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

  9. NX二次开发-UFUN计算两点距离UF_VEC3_distance

    NX11+VS2013 #include <uf.h> #include <uf_curve.h> #include <uf_vec.h> UF_initializ ...

随机推荐

  1. lua 线程

    { //https://blog.csdn.net/gulan0/article/details/50373276 }

  2. 首次公开!单日600PB的计算力--阿里巴巴EB级大数据平台的进击

    MaxCompute作为阿里巴巴的主力计算平台,在2018年的双11中,再次不负众望,经受住了双11期间海量数据和高并发量的考验.为集团的各条业务线提供了强劲的计算力,不愧是为阿里巴巴历年双11输送超 ...

  3. webpack 添加eslint代码审查

    1). 添加包 npm install eslint --save-dev npm install eslint-loader --save-dev npm install eslint-plugin ...

  4. python 模块-json

    1.JSON(Javascript Object Notation) 是一种轻量级的数据交换格式.易于人阅读和编写.同时也易于机器解析和生成.它基于JavaScript Programming Lan ...

  5. Python100天打卡-Day10

    实现动画效果要实现动画效果,本身的原理也非常简单,就是将不连续的图片连续的播放,只要每秒钟达到了一定的帧数,那么就可以做出比较流畅的动画效果.import pygame def main(): # 初 ...

  6. 杂项-笔记-VS:VS2019笔记

    ylbtech-杂项-笔记-VS:VS2019笔记 1.返回顶部 1. http://www.ddooo.com/softdown/142335.htm 2. 2.返回顶部   3.返回顶部   4. ...

  7. 树莓派 omv 安装 nextcloud

    https://www.toutiao.com/i6447470450145493517/ https://www.technikaffe.de/anleitung-402-howto_nextclo ...

  8. 自己写Linux module来收集buddy info

    1 编写代码pslist.c 1: #include<linux/init.h> 2: #include<linux/module.h> 3: #include<linu ...

  9. Linxu下JMeter进行接口压力测试

    ****************************************************************************** 本文主要介绍Jmeter脚本如何在Linx ...

  10. Red Hat Enterprise Linux 7.7 使用最小化安装后,怎么安装桌面的解决方法

    准备工具: xshell6,xftp6,到官网(https://www.netsarang.com/zh/downloading/)进行下载,教育版的,个人使用 虚拟机安装教程百度即可,安装时有两个重 ...