NX二次开发UF_MODL_create_sweep 函数介绍

153 阅读4分钟

UF_MODL_create_sweep

Defined in: uf_modl_freeform.h 
int UF_MODL_create_sweep(UF_STRING_p_t s_guide, UF_STRING_p_t s_section, UF_STRING_p_t s_spine, UF_METHOD_p_t orientation, UF_METHOD_p_t scaling, int * alignment, int * inter, int * body_type, UF_FEATURE_SIGN boolean, double tol [ 3 ] , tag_t * body_obj_id )

overview 概述

Creates a freeform sweep feature. The first segment curve of each guide/section/spine is a starting curve. The output of this function is the object identifier associated to the sweep. Use UF_MODL_init_string_list and UF_MODL_create_string_list to create input strings. Use UF_MODL_free_string_list to free memory once this routine has been called, and the string list is no longer needed.


创建自由格式的扫描特性。每个导轨/部分/脊柱的第一段曲线是起始曲线。此函数的输出是与扫描关联的对象标识符。使用 UF _ MODL _ init _ string _ list 和 UF _ MODL _ create _ string _ list 创建输入字符串。调用此例程后,使用 UF _ MODL _ free _ string _ list 释放内存,不再需要字符串列表。

UFUN例子

获取源码例子请搜索 里海NX二次开发3000例专栏

parameters 参数

UF_STRING_p_ts_guideInputPointer to the guide list structure. int num Total number of guide strings (min=1, max=3) int string[ ] Total number of segment curves/ sketch identifier of each guide string (min=1, max =402) int dir[ ] Direction of each guide string 1 = Start to end -1 = End to start tag_t id[ ] Identifier of guide curve
指向指南列表结构的指针。导向串总数(最小 = 1,最大 = 3)导向串总数/每个导向串的示意图标识符(最小 = 1,最大 = 402)导向串的方向1 = 开始到结束 -1 = 结束到开始标记 _ t id []导向曲线的标识符
UF_STRING_p_ts_sectionInputPointer to the section list structure. int num Total number of section strings (min=1, max=150) int string[ ] Total number of segment curves/ sketch/face of each section string (min=1, max=402) int dir[ ] Direction of each section string 1 = Start to end -1 = End to start tag_t id[ ] Identifier of section curve
指向节列表结构的指针。每段字符串的方向1 = 开始到结束 -1 = 结束到开始 tag _ t id []段曲线的标识符
UF_STRING_p_ts_spineInputPointer to the spine list structure. int num Total number of section strings (min=0, max=1) int string[ ] Total number of segment curves/ sketch/face of each section string (min=1, max=402) int dir[ ] Direction of each section string 1 = Start to end -1 = End to start tag_t id[ ] Identifier of spine curve
指向脊柱列表结构的指针。分段字符串总数(min = 0,max = 1) int string []每个分段字符串的分段曲线/草图/面的总数(min = 1,max = 402) int dir []每个分段字符串的方向1 = 开始到结束 -1 = 结束到开始 tag _ t id []脊柱曲线的标识符
UF_METHOD_p_torientationInputPointer to the orientation list structure. int method Orientation method (for s_guide-> num = 1) 1 = Face normals 2 = Vector direction 3 = Another curve 4 = Fixed (parallel sweep) 5 = A point 6 = Angular law 7 = Forced direction int inter NOT USED tag_t id Base surface (for orientation->method =1) Datum axis (for orientation->method = 2,7) double value[3] Orientation 3D vector (for orientation->method = 2,7) Orientation 3D point (for orientation->method = 5) Law Function Value (for orientation->method=6) [0] = Angle law function offset [1] = Angle law function scale UF_STRING_p_t s_curve Pointer to curve structure list (for orientation->method = 3 or 6)
指向方向列表结构的指针。方向法(对于 s _ guide-> num = 1)1 = 面法线2 = 矢量方向3 = 另一条曲线4 = 固定(平行扫描)5 = 点6 = 角定律7 = 强迫方向 int interNOTUSED tag _ t id 基准面(方向-> 方法 = 1)基准轴(方向-> 方法 = 2,7)双值[3]方向三维矢量(方向-> 方法 = 2,7)方向三维点(方向-> 方法 = 5)定律函数值(方向-> 方法 = 6)[0] = 角度定律函数偏移量[1] = 角度定律函数刻度 UF _ STRING _ p _ t s _ 曲线指针到曲线结构列表(方向-> 方法 = 3或6)
UF_METHOD_p_tscalingInputPointer to the scaling list structure. int method Scaling method (for s_guide-> num = 1) 1 = Constant scale 2 = Blended 3 = Another curve 4 = A point 5 = Area law (for s_guide-> num = 2) 6 = Scale laterally 7 = Scale uniformly int inter Scale blended interpolation (for scaling->method = 2) tag_t id NOT USED double value[3] Scale values [0] = Scale factor (for scaling->method = 1) [0-1] = Scale range (for scaling->method = 2) [0-2] = 3D absolute point (for scaling->method = 4) Law Function Value (for scaling->method=5) [0] = Area law function offset [1] = Area law function scale UF_STRING_p_t s_curve Pointer to curve structure list (for scaling->method = 3 or 5)
指向缩放列表结构的指针。标度法(对于 s _ guide-> num = 1)1 = 常量标度2 = 混合3 = 另一条曲线4 = A 点5 = 面积定律(对于 s _ guide-> num = 2)6 = 标度横向7 = 刻度均匀缩放混合插值(缩放-> 方法 = 2) tag _ t id NOT USED 双值[3]缩放值[0] = 缩放因子(缩放-> 方法 = 1)[0-1] = 缩放范围(缩放-> 方法 = 2)[0-2] = 3D 绝对点(缩放-> 方法 = 4)定律函数值(缩放-> 方法 = 5)[0] = 面积定律函数偏移量[1] = 面积定律函数标度 UF _ STRING _ p _ t s _ 曲线指向曲线结构列表(用于标度-> 方法 = 3或5)
int *alignmentInputAlignment method: 1 = Parameter 2 = Arc Length
对准方法: 1 = 参数2 = 弧长
int *interInputInterpolation method (for s_section->num > 1): 1 = Linear 2 = Cubic
插值法(对于 s _ section-> num > 1) : 1 = 线性2 = 三次
int *body_typeInputType of body: 0 = Sheet (Default) 1 = Solid
车身类型: 0 = 板材(默认值)1 = 实心
UF_FEATURE_SIGNbooleanInputThe sign of the operation to be performed. UF_NULLSIGN = create new target solid UF_POSITIVE = add to target solid UF_NEGATIVE = subtract from target solid UF_UNSIGNED = intersect with target solid
要执行的操作的标志。UF _ NULLSIGN = 创建新的目标固体 UF _ POSITIVE = 添加到目标固体 UF _ NEGATIVE = 减去目标固体 UF _ UNSIGNED = 与目标固体相交
doubletol [ 3 ]InputTolerances: [0] = Distance [1] = Angle (in degrees) [2] = Intersection
公差: [0] = 距离[1] = 角度(度)[2] = 交点
tag_t *body_obj_idOutputBody object identifier of sweep
扫描体对象标识符