GetObjectSnapPoints函数的主要参数介绍 by游天居士


GetObjectSnapPoints函数的主要参数介绍 by游天居士

<CommandMethod("DispGetEntsnap", CommandFlags.Session)> _
Public Sub DispGetEntsnap()
'遍历显示捕捉点(端点)
    Using docLock As DocumentLock = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.LockDocument()
        ' 游天居士到此一游
        Dim db As Database = HostApplicationServices.WorkingDatabase
        Using trans As Transaction = db.TransactionManager.StartTransaction()
            Dim ent As Entity = CType(trans.GetObject(GetSelectFirstEntityid(), OpenMode.ForWrite), Entity)
            Dim pickPt As New Point3d(0, 0, 0)
            Dim snapPts As New Point3dCollection()
            Dim geomIds As New IntegerCollection()
            geomIds.Add(0)
            ent.GetObjectSnapPoints(ObjectSnapModes.ModeEnd, 0, pickPt, pickPt, Matrix3d.Identity, snapPts, _
                geomIds)
            Dim i As Integer = 0
            While i < snapPts.Count
                ed.WriteMessage(vbLf & "点是:" + (i + 1).ToString() + ":" + snapPts.ToString())
                System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1)
            End While
            trans.Commit()
        End Using
    End Using
End Sub

https://www.cnblogs.com/happy123/archive/2012/11/19/2778092.html



三板设计,叠合板面积初步估计方法

CPA、CPS、CPM、CPT、CPC 区别

欢迎关注微信公众账号ByCAD