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 ...
随机推荐
- mac MAMP安装redis扩展
一般情况下目录大概是一样的,只是php的版本不同,所以选择好自己对应的php版本目录即可 git clone https://github.com/nicolasff/phpredis.git cd ...
- MyEclipse6.0中使用aptana插件,添加jquery提示功能
MyEclipse6.0中使用aptana插件,添加jquery提示功能 第一:查看当前MyEclipse集成的eclipse的版本,, 查看路径 D:/MyEclipse 6.0/eclips ...
- 基于mybatis-plus的代码生成
基于mybatis-plus的代码生成 前言 随着敏捷开发模式的推广,伴着日益增长的需求,日常工作中我们越来越注重效率和便捷性.今天我们就来探讨下如何自动生成代码,准确地说是如何依赖数据库生成我们的e ...
- Delphi实现程序只运行一次并激活已打开的程序
我们的程序有时候只允许运行一次,并且最好的情况是,如果程序第二次运行,就激活原来的程序.网上有很多的方法实现程序只运行一次,但对于激活原来的窗口却都不怎么好.关键就在于激活原来的程序,一般的做法是在工 ...
- jq鼠标移入和移出事件
前几天帮朋友做了一个单页面,其中有个效果就是鼠标移动到头像上变换头像样式,当鼠标移出时恢复头像样式.当时没多想,脑子就蹦出了mouseover,mouseout两个方法. 但是在编写页面的过程中,无论 ...
- “今日头条杯”首届湖北省大学程序设计竞赛--F. Flower Road
题目链接:点这 github链接:(包含数据和代码,题解):点这 链接:https://www.nowcoder.com/acm/contest/104/E来源:牛客网 题目描述 (受限于评测机,此题 ...
- Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click
Pycharm设置 Pycharm总是很多的拼写检查波拉线 Spellchecker inspection helps locate typos and misspelling in your cod ...
- 导入安全证书到jdk
一:.导入证书 1.打开doc窗口,打开cmd,执行命令: keytool -import -file f:\ca.crt -keystore "%JAVA_HOME%\jre\lib\se ...
- Naive RNN vs LSTM vs GRU、attention基础
原文地址:https://www.jianshu.com/p/b8653f8b5b2b 一.Recurrent Neural Network 二.Naive RNN Naive RNN更新参数时易出现 ...
- UVA 10005 Packing polygons(最小圆覆盖)
裸的模板题 AC代码: #include<cstdio> #include<cmath> #include<algorithm> #include<iostr ...