|
|
发表于 2007-2-3 22:37:58
|
显示全部楼层
来自: 中国江苏南京
计算两个几何对象之间最近的距离可以使用这个函数8 A6 }% f- i" u
ModelDoc2::ClosestDistance
( M& n& e9 D4 @& V/ U4 B H$ j4 H$ r: v0 C T; r) D8 O. D7 W
retval = ModelDoc2.ClosestDistance ( object1, object2, point1, point2 ) ]$ k2 W. A, I$ y
3 m: J" [$ V+ DInput: (LPDISPATCH) object1 Pointer to first object# Q! _: j3 O3 [2 m
Input: (LPDISPATCH) object2 Pointer to second object$ w# u3 W8 d" D, a0 g8 b1 p
Output: (VARIANT) *point1 Array of x, y, z coordinates for the first point) ^" E' C, k* C9 Y
Output: (VARIANT) *point2 Array of x, y, z coordinates for the second point+ }$ _1 ]: c3 Z- B4 }
Output: (double) retval Minimum distance; -1.0 if no solution0 ?. c2 R' B m2 x7 l! M
% T4 ~% M/ O2 JSupported input object types include:9 L6 J: \8 R& {; P6 k" F4 ^# n
swSelFACES (face)
g5 n. R) O A- d$ d$ w# GswSelEDGES (edge)
; N, L! }6 S! d" p; {. M q0 UswSelVERTICES (vertex)
+ N( U; [( o p) {% }swSelSKETCHSEGS (sketch segments)" @ {/ j( o* i) w S
swSelDATUMPLANES (reference plane)
8 x2 c- k3 I8 |swSelEXTSKETCHPOINTS (point on origin)' `3 x/ \/ I% d' K1 T$ B% f: p
swSelDATUMAXES (reference axis) B) [6 r6 w: o+ K7 a& Q6 T
swSelCOMPONENTS (component)
; U* z% j# a! tswSelREFCURVES (reference curves) |
评分
-
查看全部评分
|