#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. 静态static关键字概述-静态static关键字修饰成员变量

    静态static关键字概述 概述 关于 static 关键字的使用,它可以用来修饰的成员变量和成员方法,被修饰的成员是属于类的,而不是单单是属 于某个对象的.也就是说,既然属于类,就可以不靠创建对象来 ...

  2. 论文翻译:2022_腾讯DNS 1th TEA-PSE: Tencent-ethereal-audio-lab personalized speech enhancement system for ICASSP 2022 DNS CHALLENGE

    论文地址:TEA-PSE: 用于ICASSP 2022 DNS挑战赛的Tencent-ethereal-audio-lab 个性化语音增强系统 论文代码: 引用格式:Ju Y, Rao W, Yan ...

  3. 9月22日内容总结——计算机五大组成部分详解、编程语言及发展史、python解释器安装与环境变量设置

    内容总结 目录 内容总结 一.计算机五大组成部分详细介绍 1.控制器 2.运算器 3.存储设备 4.输入设备 5.输出设备 二.计算机三大核心硬件 1. cpu 2.内存 举例:写文档时,突然关机了. ...

  4. VM安装Centos 经典安装

    1 VM安装配置 1.1 新建虚拟机 1.2 选择典型 1.3 选择CentOS镜像 链接:https://pan.baidu.com/s/1K2rTjrWY5sgEgx2pU0x-gg 提取码:89 ...

  5. Docker安装SqlServer、Mysql、MariaDB

    一.Docker 安装SqlServer 说明 1. 拉取镜像 docker pull mcr.microsoft.com/mssql/server:2019-latest 2.运行 docker r ...

  6. Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation

    1.出现问题 查询数据时报如题错误 2.解决方案 建表时需指定字符集,例如: -- ---------------------------- -- Table structure for testTa ...

  7. Containers feature is disabled. Enable it using the PowerShell script (in an administrative PowerShe

    1.问题如题如下图 2.解决办法 以管理员身份运行Window Terminal(Windows PowerShell),输入图上下方所示命令 Enable-WindowsOptionalFeatur ...

  8. Spring(Ioc DI、Spring的继承-依赖)

    IoC Di Di 指的是bean之间的依赖注入,设置对象之间的级联关系 Classes: package com.southwind.entity; import lombok.Data; @Dat ...

  9. GitHub 入门 与 2023年2月18日10:29:02

    用 GitHub 有一段时间了,之前一直用来做 Hexo 的服务器,直到前阵子搞 GitHub Action 因为命令不熟,把 GitHub 上的源码强制拉到本地把本地的 Hexo 搞崩了,博客源码都 ...

  10. UOJ NOI Round #6

    总结 \(\text{Day1}\) 只打了 \(T1\),想正解无果以致于没时间打暴力 \(\text{T1}\) 考虑到最后一个面基者要么落在点上,要么落在边上 所以可以枚举点和边,统计最久的落在 ...