NX二次开发UF_MODL_replace_sweep_strings 函数介绍

112 阅读2分钟

UF_MODL_replace_sweep_strings

Defined in: uf_modl_sweep.h 
int UF_MODL_replace_sweep_strings(tag_t sweep_feature_id, int n_original_profile_objs, tag_t * original_profile_objs, int n_new_profile_objs, tag_t * new_profile_objs, int n_original_guide_objs, tag_t * original_guide_objs, int n_new_guide_objs, tag_t * new_guide_objs )

overview 概述

This function will replace the profile and/or guide curves/edges of a sweep feature that can be one of the following types, Extruded, Revolved, Sweep (Along a Guide), Cable/Tube.

The original and replacement curves/edges in the arrays original_profile/ guide_objs and new_profile/guide_objs have to be contiguous. The original strings will be replaced in the order of the original_profile/ guide_objs array by the corresponding strings in the new_profile/guide_objs array. If n_original_profile/guide_objs > n_new_profile/guide_objs, the last (n_original_profile/guide_objs - n_new_profile/guide_objs) strings in the original_profile/guide_objs array will be removed from the sweep featur's profile/guide. If n_original_profile/guide_objs < n_new_profile/guide_objs, the last (n_new_profile/guide_objs - n_original_profile/guide_objs) strings in the new profile/guide array will be added to the feature.

It is suggested to use this function instead of UF_MODL_edit_sweep_curves if possible as UF_MODL_replace_sweep_strings has the edge/face tracking information retained when possible.


这个功能将取代剖面和/或导向曲线/边缘的扫描功能,可以是下列类型之一,挤压,旋转,扫描(沿着一个指南) ,电缆/管。阵列中的原始和替换曲线/边缘原始 _ profile/guide _ object 和 new _ profile/guide _ object 必须是连续的。原始字符串将按照原始 _ profile/guide _ obs 数组的顺序由 new _ profile/guide _ obs 数组中的相应字符串替换。如果 n 个原始配置文件/指南对象 > n 个新配置文件/指南对象,那么原始配置文件/指南对象数组中的最后一个字符串(n 个原始配置文件/指南对象-n 个新配置文件/指南对象)将从扫描特性的配置文件/指南中删除。如果 n 个原始配置文件/引导对象 < n _ new _ profile/guide _ objecs,新配置文件/引导数组中的最后一个字符串(n _ new _ profile/guide _ objecs-n _ yuan _ profile/guide _ objecs)将被添加到特性中。如果可能的话,建议使用这个函数来代替 UF _ MODL _ edit _ 万向曲线,因为 UF _ MODL _ place _ 万向曲线字符串在可能的情况下保留了边缘/面跟踪信息。

UFUN例子

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

parameters 参数

tag_tsweep_feature_idInputFeature object identifier of sweep
扫描的特征对象标识符
intn_original_profile_objsInputNumber of contiguous original curves/edges in the profile of the sweep feature to be replaced
要替换的扫描特征剖面中连续的原始曲线/边的数目
tag_t *original_profile_objsInputAn array of contiguous original curves/edges in the profile of the sweep feature to be replaced
要替换的扫描特征剖面中连续的原始曲线/边的数组
intn_new_profile_objsInputNumber of contiguous curves/edges to replace the curves/edges in the original_profile_objs.
用于替换原始 _ profile _ object 中的曲线/边的连续曲线/边的数目。
tag_t *new_profile_objsInputAn array of contiguous curves/edges to replace the curves/edges in the original_profile_objs.
一个连续的曲线/边数组,用于替换原始 _ profile _ object 中的曲线/边。
intn_original_guide_objsInputNumber of contiguous original curves/edges in the guide of the sweep feature to be replaced.
要替换的扫描特征指南中连续的原始曲线/边的数目。
tag_t *original_guide_objsInputAn array of contiguous original curves/edges in the guide of the sweep feature to be replaced.
一组连续的原始曲线/边在扫描特征的指导下被替换。
intn_new_guide_objsInputNumber of contiguous curves/edges to replace the curves/edges in the original_guide_objs.
用于替换原始 _ guide _ object 中的曲线/边的连续曲线/边的数目。
tag_t *new_guide_objsInputAn array of contiguous curves/edges to replace the curves/edges in the original_guide_objs.
一个连续的曲线/边数组,用于替换原始 _ guide _ object 中的曲线/边。