IFTHEN/xmPt-x_mPt==0
MESSG/'X Axis size of The block is wrong'
JUMP/idover:
ENDIF
IFTHEN/ymPt-y_mPt==0
MESSG/'Y Axis size of The block is wrong'
JUMP/idover:
ENDIF
IFTHEN/zmPt-z_mPt==0
MESSG/'Z Axis size of The block is wrong'
JUMP/idover:
ENDIF
objct1 = SOLBLK/ORIGIN,x_mPt,y_mPt,z_mPt,SIZE,xmPt-x_mPt,ymPt-y_mPt,zmPt-z_mPt
xPt=(x_mPt+xmPt)/2
yPt=(y_mPt+ymPt)/2
zPt=z_mPt
P1=POINT/xPt,yPt,zPt
P2=POINT/xPt+50,yPt,zPt
P3=POINT/xPt,yPt+50,zPt
CSYS1=CSYS/P1,P2,P3,ORIGIN,P1
&WCS=CSYS1
&WCSDRW=&YES
DELETE/P1,P2,P3
idover:
HALT作者: hmq78 时间: 2009-5-9 10:49
顶,谢谢了作者: hmq78 时间: 2009-5-9 10:50
能不能告诉下怎么控制工程图中基本视图的大小比例啊作者: sumojinli 时间: 2009-9-9 23:23
看贴必回贴!!!!!!作者: tzsiyuan 时间: 2009-9-16 00:32
good. thanks作者: lgmsddy 时间: 2009-9-18 07:42
顶起来,…………作者: kailler 时间: 2009-10-3 17:31
不懂grip,不过看上去是沿着xyz轴求的外形尺寸,如果是这样的话,这个用open nx好像一个函数就可以了
/******************************************************************************
Returns the bounding box information of wireframe and solid type objects
aligned to a CSYS.
Wireframe objects include lines, arcs, splines, and conics. Solid type
objects include bodies, faces, and edges. Bounding box values are
returned in absolute coordinate values according to where the object
exists in the part file and aligned to the input CSYS.
If you call this function with an occurrence, the bounding box
of the underlying geometry is transformed into assembly space.
Use occurrence object tags when working in an assembly context and prototype
object tags when working in non-assembly situations. Passing in a prototype
object tag when in an assembly may produce undesired results.
The csys_tag should always be in the context of the current work part.
To derive the corner points, use the X,Y,X components of the
min_corner and then add the X,Y,Z components of the directions multiplied
by the X,Y,Z distances. For Example, to derive the 2 corner points:
corner_pts[2][3]
While a more accurate box is produced, processing time may be increased
significantly.
Environment: Internal and External
See Also:
History: Originally released in NX V4.0
******************************************************************************/
extern UFUNEXPORT int UF_MODL_ask_bounding_box_exact(
tag_t object , /* <I>
Object identifier of object to ask bounding box.
*/
tag_t csys_tag, /* <I>
CSYS to use for box alignment.
NULL_TAG - Use Work CSYS
*/
double min_corner[3], /* <O>
Minimum corner of box of object.
[0] - minimum x value
[1] - minimum y value
[2] - minimum z value
*/
double directions[3][3], /* <O>: direction vectors of bounding box
[0][] - X Direction
[1][] - Y Direction
[2][] - Z Direction */
double distances[3] /* <O>
Distances to move along directions of CSYS
to derive all points of the bounding box.
[0] - X distance value
[1] - Y distance value
[2] - Z distance value
*/
);作者: procamcae 时间: 2009-10-17 09:24
谢谢楼主的分享~~作者: 屠倚龙天 时间: 2009-11-23 22:00
谢谢楼主的分享~~作者: begtostudy 时间: 2009-11-24 13:30
恩,是的
最小包围盒是个几何难题
目前较多的做法是采用三角网格模型来计算。