|
|
发表于 2007-2-3 22:37:58
|
显示全部楼层
来自: 中国江苏南京
计算两个几何对象之间最近的距离可以使用这个函数
7 g- A% V. C2 s/ X8 UModelDoc2::ClosestDistance$ b" o9 b1 v; k# o( p
- o# F: Z$ h; N3 p0 ~retval = ModelDoc2.ClosestDistance ( object1, object2, point1, point2 )
6 ^9 }% \, t6 t6 l
( i6 ~' b6 \% j" _. D/ b MInput: (LPDISPATCH) object1 Pointer to first object
( _1 Z6 e* }+ N+ zInput: (LPDISPATCH) object2 Pointer to second object5 y5 Z0 Y9 M4 ~# ^
Output: (VARIANT) *point1 Array of x, y, z coordinates for the first point
: c8 f. Z5 S; l6 [0 i+ `Output: (VARIANT) *point2 Array of x, y, z coordinates for the second point; e9 I' T' C% {8 Z
Output: (double) retval Minimum distance; -1.0 if no solution0 z' H! V8 Z# [' N6 D. f1 V
) C l8 b1 N# k5 g% z' R# PSupported input object types include:6 @2 F- F, Z" L5 O4 z5 K: o
swSelFACES (face)
& ]" P8 s, l% e" C0 z, JswSelEDGES (edge)8 ^8 n/ N1 V( w8 H1 |- N
swSelVERTICES (vertex)
8 s0 T6 F4 r1 [1 n v. O1 mswSelSKETCHSEGS (sketch segments)" ~: U& B* S8 a/ R
swSelDATUMPLANES (reference plane)- |( p& |1 r9 ~# [
swSelEXTSKETCHPOINTS (point on origin)8 ~* h w+ R8 T1 w+ U) Q
swSelDATUMAXES (reference axis)
9 B8 m9 S- V/ }8 S. {2 }: cswSelCOMPONENTS (component)
; ?, [, G; l, A7 M% G3 u* f7 _, Y7 fswSelREFCURVES (reference curves) |
评分
-
查看全部评分
|