NX二次开发UF_MODL_create_ruled1 函数介绍

103 阅读3分钟

UF_MODL_create_ruled1

Defined in: uf_modl_freeform.h 
int UF_MODL_create_ruled1(UF_STRING_p_t s_section, UF_STRING_p_t s_spine, int * alignment, double value [ 6 ] , int * end_point, int * body_type, UF_FEATURE_SIGN boolean, tag_t target_body, double tol [ 3 ] , tag_t * body_obj_id )

overview 概述

Creates a feature by assigning one-to-one correspondence between points on two selected curves and then connecting the corresponding points by straight lines. This function behaves like UF_MODL_create_thru_curves with 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.

The following restrictions apply:

  1. The first segment curve of each section spine is a starting curve.
  2. Point a. Point object may be included but only as the one point of the first section string. b. Curve end point may be included but only as the one curve of the first section string. s_section->dir[ ] indicates which end point should be used.

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


通过在两条选定曲线上的点之间分配双射,然后用直线连接相应的点来创建一个特性。这个函数的行为类似于 UF _ MODL _ create _ thru _ Curve,它有一个额外的输入,用于传递布尔操作的目标主体。如果 body _ type 是实体(1) ,并且要执行的操作的符号不是 create,则需要目标 body。以下限制适用: 1。各节段脊柱的第一段曲线为起始曲线。2.可以包含 Point 对象,但只能作为第一节字符串的一个点。曲线端点可以包括在内,但只能作为第一段字符串的一条曲线。S _ section-> dir []指示应该使用哪个端点。这个函数的输出是与特性关联的对象标识符。

UFUN例子

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

parameters 参数

UF_STRING_p_ts_sectionInputPointer to the section list structure. int num Total number of section string (min=2, max=2) int string[ ] Total number of segment curves/ sketch identifier 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 or the section builder object tags but not both
指向节列表结构的指针。每个部分的方向字符串1 = 开始到结束 -1 = 结束到开始标记 _ t id []分段曲线或分段构建器对象标记的标识符,但不能两者兼有
UF_STRING_p_ts_spineInputPointer to the spine list structure. (for alignment = 5) 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
指向脊柱列表结构的指针。(对齐 = 5) int num 脊柱字符串的总数(min = 0,max = 1) int string []每个脊柱字符串的段曲线/草图标识符的总数(min = 1,max = 402) int dir []每个脊柱字符串的方向1: 开始到结束 -1: 结束到开始 tag _ t id []脊柱曲线或剖面构建器对象标记的标识符,但不是两者兼有
int *alignmentInputAlignment method: 1 = Parameter 2 = Arc length 3 = Distance 4 = Angles 5 = Spine curves
对齐方法: 1 = 参数2 = 弧长3 = 距离4 = 角5 = 脊柱曲线
doublevalue [ 6 ]InputData for alignment method: [0-2] = 3D vector defining direction line (for alignment = 3) [0-5] = 3D start and end coordinates of line defining the axis of revolution for planes (for alignment = 4)
对准方法的数据: [0-2] = 定义方向线的3D 矢量(对于对准 = 3)[0-5] = 定义平面旋转轴的线的3D 起始和终止坐标(对于对准 = 4)
int *end_pointInputCurve end point or point 0 = Do not use end point 1 = Curve/point of first section string
曲线端点或点0 = 不使用端点1 = 曲线/第一节字符串的点
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
布尔操作的目标主体
doubletol [ 3 ]InputTolerances: [0] = Distance [1] = Angle (in radians) [2] = Intersection (not used)
公差: [0] = 距离[1] = 角度(弧度)[2] = 交点(未使用)
tag_t *body_obj_idOutputBody object identifier
身体对象标识符