NX二次开发-UFUN求两个向量的叉乘UF_VEC3_cross
- 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的更多相关文章
- NX二次开发-UFUN求两个对象最短距离UF_MODL_ask_minimum_dist
NX9+VS2012 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize() ...
- NX二次开发-UFUN求对象的最大边界框UF_MODL_ask_bounding_box
NX9+VS2012 #include <uf.h> #include <uf_obj.h> #include <uf_modl.h> #include <u ...
- NX二次开发-UFUN已知两个向量方向求夹角角度UF_VEC3_angle_between
NX9+VS2012 #include <uf.h> #include <uf_ui.h> #include <uf_vec.h> #include <uf_ ...
- NX二次开发-Ufun API Example
UF公共类型 UF_begin_timer计时函数 https://www.cnblogs.com/nxopen2018/p/10957135.html UF_end_timer计时函数 https: ...
- NX二次开发-UFUN将工程图转成CGM和PDF文件UF_CGM_export_cgm
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
- NX二次开发-UFUN获取NX系统默认导出CGM的选项设置UF_CGM_ask_default_export_options
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
- NX二次开发-UFUN获取当前导出CGM选项设置UF_CGM_ask_session_export_options
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
- NX二次开发-UFUN修改当前导出CGM文件选项设置UF_CGM_set_session_export_options
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
- NX二次开发-UFUN计算两点距离UF_VEC3_distance
NX11+VS2013 #include <uf.h> #include <uf_curve.h> #include <uf_vec.h> UF_initializ ...
随机推荐
- Jedis连接池的使用(转)
http://www.cnblogs.com/linjiqin/archive/2013/06/14/3135248.html 所需jar:jedis-2.1.0.jar和commons-pool-1 ...
- 【leetcode】958. Check Completeness of a Binary Tree
题目如下: Given a binary tree, determine if it is a complete binary tree. Definition of a complete binar ...
- 使用cordova,监听安卓机物理返回按键,实现退出程序的功能
在使用html5开发app时,并不能像Android原生那样调取手机自身的方法.而cordova正好弥补了html5这一缺陷. 一,在cordova中文网http://cordova.axuer.co ...
- leetcode-第14周双周赛-1272-删除区间
题目描述: 自己的提交: class Solution: def removeInterval(self, intervals: List[List[int]], toBeRemoved: List[ ...
- Python_day01——变量
变量 1.声明变量 name="钱成龙" 变量定义的规则: 变量名只能是 字母.数字或下划线的任意组合 变量名的第一个字符不能是数字 关键字不能声明为变量名 2.变量类型 整 ...
- CF 。E2. Stars Drawing (Hard Edition) (DP)
Description: 定义一个星星由 '*' 组成,形状为一个对称的“十”字型,大小为星星 1/2 的横长(或纵长)减一(如题目中的图).给出一个 n*m 的图,判断是不是每一个 '*' 都能属于 ...
- SDNU 1217 CD收藏——并查集
Description lmh平常爱听歌,所以买了很多的CD来收藏,但是因为平常整理不当,所以忘记了这些CD的歌手是谁.现在他想知道他到底收藏了多少位歌手的专辑,于是他想了一个办法,同时拿出两 ...
- java 原生 HttpClient
package org.rx.socks.http; import com.google.common.base.Strings; import lombok.SneakyThrows; import ...
- 模拟栈&&模拟队列
模拟栈:class Stack { private List list = new ArrayList( ); public void push( Object obj ) { this.list.a ...
- Neo4j原生语句cc
Cypher语句 Cypher语句是Neo4j的图查询语言.以下例子来自Neo4j Browser,启动后在命令栏输入:play cypher即可1. 创建一个节点: 语法:CREATE (node- ...