NX二次开发-NXOPEN找相切面方法ScRuleFactory()->CreateRuleFaceTangent
#include <uf_defs.h>
#include <uf_ui_types.h>
#include <iostream>
#include <NXOpen/Session.hxx>
#include <NXOpen/UI.hxx>
#include <NXOpen/NXMessageBox.hxx>
#include <NXOpen/Callback.hxx>
#include <NXOpen/NXException.hxx>
#include <NXOpen/BlockStyler_UIBlock.hxx>
#include <NXOpen/BlockStyler_BlockDialog.hxx>
#include <NXOpen/BlockStyler_PropertyList.hxx>
#include <NXOpen/BlockStyler_Group.hxx>
#include <NXOpen/BlockStyler_FaceCollector.hxx>
#include <uf.h>
#include <uf_obj.h>
#include <NXOpen/NXObjectManager.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/Face.hxx>
#include <NXOpen/FaceTangentRule.hxx>
#include <NXOpen/ScCollectorCollection.hxx>
#include <NXOpen/ScRuleFactory.hxx> UF_initialize(); //NXOPEN初始化
NXOpen::Session *theSession = NXOpen::Session::GetSession();
NXOpen::Part *workPart(theSession->Parts()->Work());
NXOpen::Part *displayPart(theSession->Parts()->Display()); //选择面控件
PropertyList* FaceSelectProps = face_select0->GetProperties();
std::vector<NXOpen::TaggedObject*> faces = FaceSelectProps->GetTaggedObjectVector("SelectedObjects");
delete FaceSelectProps;
FaceSelectProps = NULL; tag_t FaceTag = faces[]->Tag(); //对选中的面设置颜色
UF_OBJ_set_color(FaceTag, ); //给入一个面
NXOpen::Face *face1(dynamic_cast<NXOpen::Face *>(NXOpen::NXObjectManager::Get(FaceTag))); //使用NXOPEN相切面规则
std::vector<NXOpen::Face *> boundaryFaces1();
NXOpen::FaceTangentRule *faceTangentRule1;
faceTangentRule1 = workPart->ScRuleFactory()->CreateRuleFaceTangent(face1, boundaryFaces1, 0.050000000000000003);
std::vector<NXOpen::SelectionIntentRule *> rules1();
rules1[] = faceTangentRule1; NXOpen::ScCollector* scCollector1 = workPart->ScCollectors()->CreateCollector();
scCollector1->ReplaceRules(rules1, false); std::vector<NXOpen::TaggedObject*> BB = scCollector1->GetObjects();
for (int i = ; i < BB.size(); i++)
{
UF_OBJ_set_color(BB[i]->Tag(), );
} UF_terminate();




NX二次开发-NXOPEN找相切面方法ScRuleFactory()->CreateRuleFaceTangent的更多相关文章
- NX二次开发-NXOPEN自动切换到工程图模块
UFUN的API里是没有切换到工程图的函数的,NXOPEN里是有方法可以用的.不过应该是不支持NX9以下的版本. NX9的不能录制出来,在UI类里有方法 NX9+VS2012 #include < ...
- NX二次开发-NXOPEN更改工程图视图名字baseView1->SetName("LSY");
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_obj.h> #include <u ...
- NX二次开发-NXOpen获取边的端点NXOpen::Edge::GetVertices
NX9+VS2012 #include <NXOpen/Features_BlockFeatureBuilder.hxx> #include <NXOpen/Features_Fea ...
- NX二次开发-NXOpen::Drawings::DrawingSheet Class Reference
NX11+VS2013 #include <NXOpen/Section.hxx> #include <NXOpen/SectionCollection.hxx> #inclu ...
- NX二次开发-NXOpen::CoordinateSystemCollection Class Reference
NX11+VS2013 #include <NXOpen/Section.hxx> #include <NXOpen/SectionCollection.hxx> #inclu ...
- NX二次开发-NXOpen::WCS Class Reference
NX11+VS2013 #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include < ...
- NX二次开发-NXOpen中Point3d类型转换成point类型
NX9+VS2012 #include <NXOpen/NXObject.hxx> #include <NXOpen/Part.hxx> #include <NXOpen ...
- NX二次开发-NXOPEN设置工程图表格注释字体workPart->Fonts()->AddFont("chinesef_fs", NXOpen::FontCollection::TypeNx);
NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...
- NX二次开发-NXOPEN获取所有工程图和所有视图DrawingSheet,DrawingSheetCollection,DraftingView
NX11+VS2013 #include <NXOpen/Part.hxx> #include <NXOpen/PartCollection.hxx> #include < ...
随机推荐
- Python:验证码识别
说明:此验证方法很弱,几乎无法识别出正确的验证码
- 「NOI2018」屠龙勇士 解题报告
「NOI2018」屠龙勇士 首先对于每个龙用哪个剑砍,我们可以用set随便模拟一下得到. 然后求出拿这个剑砍这条龙的答案 \[ atk_ix-p_iy=a_i \] 其中\(atk_i\)是砍第\(i ...
- AcWing 203. 同余方程 (线性同余方程)打卡
求关于x的同余方程 ax ≡ 1(mod b) 的最小正整数解. 输入格式输入只有一行,包含两个正整数a,b,用一个空格隔开. 输出格式输出只有一行,包含一个正整数x,表示最小正整数解. 输入数据保证 ...
- SDNU 1217 CD收藏——并查集
Description lmh平常爱听歌,所以买了很多的CD来收藏,但是因为平常整理不当,所以忘记了这些CD的歌手是谁.现在他想知道他到底收藏了多少位歌手的专辑,于是他想了一个办法,同时拿出两 ...
- 使用 windsor 实现IOC 和 AOP
代码很简单,不多说. 对于拦截,windsor 使用动态代理的方式,即生成继承类的方式来实现的,因此无法拦截private 方法,因为无法在继承类中看见private方法. using System; ...
- RF中滚动条的操作方法小结
滚动条分为俩种,一:主页面中的滚动条.二:页面中的子页面的滚动条. 每种滚动条有都分为上下滑动与左右滑动. 下面分别介绍: 一:主页面的滚动条上下滑动: execute javascript ...
- (15)centos7 系统服务
centos7 服务启动脚本在 /usr/lib/systemd目录下 1.服务基本操作指令 systemclt [command] [unit] #其中command包括: #start 立即启动 ...
- Codeforces 1173B Nauuo and Chess
题目链接:http://codeforces.com/problemset/problem/1173/B 思路参考:https://www.cnblogs.com/blowhail/p/1099123 ...
- Django框架(四)—— 路由控制:有名/无名分组、反向解析、路由分发、名称空间、伪静态、APPEND_SLASH、不同版本的Django区别
目录 路由控制 一.简单路由配置 二.无名分组 三.有名分组 四.反向解析 五.路由分发 六.名称空间(一般不使用) 七.伪静态 八.Django 2.x和Django 1.x 路由层区别 九.APP ...
- dp思维
题目传输门 题意:有n个房间,m个诅咒,每个房间有一个数值,刚开始有一个初始值,每次进入一个房间可以选择消除诅咒或者不消除,消除诅咒只能顺序消除,消除诅咒就是拿初始值和房间的数值做运算,求最后最大的数 ...