NX二次开发UF_MODL_create_curve_mesh1 函数介绍

109 阅读8分钟

UF_MODL_create_curve_mesh1

Defined in: uf_modl_freeform.h 
int UF_MODL_create_curve_mesh1(UF_STRING_p_t s_prim, UF_STRING_p_t s_cross, UF_STRING_p_t s_spine, int * end_point, int * emphasis, int * spline_pts, int simple, int * body_type, UF_FEATURE_SIGN boolean, tag_t target_body, double tols [ 3 ] , int c_num [ 4 ] , tag_t * c_face_id [ 4 ] , int c_flag [ 4 ] , tag_t * body_obj_id )

overview 概述

Creates a free form B-surface feature through a collection of curves running in two different directions. This function behaves like UF_MODL_create_curve_mesh with the following enhancements.

  1. An extra input for passing in the target body for the boolean operation. If body_type is solid (1) and the sign of the operation to be performed is not create, then the target body is required.
  2. A "simple" option for lighter math representation with fewer poles and knots when possible.
  3. Face constraints now support multiple faces to be used as constraints on all four sides of the body.

RESTRICTIONS -

  1. The first segment curve of each primary/cross/spine should be a starting curve.
  2. Point a) Point object may be substituted for the first and/or last primary string. This allows the surface to start or terminate at a point. b) A curve end point may also be substituted for the first and/or last primary string. The end_point parameter and s_prim->dir[] will indicate which end point is chosen.
  3. Spine is optional. The parameter s_spine->num = 0 indicates no spine. If spine is selected then a) The first and last primary must be planar. b) Spine must be perpendicular to the first and last primary.


通过一组沿两个不同方向运行的曲线,创建一个自由形式的 B 曲面特征。此函数的行为类似于 UF _ MODL _ create _ Curve _ mesh,具有以下增强。1.一个额外的输入,用于传入布尔操作的目标主体。如果 body _ type 是实体(1) ,并且要执行的操作的符号不是 create,则需要目标 body。2.一个“简单”的选项,更轻的数学表示,更少的杆和结,如果可能的话。3.面约束现在支持将多个面用作身体四个方面的约束。限制-1。每个主要/交叉/脊柱的第一段曲线应该是起始曲线。2.点 a)点对象可以代替第一个和/或最后一个主字符串。这允许曲面在某一点开始或终止。B)曲线端点也可以代替第一个和/或最后一个主字符串。End _ point 参数和 s _ prim-> dir []将指示选择哪个端点。3.脊椎是可选的。参数 s _ spin- > num = 0表示没有脊柱。如果选择脊柱,则 a)第一个和最后一个主体必须是平面的。B)脊柱必须与第一根和最后一根基柱垂直。

UFUN例子

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

parameters 参数

