NX二次开发-UFUN获取圆锥参数UF_MODL_ask_cone_parms
NX11+VS2013
#include <uf.h>
#include <uf_modl.h>
#include <uf_ui.h>
UF_initialize();
//创建圆锥
UF_FEATURE_SIGN Sign = UF_NULLSIGN;//设置布尔
double Origin[] = { 0.0, 0.0, 0.0 };//原点
char *Height = "";//高度
char *Diam[] = { "", "" };//顶部直径,底部直径
double Dirction[] = { 0.0, 0.0, 1.0 };//矢量方向
tag_t ConeTag = NULL_TAG;
UF_MODL_create_cone1(Sign, Origin, Height, Diam, Dirction, &ConeTag);
//获取圆锥参数
char *BaseDiameter;//输出底部直径
char *TopDiameter;//输出顶部直径
char *Height1;//输出高度
char *HalfAngle;//输出锥角
UF_MODL_ask_cone_parms(ConeTag, , &BaseDiameter, &TopDiameter, &Height1, &HalfAngle);
//打印
//默认输出格式为表达式等号左右值
UF_UI_open_listing_window();
UF_UI_write_listing_window(BaseDiameter);
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(TopDiameter);
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(Height1);
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(HalfAngle);
//只输出表达式等号右值
//提取左右值
string Base = BaseDiameter;
string BaseStrleft = (Base.substr(, Base.find("=")));//提取左值
string BaseStrright = (Base.substr(Base.find("=") + , Base.find(" ")));//提取右值
string Top = TopDiameter;
string TopStrleft = (Top.substr(, Top.find("=")));//提取左值
string TopStrright = (Top.substr(Top.find("=") + , Top.find(" ")));//提取右值
string Hei = Height1;
string HeiStrleft = (Hei.substr(, Hei.find("=")));//提取左值
string HeiStrright = (Hei.substr(Hei.find("=") + , Hei.find(" ")));//提取右值
string Hal = HalfAngle;
string HalStrleft = (Hal.substr(, Hal.find("=")));//提取左值
string HalStrright = (Hal.substr(Hal.find("=") + , Hal.find(" ")));//提取右值
char BaseBufLeft[], BaseBufRight[];//左值,右值
char TopBufLeft[], TopBufRight[];//左值,右值
char HeiBufLeft[], HeiBufRight[];//左值,右值
char HalBufLeft[], HalBufRight[];//左值,右值
//将string类型转换为字符数组
strcpy(BaseBufRight, BaseStrright.c_str());
strcpy(TopBufRight, TopStrright.c_str());
strcpy(HeiBufRight, HeiStrright.c_str());
strcpy(HalBufRight, HalStrright.c_str());
//打印右值
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(BaseBufRight);
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(TopBufRight);
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(HeiBufRight);
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(HalBufRight);
//释放内存
UF_free(BaseDiameter);
UF_free(TopDiameter);
UF_free(Height1);
UF_free(HalfAngle);
UF_terminate();

NX二次开发-UFUN获取圆锥参数UF_MODL_ask_cone_parms的更多相关文章
- 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获取环境变量路径,将环境变量转换为字符串,字符串拼接UF_translate_variable
NX9+VS2012 #include <uf.h> UF_initialize(); //UFUN获取环境变量路径 //将环境变量转换为字符串 char* GetName = NULL; ...
- NX二次开发-UFUN获取系统相关信息UF_ask_system_info
NX9+VS2012 #include <uf.h> UF_initialize(); UF_system_info_t Info; UF_ask_system_info(&Inf ...
- NX二次开发-UFUN获取球的参数UF_MODL_ask_sphere_parms
NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize( ...
- NX二次开发-UFUN获取块的参数UF_MODL_ask_block_parms
NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize( ...
- NX二次开发-UFUN获取圆柱的参数UF_MODL_ask_cylinder_parms
NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize( ...
- NX二次开发-UFUN获取当前所在的模块UF_ask_application_module
NX9+VS2012 #include <uf.h> #include <NXOpen/UI.hxx> #include <NXOpen/MenuBar_MenuBarM ...
- NX二次开发-UFUN获取显示在NX交互界面的对象UF_OBJ_is_displayable
NX9+VS2012 #include <uf.h> #include <uf_disp.h> #include <uf_obj.h> #include <u ...
随机推荐
- CentOS7.6 部署asp.net core2.2 应用
1.安装.net Core SDK 在安装.NET之前,您需要注册Microsoft密钥,注册产品存储库并安装所需的依赖项.这只需要每台机器完成一次. 打开终端并运行以下命令: sudo rpm -U ...
- php操作redis--字典(hash)篇
常用函数:hSet,hGet,hGetAll等. 应用场景:存储用户信息对象数据,包括id,姓名,年龄和生日,通过用户id来获取姓名,年龄等信息. 连接 $redis = new Redis(); $ ...
- Delphi中的线程类(转)
Delphi中的线程类 (转) Delphi中有一个线程类TThread是用来实现多线程编程的,这个绝大多数Delphi书藉都有说到,但基本上都是对 TThread类的几个成员作一简单介绍,再说明一下 ...
- Java类的成员之四:代码块.
3.2类的成员之四:代码块 ①初始化块(代码块)作用:对Java对象进行初始化 ②程序的执行顺序: ③一个类中初始化块若有修饰符,则只能被static修饰,称为静态代码块(static block ) ...
- ES6 教程
上次分享了es6开发环境的搭建,本次接着分享es6常用的特性. es6常用的语法参考 : https://blog.csdn.net/itzhongzi/article/details/73 ...
- 用 Flask 来写个轻博客 (3) — (M)VC_连接 MySQL 和 SQLAlchemy
目录 目录 前文列表 扩展阅读 前言 Models 模型 SQLAlchemy 安装 SQLAlchemy 安装 Mysql 建立 SQLAlchemy 和 Mysql 的连接 前文列表 用 Flas ...
- JAVA学习之环境搭建
了解到JAVA语言的跨平台性的原理是通过在不同的操作系统中安装对应版本的的JAVA虚拟机(JVM)实现 开发JAVA前必须先搭建JAVA环境: 1.JAVA开发工具包JDK(JAVA DEVELOPM ...
- JEECG树(TreeGrid)字段的扩展
转载:https://blog.csdn.net/huangzirong822/article/details/38400817 之前使用jeecg集成框架做过一个项目 这里说说框架中树(tree)字 ...
- LeetCode 分隔链表
题目链接:https://leetcode-cn.com/problems/partition-list/ 题目大意 略. 分析 空间复杂度 O(1) 的做法蛮有意思的,另外加头结点可以少写很多代码. ...
- 前端(七)—— 盒模型之display、overflow、隐藏、border、margin、样式支持,层级结构
display.overflow.隐藏.border.margin.样式支持,层级结构 一.盒模型之display 1.三种样式 block 块 inline 内联/行内 inline-block 内 ...