#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();

NXOpen拉伸的更多相关文章

  1. jQuery UI resizable使用注意事项、实时等比例拉伸及你不知道的技巧

    这篇文章总结的是我在使用resizable插件的过程中,遇到的问题及变通应用的奇思妙想. 一.resizable使用注意事项 以下是我在jsfiddle上写的测试demo:http://jsfiddl ...

  2. 放弃安卓原生TimePicker,选择wheelView打造更漂亮的时间get,以及动态拉伸输入框布局,这些,这里都有!

    最近公司要求的上线项目有这么一个需求,要写一个请假申请的页面,里面必须有请假开始时间,结束时间,还有一个请假原因. 于是想到时间选择嘛,官方不是有个DatePicker吗?额,是不是要DatePick ...

  3. 聊天气泡 button backgroundImage uiimage 拉伸 stretchableImageWithLeftCapWidth: 方法的使用

    - (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCap ...

  4. iOS图片拉伸技巧

    纵观移动市场,一款移动app,要想长期在移动市场立足,最起码要包含以下几个要素:实用的功能.极强的用户体验.华丽简洁的外观.华丽外观的背后,少不了美工的辛苦设计,但如果开发人员不懂得怎么合理展示这些设 ...

  5. 【原】iOS学习之图片拉伸处理(类似qq的气泡)

    原理是拉伸里面的内容,将边保护起来 方法1: ①[image resizableImageWithCapInsets:UIEdgeInsetsMake(, , , )]; ②[image resiza ...

  6. 巧用transform实现HTML5 video标签视频比例拉伸

    前言 原文地址 曾几何时,项目中有碰到视频比例拉伸的需求,但是发现这个看似再普通不过的一个需求,找遍全网至今都没有找到解决方法.因为强制给video标签设置width和height的话只会将video ...

  7. c# winform DirectX播放器 可以任意设置宽高比 屏幕拉伸

    第一步:dll引用 Microsoft.DirectX.dll Microsoft.DirectX.AudioVideoPlayback.dll 如果没有的话,可能需要安装微软的DRECTX JDK ...

  8. 解决android:background背景图片被拉伸问题

    ImageView中XML属性src和background的区别: background会根据ImageView组件给定的长宽进行拉伸,而src就存放的是原图的大小,不会进行拉伸.src是图片内容(前 ...

  9. background-size拉伸背景图片

    在制作页面中常需要对背景图片在容器中进行平铺,可用background-size属性对背景编辑:拉伸,压缩等~ background-size:contain; 将背景扩展到整个容器大小. 较为实用的 ...

  10. android 自定义scrollview 仿QQ空间效果 下拉伸缩顶部图片,上拉回弹 上拉滚动顶部title 颜色渐变

    首先要知道  自定义scrollview 仿QQ效果 下拉伸缩放大顶部图片 的原理是监听ontouch事件,在MotionEvent.ACTION_MOVE事件时候,使用不同倍数的系数,重置布局位置[ ...

随机推荐

  1. Timer的定时调度函数schedule的四种用法

    schedule的四种用法 schedule(task,time) task-所安排的任务  time-执行任务的时间 作用:在时间等于或者超过time的时候执行且仅执行一次 import java. ...

  2. 【学习日志】MySQL分表与索引的关系

    什么情况下需要分表呢?分表又能解决什么问题呢? 一般情况下分表的直接原因是数据量太大了,比如一张表一共只有1w条数据,确实没必要分表.为什么数据量大了就需要分表呢?首先得看看数量量过大后会带来什么问题 ...

  3. C-05\函数的底层原理

    一.程序运行时内存四大区 wres(内存属性): w:write(可写) r:read(可读) e:execute(可执行) s:share(可共享) 任何操作系统(windows.liunx.安卓. ...

  4. 线程基础知识14 ReentrantLock和ReentrantReadWriteLock

    1 简介 ReentrantLock和ReentrantReadWriteLock都是可重入锁.可重入锁,顾名思义,就是支持重进入的锁,它表示该锁能够支持一个线程对资源的重复加锁 ReentrantL ...

  5. springcloud 09 spring cloud gateway01 基本介绍

    官网:https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/2.2.1.RELEASE/reference/html/ 1. ...

  6. app实现外部浏览器打开链接

    需求:安卓和IOS开发的混合app.前端使用vue,vant2,安卓使用java,ios使用的object-c.实现效果:点击按钮,下载PDF附件,app跳转到手机外部浏览器,下载附件...... 1 ...

  7. dvgis计算两点间距离的问题

    先贴一段代码,是dvgis里的distance.js源码,dvgis是cesium的二次封装,可以参考参考: 1import{Cesium}from'@dc-modules/namespace' 2i ...

  8. Backbone 网络-ResNet 论文解读

    摘要 残差网络(ResNet)的提出是为了解决深度神经网络的"退化"(优化)问题. 有论文指出,神经网络越来越深的时候,反传回来的梯度之间的相关性会越来越差,最后接近白噪声.即更深 ...

  9. Uncaught ReferenceError: Cannot access 'constantRouterMap' before initialization

    这个问题可以在 main.js 中,调整 import  store from '@/store 和  import router from @/router 的先后顺序进行解决 router 在 s ...

  10. Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

    Scss/Sass 项目里使用 / 报错:Using / for division outside of calc() is deprecated and will be removed in Dar ...