标题: 請教一個API函數 UF_MODL_create_relative_dplane [打印本页] 作者: soul_liu 时间: 2006-3-16 10:27 标题: 請教一個API函數 UF_MODL_create_relative_dplane extern UFUNEXPORT int UF_MODL_create_relative_dplane(
int num_refs ,/* <I>
Number of constraint objects (<=3).
*/
tag_t object_tags[3] ,/* <I>
Array of constraint object tags (<=3). See the
table of "Available Constraint Types" for possible
constraint types.
*/
int point_select[3] ,/* <I>
Array indicating to use edge constraint or point on
edge constraint if edge tag is supplied in obj_tags:
UF_MODL_EDGE
UF_MODL_MID_POINT
UF_MODL_END_POINT
UF_MODL_RIGHT_END_POINT start point of the edge
UF_MODL_LEFT_END_POINT end point of edge
*/
int which_plane ,/* <I>
Solution number if more than one datum plane can
be constructed for the set of input constraints.
For the case where the first input object is a
CYL/REV/CONE/SPHERE and the second input object is a PLANE:
1. Two planes parallel to plane and tangent to the
face. The plane closest to the reference point is
returned first in the dplane_tag array.
2. Two planes perpendicular to plane and tangent
to the face. The plane closest to the reference
point is returned first in the dplane_tag array.
3. Plane through the face axis and angle to plane.
No reference point needed for this case.
For the case where the first input object is a CYL/REV
and the second input object is a CYL/REV/SPHERE:
(see Figure for examples)
1. Two planes where the tangency is on the "same
sides" of the faces. The plane closest to the
reference point is returned first in the
dplane_tag array.
2. Two planes where the tangency is on the
"opposite sides" of the faces. The plane closest
to the reference point is returned first in the
dplane_tag array.
3. Plane through both the face axes. No reference
point needed for this case.
For the case where the first input object is a CYL/REV/SPHERE
and the second input object is a POINT:
1. Two planes tangent to the face and through
point. The plane closest to the reference point
is returned first in the dplane_tag array.
*/
double reference_point[3] ,/* <I>
Reference points used with which_plane flag. If
NULL, then the order of the datum planes in the
dplane_tag array is arbitrary.
*/
char * angle_string ,/* <I>
Angle parameter string.
*/
char * offset_string ,/* <I>
Offset parameter string.
*/
int* num_dplanes ,/* <O>
Number of datum planes returned (<=2)
*/
tag_t dplane_tag[2] /* <O>
The created datum plane(s). These are feature tags.
*/
);
這個函數把許多創建基准面的方法都綜合到一起了﹐但我實在不知道該怎么使用它﹖
哪位高手能指點一下嗎﹖能夠舉些例子.不甚感激!
比方說自一個固定基准面創建相對基准平面代碼應該怎么寫,還有其它一些常用的情形﹖作者: pdcapp 时间: 2006-3-17 21:08 标题: 菜鸟请教楼主一个函数UF_MODL_create_block1, 看楼主问那个函数,估计楼主应该对这个函数也了解,求教了,^_^
这是文档里面的函数UF_MODL_create_block1的定义,我有个疑问就是红色部分的一个参数,既然* edge_len[3]表示的是Three edge lengths of block,那为什么还是 char 型的呢,,,?
/****************************************************************************
Creates a block. The Corner Point indicates the origin of the block to
be created. The X, Y and Z lengths control the size of the edge
lengths. The sign parameter controls the boolean operation
performed. The output of this function is the object identifier
associated to the block.
The origin point is with respect to the Absolute CSYS. However, the
direction of the edge lengths are with respect to the WCS.
Environment: Internal and External
See Also:
History:
***************************************************************************/
extern UFUNEXPORT int UF_MODL_create_block1(
UF_FEATURE_SIGN sign ,/* <I>
The sign of the operation to be performed.
UF_NULLSIGN = create new target solid
UF_POSITIVE = add to target solid
UF_NEGATIVE = subtract from target solid
UF_UNSIGNED = intersect with target solid
*/
double corner_pt[3] ,/* <I>
Corner point (origin) of block
*/
char * edge_len[3] ,/* <I>
Three edge lengths of block
*/
tag_t * blk_obj_id /* <O>
Feature object identifier of created block.
*/
);