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的更多相关文章

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

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

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

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

  3. NX二次开发-UFUN获取环境变量路径,将环境变量转换为字符串,字符串拼接UF_translate_variable

    NX9+VS2012 #include <uf.h> UF_initialize(); //UFUN获取环境变量路径 //将环境变量转换为字符串 char* GetName = NULL; ...

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

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

  5. NX二次开发-UFUN获取球的参数UF_MODL_ask_sphere_parms

    NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize( ...

  6. NX二次开发-UFUN获取块的参数UF_MODL_ask_block_parms

    NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize( ...

  7. NX二次开发-UFUN获取圆柱的参数UF_MODL_ask_cylinder_parms

    NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize( ...

  8. NX二次开发-UFUN获取当前所在的模块UF_ask_application_module

    NX9+VS2012 #include <uf.h> #include <NXOpen/UI.hxx> #include <NXOpen/MenuBar_MenuBarM ...

  9. NX二次开发-UFUN获取显示在NX交互界面的对象UF_OBJ_is_displayable

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

随机推荐

  1. Java中的List集合

    List集合继承自collection接口,他自己也是个接口,没有具体的结构,与Set集合不同,List集合允许重复的元素. List集合特有方法:(Collection中没有这些) 这些在Arral ...

  2. spring boot 与微服务之间的关系

    Spring Boot 和微服务没关系, Java 微服务治理框架普遍用的是 Spring Cloud. Spring Boot 产生的背景,是开发人员对 Spring 框架越来越复杂的配置吐槽越来越 ...

  3. Magento用SQL语句开发篇

    有时为了调试magento,需要获取当前的查询sql语句,在magento中获取SQL语句,这里我们通过$collection->getSelectSql(true)来调试sql 1 $coll ...

  4. 批量更新数据(BatchUpdate)

    批量更新数据(BatchUpdate) /// <summary> /// 批量更新数据,注意:如果有timestamp列,要移除 /// </summary> /// < ...

  5. PHP FILTER_SANITIZE_NUMBER_FLOAT 过滤器

    定义和用法 FILTER_SANITIZE_NUMBER_FLOAT 过滤器删除浮点数中所有非法的字符. 该过滤器默认允许所有数字以及 + - Name: "number_float&quo ...

  6. Python内置模块-time && datatime

    Python提供两种时间表示方式,一种是时间戳,从1970年1月1日 0时开始.一种是struct_time数组格式,共有9个元素. import time print(time.time()) #返 ...

  7. python eval()内置函数

    python有一个内置函数eval(),可以将字符串进行运行. 通过help(eval)查看帮助文档 Help on built-in function eval in module builtins ...

  8. 1.4 React 组件生命周期

    1.4.1 组件 React 中组件有自己的生命周期方法,简单理解可以为组件从 出生(实例化) -> 激活 -> 销毁 生命周期 hook.通过这些 hook 方法可以自定义组件的特性. ...

  9. 牛客 Fruit Ninja 2018 ACM 上海大都会赛 (随机化算法)

    题目链接:Fruit Ninja 比赛链接:2018 ACM 国际大学生程序设计竞赛上海大都会赛重现赛 题目描述 Fruit Ninja is a juicy action game enjoyed ...

  10. csv 基本操作, 报错解决(UnicodeEncodeError: 'utf-8' codec can't encode characters in position 232-233: surrogates not allowed)

    最常用的一种方法,利用pandas包 import pandas as pd #任意的多组列表 a = [1,2,3] b = [4,5,6] #字典中的key值即为csv中列名 dataframe ...