NX二次开发UF_MODL_model_compare 函数介绍

153 阅读3分钟

UF_MODL_model_compare

Defined in: uf_mdlcmp.h 
int UF_MODL_model_compare(tag_t part1, tag_t body_eids_part1, double transform_1 [ 16 ] , tag_t part2, tag_t body_eids_part2, double transform_2 [ 16 ] , logical compare_feat_and_exp, UF_MODL_compare_accuracy_t accuracy, double tolerance, UF_MODL_compare_identicalface_rule_t identical_face_rule, UF_MODL_compare_changeduniqueface_rule_t uniquechangedfacerule, logical launch_ui, UF_MODL_compare_part_map_data_t * mapping_data )

overview 概述

Function Name: UF_MODL_model_compare

Function Description: Compare parts. Compare bodies from the same part file or from different part files.

Input: part1 - tag of part1 body_eid_part1 - Body eid from part 1, if NULL, all bodies from part 1 Bodies from the part must pass examine geometry check. transform_1 - Transform for body_eid_part_1. Transformation needed to convert body 1 into the same co-ordinate system as body 2. Initialize with UF_MTX4_identity if bodies are defined in the same coordinate system. NOTE Applicable only if part 1 and part 2 are not related and body_eid_part1 and body_eid_part2 are not NULL. If they are NULL, there should be only one body in part1 and part2. part2 - tag of part2 body_eid_part2 - Body eid from part 2, if NULL, all bodies from part 2 Bodies from the part must pass examine geometry check. transform_2 - Transform for body_eid_part_2. Transformation needed to convert body 2 into the same co-ordinate system as body 1. Initialize with UF_MTX4_identity if bodies are defined in the same coordinate system. NOTE Applicable only if part 1 and part 2 are not related and body_eid_part1 and body_eid_part2 are not NULL. If they are NULL, there should be only one body in part1 and part2. compare_feat_and_exp - Whether to compare features and expressions. Applicable only if part1 and part2 are related. accuracy - Accuracy setting for comparison tolerance - Tolerance to be used to determine if two geometries can be considered coincident identical_face_rule - Rule for classifying faces as identical changeduniquefacerule - Rule for classifying related faces as changed or unique launch_ui - Whether to launch ui NOTE This option is not yet supported

Output: mapping_data - Mapping data, result of the comparison Note: Caller is responsible for freing the mapping data


函数名称: UF _ MODL _ model _ ratio 函数描述: 比较部分。比较来自相同零件文件或不同零件文件的正文。输入: part1-part1 Body _ eid _ part1的标记-第1部分的 Body eid,如果为 NULL,则第1部分的所有主体必须通过检查几何检查。Change _ 1-body _ eid _ part _ 1的转换。将物体1转换为与物体2相同的坐标系需要进行转换。如果主体在同一个坐标系中定义,则使用 UF _ MTX4 _ Identity 初始化。注意: 只有在第1部分和第2部分不相关,body _ eid _ part1和 body _ eid _ part2不为 NULL 的情况下才适用。如果它们是 NULL,那么在第1部分和第2部分中应该只有一个主体。Part2的 part2-tag Body _ eid _ part2-第2部分的 Body eid,如果为 NULL,则第2部分的所有主体必须通过检查几何检查。Change _ 2-body _ eid _ part _ 2的变换。将物体2转换为与物体1相同的坐标系需要进行转换。如果主体在同一个坐标系中定义,则使用 UF _ MTX4 _ Identity 初始化。注意: 只有在第1部分和第2部分不相关,body _ eid _ part1和 body _ eid _ part2不为 NULL 的情况下才适用。如果它们是 NULL,那么在第1部分和第2部分中应该只有一个主体。是否比较特性和表达式。只适用于第一部分与第二部分相关的情况。精度-比较公差的精度设置-用于确定两个几何图形是否可以被认为是重合的相同 _ face _ Rule-将面分类为相同的 changeduniquefacerule 的规则-将相关面分类为已更改或唯一启动的规则-是否启动 ui NOTE 此选项尚不支持输出: map _ data-映射数据,比较结果注: 调用者负责释放映射数据

UFUN例子

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

parameters 参数

tag_tpart1Input
tag_tbody_eids_part1Input
doubletransform_1 [ 16 ]Input
tag_tpart2Input
tag_tbody_eids_part2Input
doubletransform_2 [ 16 ]Input
logicalcompare_feat_and_expInput
UF_MODL_compare_accuracy_taccuracyInput
doubletoleranceInput
UF_MODL_compare_identicalface_rule_tidentical_face_ruleInput
UF_MODL_compare_changeduniqueface_rule_tuniquechangedfaceruleInput
logicallaunch_uiInput
UF_MODL_compare_part_map_data_t *mapping_dataOutput