- UID
- 4508
- 积分
- 2485
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-4-29
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 snsj 于 2013-8-1 22:20 编辑
Option Explicit Off '隐式声明变量
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.Runtime
Public Class AU_DrawJig
Inherits Autodesk.AutoCAD.EditorInput.DrawJig
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim db As Database = HostApplicationServices.WorkingDatabase() '将数据库作为公用函数
Dim el_pt1, el_pt2, elcen As Point3d : Dim normal As Vector3d = Vector3d.ZAxis '椭圆的轴的两点和Z轴矢量
Dim elent As Ellipse '在内存中创建椭圆
Dim ratio As Double '短轴与长轴的长度比例
Dim czdst As Double '长半轴距离
Dim vec As Vector2d : Dim ddd As Double : Dim elmaj, elmaj1 As Vector3d : Dim ang As Double
Public Shared Function apple_polar3d(ByVal pPt As Point3d, ByVal dAng As Double, ByVal dDist As Double)
Return New Point3d(pPt.X + dDist * Math.Cos(dAng), pPt.Y + dDist * Math.Sin(dAng), pPt.Z)
End Function
<CommandMethod("cc")> _
|
|