iCAx开思工具箱

标题: 关于函数UF_MODL_create_simplify [打印本页]

作者: frecar    时间: 2005-4-4 20:55
标题: 关于函数UF_MODL_create_simplify
请问该函数正确的输入参数是那些?那些是必须输入的,哪些可以不用输入
对这个函数现在真的是屡试不爽阿。郁闷!
请知道的大虾,指点一番
作者: wflying    时间: 2005-4-4 21:32
你自己看吧,我的英文不好!
The UF_MODL_simpl_data_s structure contains the parametric information used
to define a simplification feature.
  
When the simplification feature is applied to a body, certain faces are
removed from the body, and the gaps are healed over (creating new faces if
necessary). The faces to be removed are determined as follows:
  
All faces in the array <retained_faces> are retained.
Any face that can be reached from another retained face without crossing a
boundary edge is retained.
All other faces are removed. NOTE: The interactive Simplify dialog
automatically adds any boundary face to the retained_faces array. This must
be done by the caller of UF_MODL_create_simplify to achieve the same results.
  
The boundary edges are defined as follows:
  
All edges in the array <boundary_edges> are boundary edges.
None of the edges in the array <non_boundary_edges> are boundary edges.
All edges of faces in the array <boundary_faces>, except those edges in the
array <non_boundary_edges>, are also boundary edges.
All edges created by imprint features in the array <imprint_features>, except
those edges in the array <non_boundary_edges>, are also boundary edges.
The edges of holes on the body whose diameter is less than the current value
of <max_hole_dia_expression>, except those edges in the array
<non_boundary_edges>, are also boundary edges. (Effectively, such holes are
removed.) A hole is defined to be an inward-pointing full cylindrical face
or an inward-pointing full conical face. To suppress this option, simply
pass in an expression evaluating to 0.0 or less.
  
The array <removed_faces> can be used to verify the simplification feature.
If any face in it would remain on the solid after the feature were created,
the feature is not actually created and the ifail
UF_MODL_SIMPL_FACE_NOT_REMOVED is returned. This also applies if the feature
is previewed.
  
The following restrictions apply to simplify parms:
A face may be both a retained face and a boundary face, hence the two arrays
may have elements in common.
A retained or boundary face may not be a removed face.
At least one retained face must be supplied.
All faces must be on the same body.
The <boundary_edges> and the <non_boundary_edges> arrays can have no elements
in common.
  
In some cases, one or more faces cannot be removed at all, because the
surrounding faces cannot be healed across them, or because this would divide
the body into two or more disjoint pieces. In this case, the ifail
UF_MODL_SIMPL_HEAL_FAILED is returned. These cases cannot be detected by
previewing the simplification, only when it is actually applied.
  
Data Members
n_retained_faces
int n_retained_faces
Number of retained faces
  
retained_faces
tag_t* retained_faces
Array of retained faces
  
n_boundary_faces
int n_boundary_faces
Number of boundary faces
  
boundary_faces
tag_t* boundary_faces
Array of boundary faces
  
n_removed_faces
int n_removed_faces
Number of removed faces
  
removed_faces
tag_t* removed_faces
Array of removed faces
  
n_boundary_edges
int n_boundary_edges
Number of boundary edges
  
boundary_edges
tag_t* boundary_edges
Array of boundary edges
  
n_non_boundary_edges
int n_non_boundary_edges
Number of non-boundary edges
  
non_boundary_edges
tag_t* non_boundary_edges
Array of non-boundary edges
  
n_imprint_features
int n_imprint_features
Number of imprint features to apply
  
imprint_features
tag_t* imprint_features
Array of imprint features whose edges are to be boundaries
  
max_hole_dia_expression
tag_t max_hole_dia_expression
Expression for maximum diameter holes to remove
作者: frecar    时间: 2005-4-4 21:45
上面这段说明,我都看了好多遍了,无奈还是没有领会其中的意思。
我尝试过,把保留面,边界面和移除面都求出来,作为这个结构的
输入值,但是还是出现“第一个参数不合理的错误”,边界线,和非边界线
我也求出来,放到结构中,但还是同样的问题。
很多种可能都已经尝试过了,都出现相同的问题。
因此实在是不知道,该怎么输入了
作者: wflying    时间: 2005-4-4 22:06
参数的类型对了吗?应该是没有什么问题的啊。
作者: frecar    时间: 2005-4-4 22:26
参数的类型没有问题,计算出来的结果也是对的。
但就是在调用这个函数时,出现问题。
从理解上来说,这个函数应该是根据保留面,边界面和通过边界线创建的
面缝合成实体。
因此,保留面,边界面和移除面,以及边界线,非边界线都是必须要输入的
参数。边界线是通过边界面来求取边的,不知道还有没有别的输入要求。
后面的三个参数,应该是可选的,不知道我这样理解对不对?
作者: frecar    时间: 2005-4-5 09:06
谢谢,已解决
作者: 2323220987    时间: 2005-4-5 15:23
能说说是怎么解决的吗,让大家增加点知识
作者: frecar    时间: 2005-4-5 21:39
其实也没什么,把问题想得太复杂了,错误的原因就在缺少一个expression tag




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3