NX二次开发UF_MODL_create_curve_mesh 函数介绍

145 阅读5分钟

UF_MODL_create_curve_mesh

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

overview 概述

Creates a feature through a collection of curves running in two different directions. The following restrictions apply:

  1. The first segment curve of each primary/cross/spine is a starting curve.

  2. Points: a. A point object may be included, but only as the only one point of the first primary string and/or the only one point of the last primary string.

    b. Curve end point may be included but only as the only one point of the first primary string and/or the only one point of the last primary string.

    End point option and s_prim->dir[ ] indicates which end point should be used.

  3. Spine is optional. (s_spine->num = 0) a. The first/last primary must be planar. b. Spine must be perpendicular to the first/last primary.

  4. If the Spline Points parameter is set to 1, the input sections must all be single B-curves with the same number of defining points.

The output of this function is the object identifier associated to the feature.


通过一组沿两个不同方向运行的曲线创建一个特性。以下限制适用: 1。每个主要/交叉/脊柱的第一段曲线是起始曲线。2.分数: a。可以包含 point 对象,但只能作为第一个主字符串的唯一一个点和/或最后一个主字符串的唯一一个点。曲线端点可以包括在内,但只能作为第一个主字符串的唯一一个点和/或最后一个主字符串的唯一一个点。端点选项和 s _ prim-> dir []指示应该使用哪个端点。3.脊椎是可选的。(s _ bone-> num = 0) a.第一个/最后一个主体必须是平面的。脊柱必须垂直于第一次/最后一次。4.如果样条点参数设置为1,则输入部分必须是具有相同数量定义点的单条 B 曲线。这个函数的输出是与特性关联的对象标识符。

UFUN例子

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

parameters 参数

UF_STRING_p_ts_primInputPointer to the primary list structure. 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
指向主列表结构的指针。主字符串的总数(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. 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
指向交叉列表结构的指针。字符串交叉的总数(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 *body_typeInputType of body: 0 = Sheet (Default) 1 = Solid
车身类型: 0 = 板材(默认值)1 = 实心
int *spline_ptsInputSpline points flag: 0 = Do not reparameterize curves 1 = Reparameterize through spline points
样条点标志: 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_tc_face_id [ 4 ]InputObject identifiers of neighbor surfaces or 4 collectors of the faces from which constraints are obtained [0] = first primary string [1] = last primary string [2] = first cross string [3] = last cross string No constraint is imposed on the corresponding string if id = NULENT
相邻曲面的对象标识符或者从中获得约束的面的4个收集器[0] = 第一个主字符串[1] = 最后一个主字符串[2] = 第一个交叉字符串[3] = 最后一个交叉字符串如果 id = NULENT,则对相应的字符串不施加约束
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
身体对象标识符