iCAx开思工具箱

标题: 【求助】如何获得曲面的包容矩形 [打印本页]

作者: liyan    时间: 2003-11-2 20:37
标题: 【求助】如何获得曲面的包容矩形
我有个问题,希望大家帮帮我!
在ug中有没有函数能获得给定的曲面的包容矩形的大小?(在xyz方向上)
作者: mazhiguo    时间: 2003-11-4 10:56
看一下这个函数中的参数double box[] 的解释,是否是你需要的!!
extern UFUNEXPORT int UF_MODL_ask_face_data(
tag_t face ,/* <I>
            Face obj_id
            */
int * type ,/* <O>
            Face type is UG surface type code
            16 = cylinder
            17 = cone
            18 = sphere
            19 = revolved
            20 = extruded
            22 = bounded plane
            23 = fillet (blend)
            43 = b-surface
            65 = offset surface
            66 = foreign surface
            */
double point[] ,/* <O>
                &nbspoint information is returned according to the value
                 of type as follows.
                &nbsplane   =       Position in plane
                 Cylinder=       Position on axis
                 Cone    =       Position on axis
                 Sphere  =       Center position
                 Torus   =       Center position
                 Revolved =      Position on axis
                 */
double dir[] ,/* <O>
               Direction information is returned according to the
               value of type as follows.
              &nbsplane   =       Normal direction
               Cylinder=       Axis direction
               Cone    =       Axis direction
               Torus   =       Axis direction
               Revolved =      Axis direction
               */
double box[] ,/* <O>
               Face boundary. The coordinates of the opposite
               corners of a rectangular box with sides parallel to X,
               Y, and Z axes (Absolute Coordinate System) are
               returned. The box contains the specified face and is
               usually close to the minimum possible size, but this
               is not guaranteed.
               box[0] = Xmin
               box[1] = Ymin
               box[2] = Zmin
               box[3] = Xmax
               box[4] = Ymax
               box[5] = Zmax
               */
double * radius ,/* <O>
                 Face major radius:
                 For a cone, the radius is taken at the point[3]
                 position on the axis.
                 For a torus, the radius is taken at the major axis.
                 */
double * rad_data ,/* <O>
                   Face minor radius: only a torus or cone has rad_data as
                   a minor radius.
                   For a cone, rad_data is the half angle in radians.
                   For a torus, rad_data is taken at the minor axis.
                   */
int * norm_dir  /* <O>
                Face normal direction:  +1 if the face normal is in the
                same direction as the surface normal (cross product of
                the U- and V-derivative vectors), -1 if reversed.
                */
);




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