- UID
- 5798
- 积分
- 1046
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-5-28
- 最后登录
- 1970-1-1
|
发表于 2004-5-18 08:02:53
|
显示全部楼层
你的point(2)和point(3)两点的坐标均为(100,0),等于是建立了一个为点的弧!
-----------------------------------------------------------------------------
另外,我觉得您的程序可简化为如下:
Sub makeshap()
Dim points(5) As Point3d
Dim centerpoint As Point3d
Dim ostringelements(5) As ChainableElement
Dim ocomplexshape As ComplexShapeElement
points(0) = Point3dFromXY(-100, 100)
points(1) = Point3dFromXY(0, 100)
points(2) = Point3dFromXY(100, 0)
points(3) = Point3dFromXY(100, 0)
points(4) = Point3dFromXY(100, -100)
points(5) = Point3dFromXY(-100, -100)
centerpoint = Point3dFromXY(0, 0)
Set ostringelements(0) = CreateLineElement2(Nothing, points(0), points(1))
Set ostringelements(1) = CreateLineElement2(Nothing, points(1), points(2))
Set ostringelements(2) = CreateArcElement1(Nothing, points(3), centerpoint, points(2))
Set ostringelements(3) = CreateLineElement2(Nothing, points(3), points(4))
Set ostringelements(4) = CreateLineElement2(Nothing, points(4), points(5))
Set ostringelements(5) = CreateLineElement2(Nothing, points(5), points(0))
Set ocomplexshape = CreateComplexShapeElement1(ostringelements, msdFillModeNotFilled)
ActiveModelReference.AddElement ocomplexshape
ocomplexshape.Redraw
End Sub |
|