|
发表于 2010-1-23 22:03:55
|
显示全部楼层
圆心(点)是数组,得分别比较三个坐标才行.- ) p9 V( f1 f$ V: X5 F
- Dim SS As AcadSelectionSet, FT(0) As Integer, FD(0) As Variant, C1 As AcadCircle, C2 As AcadCircle, I As Long, J As Long
, U( p3 G6 t+ y) M - FT(0) = 0: FD(0) = "Circle"
7 B; A m# m8 Q/ g - Set SS = ThisDrawing.SelectionSets.Add("SS")
A* j# |4 M0 ^; i6 W - SS.Select acSelectionSetAll, , , FT, FD& v, A: K* g- f: c/ ~5 {
- If SS.Count > 1 Then
l* n3 \. x# R. f4 x - For I = SS.Count - 1 To 1 Step -1
# V( T* Z: b) A+ k) z7 S, y* f, K - Set C1 = SS.Item(I)
/ |/ b: b+ c! K6 B - For J = I - 1 To 0 Step -1
2 S( {$ ^2 |/ l- w7 Q - Set C2 = SS.Item(J)
* U" x+ b9 x6 _5 w% M5 j - If C1.Center(0) = C2.Center(0) And C1.Center(1) = C2.Center(1) And C1.Center(2) = C2.Center(2) And C1.Radius = C2.Radius Then8 [+ d( M# `2 a) x1 W
- C1.Delete7 ]! L: M0 P* h9 B- [
- Exit For
t6 T; _1 _* I) h- O0 d - End If Z4 Z+ L2 h' k0 e, ]
- Next
4 p, C9 n @0 e( A) p: c3 B8 l2 ^ - Next( u4 I, z, P5 E& b
- End If+ G( O# A( g% H* V
- SS.Delete
7 ^8 b$ h' @5 K' b2 \% _
复制代码 |
|