UF_MODL_boolean_udf
Defined in: uf_modl_udf.h
int UF_MODL_boolean_udf(tag_t udf_id, tag_t target_face, tag_t tool_face, double tool_dir [ 3 ] , int num_target_faces, tag_t * solid_target_faces, int num_tool_faces, tag_t * solid_tool_faces, logical included, tag_t * udf_meta_id )
overview 概述
Performs a Boolean on a user defined feature in the active part. The type of Boolean operation to perform is specified in the sign parameter of UF_MODL_export_udf. The x-direction, with respect to the planar tool face, is used to define the coordinate system for the relative position dimension constraints. The normal to the planar tool face is the z-direction and is used with the x-direction (axis) to fully specify the relative position dimension coordinate system.
When specifying trim faces to trim the UDF, the following points should be noted:
- All target faces must come from the same body.
- All faces including target and tool faces should be solid faces, and neither datum planes nor sheet faces are allowed.
- Non-planar faces can be used as target faces to trim a UDF body. However, if there are n trim faces, and a UDF body is cut to more than n+1 pieces, then the trimming might not work as expected. So a closed periodical face like a cylindrical face is not recommended to trim a UDF. However, an open non-planar face like a quarter cylindrical face could be used to trim a UDF.
- Trimming UDF is not applicable if this UDF's attachment mode is creation mode.
- Multiple target faces and tool faces can be specified, there is no limitation on how many faces can be specified.
- This routine should be called after UF_MODL_set_udf_parms.
- Once a udf is trimmed, it cannot be instanced to create an instance array.
- Note that if the trim faces do not completely intersect the UDF tool body, trimming might fail. One way to avoid this is to specify RPO (relative positioning) constraints by calling UF_MODL_register_rpo_routine.
- Redefining trim faces of UDF is not supported.
Note: This routine works only with old-style Pre-V15 UDFs
对活动部分中用户定义的特性执行布尔值。要执行的布尔操作的类型在 UF _ MODL _ export _ udf 的符号参数中指定。相对于平面工具面,x 方向用于定义相对位置尺寸约束的坐标系。平面工具面的法线是 z 方向,与 x 方向(轴)一起用来完全指定相对位置的尺寸坐标系。当指定修剪面来修剪 UDF 时,应该注意以下几点: 1。所有目标面部必须来自同一个身体。2.包括靶面和刀面在内的所有面都应为实心面,基准面和板面都不允许。3.非平面面可以作为目标面来修剪 UDF 主体。然而,如果有 n 个修剪面,并且 UDF 主体被切割成多于 n + 1片,那么修剪可能不会像预期的那样工作。因此,像圆柱面一样的封闭周期面不建议修剪 UDF。然而,一个开放的非平面面像一个四分之一圆柱面可以用来修剪 UDF。4.如果该 UDF 的附件模式是创建模式,则不适用于修剪 UDF。5.可以指定多个目标面和工具面,不限制可以指定多少个面。6.这个例程应该在 UF _ MODL _ set _ udf _ parms 之后调用。7.一旦修剪了 udf,就不能对其进行实例化以创建实例数组。8.请注意,如果修边面不完全相交的 UDF 工具主体,修边可能会失败。避免这种情况的一种方法是通过调用 UF _ MODL _ register _ RPO _ 惯例来指定 RPO (相对定位)约束。9.不支持重新定义 UDF 的修剪面。注意: 这个例程只适用于旧式的 Pre-V15 UDF
UFUN例子
获取源码例子请搜索 里海NX二次开发3000例专栏
parameters 参数
| tag_t | udf_id | Input | Feature obj_id. 特征 obj _ id。 |
| tag_t | target_face | Input | Planar face on the target body. 目标身体上的平面面孔。 |
| tag_t | tool_face | Input | Planar face on the tool body (of the UDF). 工具主体上的平面面(UDF 的)。 |
| double | tool_dir [ 3 ] | Input | Relative position coordinate system x-direction. 坐标系 x 方向的相对位置。 |
| int | num_target_faces | Input | number of faces in solid_target_faces array. If not trimming the UDF, set it 0. Solid _ target _ faces 数组中的面数。如果不修整 UDF,则将其设置为0。 |
| tag_t * | solid_target_faces | Input | array of faces on the target used as trim faces to trim the UDF. If not trimming the UDF, set it NULL. 在目标上的面阵列用作修剪面来修剪 UDF。如果不修整 UDF,则将其设置为 NULL。 |
| int | num_tool_faces | Input | number of faces in solid_tool_faces array. If not trimming the UDF, set it 0. Solid _ tool _ faces 数组中的面数。如果不修整 UDF,则将其设置为0。 |
| tag_t * | solid_tool_faces | Input | array of faces on the UDF to indicate which portions of the UDF are going to be included or excluded when the UDF is trimmed. If not trimming the UDF, set it to NULL. UDF 上的面数组,以指示在修剪 UDF 时将包含或排除 UDF 的哪些部分。如果不修整 UDF,则将其设置为 NULL。 |
| logical | included | Input | true if included faces; false if excluded faces. 如果包含面,则为真; 如果排除面,则为假。 |
| tag_t * | udf_meta_id | Output | Tag to use for all subsequent calls to this udf 标记用于对这个 udf 的所有后续调用 |