iCAx开思工具箱

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 24247|回复: 1
打印 上一主题 下一主题

该函数的用法UF_MODL_replace_features

[复制链接]
跳转到指定楼层
楼主
发表于 2008-6-25 11:27:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
问题描述:
现在画两条线,将其中一条拉伸成面,然后进行如下操作:用未拉伸的线去替换拉伸的线,并使得拉伸的面也移动到未拉伸的线出,也就是子特征也拷贝过去,我用上面的函数UF_MODL_replace_features操作发现拉伸特征并没有拷贝过去,单步调试发现返回值不为0,最后一个参数n_parent_map为巨大的负数,看了英文帮助发现有点难懂,遂请大侠帮忙看看如何实现我的功能单靠这个函数是否能实现,如果能我的参数设置是不是错误了,错在哪儿?
代码:
        UF_MODL_replace_features_t *replm_map=NULL;//帮助写可为输入/输出参数,我作为输入,不知道正确与否
        int n_replm_map;//
        errorCode = UF_MODL_replace_features(&first_element,1,&second_element,1,true,true,&replm_map,&n_replm_map);

函数注释:(小弟英文水平和理解力有限请大侠帮忙)
This function replaces the features in original_features[] by the
features in replacement_features[] or the copies of features in
replacement_features[] if original_features[] are features on bodies,
curve features and datum features. The children of the original_features[]
will be reparented to the replacement_features[] or copies.

The original features will be deleted.

original_features[] can contain: features on the same body, curve features,
datum plane and datum axis features.

replacement_features[] must contain: features on other bodies (if
original_features[] contains features on a body), other curve features
(if original_features[] contains curve features) and other datum plane
and other datum axis features (if original_features[] contains datum plane
or datum axis features).

Note that original_features[] and replacement_features[] must contain
features that are in the same part file. Also, for features on a body, the
parents of each of the features in replacement_features[] must be either
another feature in the replacement_features[] or must be a feature which
is before the earliest feature in the original_features[].

parent_map[] maps entities created by the original_features[] to the
corresponding entities on the replacement_features[]. In addition to the
original_features[] and replacement_features[] you will have to provide a map
of edges and faces on the original_features[] to the corresponding edges and
faces of the replacement_features[].

You will specify the map as a array of objects of type
UF_MODL_replace_features_t described below. The children of the
original_features[] will be reparented to copies of the corresponding
entities on the replacement_features[] that are specified in the parent_map[].

Calling this function with return_map as true does not perform the replacement
but returns a parent_map[] each of whose original_entity elements are edges
and faces created by original_features[]. Only those edges and faces that are
parents of downstream features are returned in the parent_map[]. The
replacement_entity elements of all the structures in the parent_map[] are 0.
You will have to assign the appropriate replacement_entity for each of
the structures returned in the parent_map[] before calling this function with
return_map as false to perform the actual replace.
参数示意:
tag_t *original_featuresInputArray of features to replace
intn_original_featuresInputnumber of original_features
tag_t *replacement_featuresInputArray of replacement features
intn_replm_featuresInputnumber of replacement_features
logicalreturn_mapInputreturn_map = true - return in
parent_map[] the edges and faces created
by the original_features[] which have to
be mapped to the corresponding edges and
faces on the replacement_features[]
return_map = false - perform the replace
logicaluse_copy_of_replacementInputuse_copy_of_replacement = false -
Use the replacement features directly to
replace the original features
use_copy_of_replacement = true - Copy
the replacement features and use the copy
of the replacement feature to replace the
original features
UF_MODL_replace_features_t * *parent_mapInput / OutputMap of edges and faces
created by the
original_features[] to
corresponding edges and faces
on the replacement_features[]
int *n_parent_mapInput / Outputnumber of elements in (parent_map)[]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 支持支持
沙发
 楼主| 发表于 2008-6-25 12:06:03 | 只看该作者

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

replace.gif (177.27 KB, 下载次数: 3)

replace.gif
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手板模型制作,在线3D打印服务

QQ|小黑屋|手机版|开思工具箱 CAD工具箱_CAM工具箱  

GMT+8, 2024-11-25 02:33 , Processed in 0.014956 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表