|
|
发表于 2007-2-3 22:37:58
|
显示全部楼层
来自: 中国江苏南京
计算两个几何对象之间最近的距离可以使用这个函数6 G k* H: A( ~9 `% q2 G4 x$ A
ModelDoc2::ClosestDistance
% |, A2 A Q- c: _) x- M! {! M# G5 Q/ E7 d8 c
retval = ModelDoc2.ClosestDistance ( object1, object2, point1, point2 ) I% [" x+ M% D& N- g, E
8 |* P; T2 T, ]9 G3 y% J( n0 ]+ GInput: (LPDISPATCH) object1 Pointer to first object
3 M* V. B) _4 yInput: (LPDISPATCH) object2 Pointer to second object
# J2 a1 m2 b9 h/ ~3 bOutput: (VARIANT) *point1 Array of x, y, z coordinates for the first point( e8 }/ X4 h- g- S) t8 V8 c/ u2 L
Output: (VARIANT) *point2 Array of x, y, z coordinates for the second point& V2 z/ g9 l& w" e+ R% I2 e
Output: (double) retval Minimum distance; -1.0 if no solution
/ S- y5 \. G2 d; N0 q+ ~* v5 n4 m- ^4 f( c6 P
Supported input object types include:
9 G4 o4 z/ g3 p5 |; `/ @/ C' Y, MswSelFACES (face)
' j. W9 a, `8 k; mswSelEDGES (edge)
" x2 u1 n% N( y- W- B; y2 MswSelVERTICES (vertex)
4 l' r3 |+ s" a5 Y% o2 ZswSelSKETCHSEGS (sketch segments)
! Z1 ?! v7 X8 z6 q2 UswSelDATUMPLANES (reference plane)/ Q% C+ |& s+ x( ]
swSelEXTSKETCHPOINTS (point on origin)0 V+ O. E$ R/ r7 n
swSelDATUMAXES (reference axis), ^2 ^# k) _. @9 [, u Z3 ~
swSelCOMPONENTS (component)! P( ^1 K* d) @1 L4 \! t
swSelREFCURVES (reference curves) |
评分
-
查看全部评分
|