NX二次开发UF_MODL_create_relative_dplane 函数介绍

175 阅读4分钟

UF_MODL_create_relative_dplane

Defined in: uf_modl_datum_features.h 
*int UF_MODL_create_relative_dplane(int num_refs, tag_t object_tags [ 3 ] , int point_select [ 3 ] , int which_plane, double reference_point [ 3 ] , char * angle_string, char * offset_string, int num_dplanes, tag_t dplane_tag [ 2 ] )**

overview 概述

Allows you to create relative datum planes based on the input constraints. Refer to the table of available constraint types shown below for the allowable combination of constraint types. If any of the constraint geometry is an edge, then you must specify whether you are using the edge or a point on the edge via the point_select parameter. The which_plane argument determines which datum plane solutions are returned. You can get up to two datum planes depending on the specified constraints. The reference point is used to specify which plane is returned first in the dplane_tag array. If you do not specify this value, then the datum planes are returned in an arbitrary order.

When editing the Datum Plane created by this function an old style datum plane dialog will be presented.

See the table of available constraint types NOTE: A "Through Point" constraint can only be specified by putting an edge in the object_tags array and an appropriate mid/end modifier in the point_select array.


允许您基于输入约束创建相对基准面。有关约束类型的允许组合,请参阅下面所示的可用约束类型表。如果任何约束几何图形是边,则必须通过 point _ select 参数指定是使用边还是使用边上的点。Which _ lane 参数确定返回哪个基准面解。根据指定的约束,最多可以获得两个基准面。引用点用于指定在 dplane _ tag 数组中首先返回哪个平面。如果您没有指定这个值,那么基准面将以任意顺序返回。当编辑这个函数创建的基准面时,会出现一个旧式的基准面对话框。请参阅可用约束类型表注意: “ Through Point”约束只能通过在 object _ tag 数组中放置一个边和在 Point _ select 数组中放置一个适当的中间/结束修饰符来指定。

UFUN例子

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

parameters 参数

intnum_refsInputNumber of constraint objects (<=3).
约束对象的数量(< = 3)。
tag_tobject_tags [ 3 ]InputArray of constraint object tags (<=3). See the table of "Available Constraint Types" for possible constraint types.
约束对象标记的数组(< = 3)。
intpoint_select [ 3 ]InputArray indicating to use edge constraint or point on edge constraint if edge tag is supplied in obj_tags: UF_MODL_EDGE UF_MODL_MID_POINT UF_MODL_END_POINT UF_MODL_RIGHT_END_POINT start point of the edge UF_MODL_LEFT_END_POINT end point of edge
数组指示在 obj _ tag 中提供边缘标记时使用边缘约束或边缘约束点: UF _ MODL _ EDGE UF _ MODL _ MID _ POINT UF _ MODL _ END _ POINT UF _ MODL _ Right _ END _ POINT 边缘 UF _ MODL _ LEFT _ END _ POINT 端点的边缘 UF _ MODL _ LEFT _ END _ POINT 起始点
intwhich_planeInputSolution number if more than one datum plane can be constructed for the set of input constraints. For the case where the first input object is a CYL/REV/CONE/SPHERE and the second input object is a PLANE: 1. Two planes parallel to plane and tangent to the face. The plane closest to the reference point is returned first in the dplane_tag array. 2. Two planes perpendicular to plane and tangent to the face. The plane closest to the reference point is returned first in the dplane_tag array. 3. Plane through the face axis and angle to plane. No reference point needed for this case. For the case where the first input object is a CYL/REV and the second input object is a CYL/REV/SPHERE: (see Figure for examples) 1. Two planes where the tangency is on the "same sides" of the faces. The plane closest to the reference point is returned first in the dplane_tag array. 2. Two planes where the tangency is on the "opposite sides" of the faces. The plane closest to the reference point is returned first in the dplane_tag array. 3. Plane through both the face axes. No reference point needed for this case. For the case where the first input object is a CYL/REV/SPHERE and the second input object is a POINT: 1. Two planes tangent to the face and through point. The plane closest to the reference point is returned first in the dplane_tag array.
当输入约束集可以构造多个基准面时的解数。对于第一个输入对象是一个 CYL/REV/CONE/SPHEL,第二个输入对象是一个 PLANE: 1的情况。两个平面平行于平面,与面相切。最接近引用点的平面首先在 dplan_ tag 数组中返回。2.两个平面垂直于平面,与面相切。最接近引用点的平面首先在 dplan_ tag 数组中返回。3.平面通过面轴和角度到平面。这个案子不需要参考点。对于第一个输入对象是一个 CYL/REV,第二个输入对象是一个 CYL/REV/SPWHERE 的情况: (参见图中的例子)1。两个平面的切线在面的“同一边”上。最接近引用点的平面首先在 dplan_ tag 数组中返回。2.两个平面的切线在两个面的“对面”上。最接近引用点的平面首先在 dplan_ tag 数组中返回。3.平面通过两个面轴。这个案子不需要参考点。对于第一个输入对象是一个 CYL/REV/SPHEL,第二个输入对象是一个 POINT: 1的情况。两个平面与面和通过点相切。最接近引用点的平面首先在 dplan_ tag 数组中返回。
doublereference_point [ 3 ]InputReference points used with which_plane flag. If NULL, then the order of the datum planes in the dplane_tag array is arbitrary.
使用 which _ planFlag 的参考点。如果为 NULL,那么 dplane _ tag 数组中基准面的顺序是任意的。
char *angle_stringInputAngle parameter string.
角度参数串。
char *offset_stringInputOffset parameter string.
偏移量参数字符串。
int*num_dplanesOutputNumber of datum planes returned (<=2)
返回的基准面数(< = 2)
tag_tdplane_tag [ 2 ]OutputThe created datum plane(s). These are feature tags.
创建的基准平面。这些是特征标记。