UF_STRING_p_ts_primInputPointer to the primary list structure. When simple option is 2 or 4, then the user supplied template string for primary curves must be added as the last item of this section string structure, but the number of section strings will not be increased. For example, to create a feature using 3 primary section strings and a user defined primary template (simple option = 2 or 4), num would be 3, but string and dir would have 4 elements, string[3] would be the number of segment curves for the user defined primary template, and dir[3] would be the direction for the user defined template. The tags for the user defined template would be added onto the end of the id array. int num Total number of primary string (min=2, max=150) int string[ ] Total number of segment curves/ sketch id of each primary string (min=1, max =402) int dir[ ] Direction of each primary string 1 = Start to end -1 = End to start tag_t id[ ] Identifier of primary curve/point or the section builder object tags, but not both
指向主列表结构的指针。当简单选项为2或4时,用户为主曲线提供的模板字符串必须作为此节字符串结构的最后一项添加,但节字符串的数量不会增加。例如,要创建一个特性,使用3个主节字符串和一个用户定义的主模板(简单选项 = 2或4) ,num 将是3,但 string 和 dir 将有4个元素,string [3]将是用户定义的主模板的段曲线数,dir [3]将是用户定义的模板的方向。用户定义模板的标记将添加到 id 数组的末尾。主字符串的总数(min = 2,max = 150) int string []每个主字符串的段曲线/草图 id 的总数(min = 1,max = 402) int dir []每个主字符串的方向1 = 开始到结束 -1 = 结束到开始 tag _ t id []主曲线/点的标识符或剖面构建器对象标记,但不能两者兼有
UF_STRING_p_ts_crossInputPointer to the cross list structure. When simple option is 3 or 4, then the user supplied template string for cross curves must be added as the last item of this section string structure, but the number of section strings will not be increased. For example, to create a feature using 3 cross section strings and a user defined cross template (simple option = 3 or 4), num would be 3, but string and dir would have 4 elements, string[3] would be the number of segment curves for the user defined cross template, and dir[3] would be the direction for the user defined template. The tags for the user defined template would be added onto the end of the id array. int num Total number of string cross (min=2, max=150) int string[ ] Total number of segment curves/ sketch identifier of each string cross (min=1, max=402) int dir[ ] Direction of each string cross 1 = Start to end -1 = End to start tag_t id[ ] Identifier of cross curve or the section builder object tags, but not both
指向交叉列表结构的指针。当简单选项为3或4时,必须添加用户提供的用于交叉曲线的模板字符串作为此节字符串结构的最后一项,但是节字符串的数量不会增加。例如,要创建一个特性,使用3个横截面字符串和一个用户定义的交叉模板(简单选项 = 3或4) ,num 将是3,但 string 和 dir 将有4个元素,string [3]将是用户定义的交叉模板的段曲线数,dir [3]将是用户定义模板的方向。用户定义模板的标记将添加到 id 数组的末尾。字符串交叉的总数(min = 2,max = 150) int string []每个字符串交叉的段曲线/草图标识符的总数(min = 1,max = 402) int dir []每个字符串交叉的方向1 = 开始到结束 -1 = 结束到开始 tag _ t id []交叉曲线或剖面构建器对象标记的标识符,但不能两者兼有
UF_STRING_p_ts_spineInputPointer to the spine list structure. int num Total number of spine string (min=0, max=1) int string[ ] Total number of segment curves/ sketch identifier of each spine string (min=1, max=402) int dir[ ] Direction of each spine string 1 = Start to end -1 = End to start tag_t id[ ] Identifier of spine curve or the section builder object tags, but not both
指向脊柱列表结构的指针。每个脊柱字符串的方向1 = 开始到结束 -1 = 结束到开始 tag _ t id []脊柱曲线或剖面构建器对象标记的标识符,但不能两者兼有
int *end_pointInputCurve end point. 0 = Do not use end point 1 = Curve of first primary string 2 = Curve of last primary string 3 = Both
曲线终点。0 = 不要使用端点1 = 第一个主字符串的曲线2 = 最后一个主字符串的曲线3 = 两者
int *emphasisInputEmphasis flag 1 = Primary curves 2 = Cross curves 3 = Both
重点标志1 = 主曲线2 = 交叉曲线3 = 两者
int *spline_ptsInputSpline points flag: 0 = Do not reparameterize curves 1 = Reparameterize through spline points
样条点标志: 0 = 不重新参数化曲线1 = 通过样条点重新参数化
intsimpleInputSimple math option 0 : do not use simple creation 1 : use simple creation with system defined templates 2 : use simple creation with user supplied template for primary curves. The user supplied template string will be passed at the end of the s_prim structure above. 3 : use simple creation with user supplied template for cross curves. The user supplied template string will be passed at the end of the s_cross structure above. 4 : use simple creation with user supplied template for both primary and cross curves. In this case the user supplied template for primary curves will be passed at the end of the s_prim structure above, and the user supplied template for cross curves will be passed at the end of the s_cross structure above.
简单数学选项0: 不使用简单创建1: 使用系统定义模板的简单创建2: 使用用户提供的主曲线模板的简单创建。用户提供的模板字符串将在上面的 s _ prim 结构的末尾传递。3: 使用用户提供的交叉曲线模板进行简单创建。用户提供的模板字符串将在上面的 s _ cross 结构的末尾传递。4: 使用用户提供的主曲线和交叉曲线模板进行简单创建。在这种情况下,用户提供的主曲线模板将在上面的 s _ prim 结构的末尾传递,而用户提供的交叉曲线模板将在上面的 s _ cross 结构的末尾传递。
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 = 与目标固体相交
tag_ttarget_bodyInputThe target body for the boolean operation
布尔操作的目标主体
doubletols [ 3 ]InputTolerances: [0] = Distance [1] = Angle (in degrees) [2] = Intersection
公差: [0] = 距离[1] = 角度(度)[2] = 交点
intc_num [ 4 ]InputNumber of constraint faces or collectors of faces [0]: First primary string [1]: Last primary string [2]: First cross string [3]: Last cross string
约束面的数量或面的收集器[0] : 第一个主字符串[1] : 最后一个主字符串[2] : 第一个交叉字符串[3] : 最后一个交叉字符串
tag_t *c_face_id [ 4 ]InputPointers to object identifiers of neighbor surfaces or 4 collectors of faces from which constraints are obtained [0] = First primary string [1] = Last primary string [2] = First cross string [3] = Last cross string
指向邻近曲面的对象标识符或获得约束的面的4个收集器的指针[0] = 第一个主字符串[1] = 最后一个主字符串[2] = 第一个交叉字符串[3] = 最后一个交叉字符串
intc_flag [ 4 ]InputFlags indicating constraint types: 0 = No constraint 1 = Tangency constraint 2 = Curvature constraint with [0] = First primary string [1] = Last primary string [2] = First cross string [3] = Last cross string
指示约束类型的标志: 0 = 无约束1 = 相切约束2 = 曲率约束和[0] = 第一个主字符串[1] = 最后一个主字符串[2] = 第一个交叉字符串[3] = 最后一个交叉字符串
tag_t *body_obj_idOutputBody object identifier
身体对象标识符