#include <NXOpen/Annotations.hxx>
#include <NXOpen/Assemblies_Component.hxx>
#include <NXOpen/Assemblies_ComponentAssembly.hxx>
#include <NXOpen/Body.hxx>
#include <NXOpen/BodyCollection.hxx>
#include <NXOpen/Face.hxx>
#include <NXOpen/Line.hxx>
#include <NXOpen/NXObject.hxx>
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/Session.hxx>
#include <NXOpen/Builder.hxx>
#include <NXOpen/CurveDumbRule.hxx>
#include <NXOpen/Direction.hxx>
#include <NXOpen/DirectionCollection.hxx>
#include <NXOpen/DisplayableObject.hxx>
#include <NXOpen/Expression.hxx>
#include <NXOpen/ExpressionCollection.hxx>
#include <NXOpen/Features_ExtrudeBuilder.hxx>
#include <NXOpen/Features_Feature.hxx>
#include <NXOpen/Features_FeatureBuilder.hxx>
#include <NXOpen/Features_FeatureCollection.hxx>
#include <NXOpen/GeometricUtilities_BooleanOperation.hxx>
#include <NXOpen/GeometricUtilities_Extend.hxx>
#include <NXOpen/GeometricUtilities_FeatureOffset.hxx>
#include <NXOpen/GeometricUtilities_FeatureOptions.hxx>
#include <NXOpen/GeometricUtilities_Limits.hxx>
#include <NXOpen/GeometricUtilities_MultiDraft.hxx>
#include <NXOpen/GeometricUtilities_SimpleDraft.hxx>
#include <NXOpen/GeometricUtilities_SmartVolumeProfileBuilder.hxx>
#include <NXOpen/IBaseCurve.hxx>
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/PreviewBuilder.hxx>
#include <NXOpen/ScRuleFactory.hxx>
#include <NXOpen/Section.hxx>
#include <NXOpen/SectionCollection.hxx>
#include <NXOpen/SelectionIntentRule.hxx>
#include <NXOpen/SelectionIntentRuleOptions.hxx>
#include <NXOpen/Session.hxx>
#include <NXOpen/SmartObject.hxx>
#include <NXOpen/Unit.hxx>
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/MeasureManager.hxx> Features::Feature* nullNXOpen_Features_Feature(NULL);
Features::ExtrudeBuilder* extrudeBuilder1;
extrudeBuilder1 = workPart->Features()->CreateExtrudeBuilder(nullNXOpen_Features_Feature);
Section* section1 = workPart->Sections()->CreateSection(0.001, 0.001, 0.05);
extrudeBuilder1->SetSection(section1);
extrudeBuilder1->AllowSelfIntersectingSection(true);//支持自相交截面
extrudeBuilder1->SetDistanceTolerance(0.001);
extrudeBuilder1->Limits()->StartExtend()->Value()->SetFormula("0");
extrudeBuilder1->Limits()->EndExtend()->Value()->SetFormula("12");
extrudeBuilder1->BooleanOperation()->SetType(GeometricUtilities::BooleanOperation::BooleanTypeCreate);//布尔类型:创建
std::vector<IBaseCurve*> curves1;
for (size_t i = 0; i < obj.size(); i++)//加入选择的线段
{
curves1.push_back(dynamic_cast<IBaseCurve*>(obj[i]));
}
CurveDumbRule* curveDumbRule1;
curveDumbRule1 = workPart->ScRuleFactory()->CreateRuleBaseCurveDumb(curves1);
section1->AllowSelfIntersection(true);//如果允许自相交,则为True,否则为false*
section1->AllowDegenerateCurves(false);//如果允许在section中简并曲线,则为True,否则为false
std::vector<SelectionIntentRule*> rules1(1);
rules1[0] = curveDumbRule1;
NXObject* nullNXOpen_NXObject(NULL);
Point3d helpPoint1(0.0, 0.0, 0.0);
section1->AddToSection(rules1, nullNXOpen_NXObject, nullNXOpen_NXObject, nullNXOpen_NXObject, helpPoint1, Section::ModeCreate, false); Point3d origin1(27.449526855605949, -106.81899463811334, 0.0);
Vector3d vector1(0.0, 0.0, -1.0);
Direction* direction1;
direction1 = workPart->Directions()->CreateDirection(origin1, vector1, SmartObject::UpdateOptionWithinModeling);//创建方向
extrudeBuilder1->SetDirection(direction1);
Features::Feature* feature1;
feature1 = extrudeBuilder1->CommitFeature();
extrudeBuilder1->Destroy();

最新文章

  1. 【MySql】查询数据库中所有表及列的信息
  2. thinkphp使用ajax
  3. scrapy基础教程
  4. [字符编码]Invalid byte 1 of 1-byte UTF-8 sequence终极解决方案
  5. Centos 7 通过挂载系统光盘搭建本地yum仓库的方法
  6. Web前端开发笔试&amp;面试_04_20161019MTBS
  7. DevExpress BarManager 部分用法
  8. oracle 报Ora-01008错误:oracle 并非所有变量都已绑定的原因.TO_number();动态执行select..into..语句时
  9. Hadoop FileInputFormat实现原理及源码分析
  10. @RequestBody和@ModelAttribute注解
  11. vue数组变异方法
  12. HTML中文本过长时自动隐藏末尾部分或中间等任意部分
  13. EasyChat简易聊天室实现
  14. 从源码的角度再看 React JS 中的 setState
  15. xpath-helper: 谷歌浏览器安装xpath helper 插件
  16. POJ 1035 Spell checker 字符串 难度:0
  17. Sencha Touch app example -- oreilly app 分析
  18. 开源方案搭建可离线的精美矢量切片地图服务-7.Arcgis Pro企业级应用
  19. Alpha 冲刺 —— 十分之八
  20. 从c++看js的那些概念

热门文章

  1. HashSet集合存储数据的结构(哈希表)-Set集合存储元素不重复的原理
  2. Sublime下运行javascript,并带彩色提示
  3. 火山引擎 DataLeap:3 个关键步骤,复制字节跳动一站式数据治理经验
  4. DBSCAN学习笔记
  5. ElasticSearch使用教程
  6. python70 前端框架之vue js的集中循环方式、key值的解释、input事件、v-model双向数据绑定、过滤案例、事件修饰符、按键修饰符、表单控制
  7. 五大数据类型 - 字符串 - 列表 list - 集合set - 有序集合 - 哈希 hashMap
  8. css当文字过长时,显示省略号
  9. vue3 语法糖setup 兄弟组件传值
  10. echarts的颜色渐变