Jig正交
If ORTHOMODE = 1 Then
Dim v1 As New Vector2d(ptJigCenter.X - ptBase.X, ptJigCenter.Y - ptBase.Y)
Dim angle As Double = v1.GetAngleTo(vecX2d)
angle = Math.Abs(angle)
'绝对值
If angle < 0.25 * Math.PI OrElse (angle > 0.75 * Math.PI AndAlso angle < 1.25 * Math.PI) Then
'偏向ucs的x轴,则锁定在x轴上
Dim p As New Plane(ptBase, mtUCS.CoordinateSystem3d.Yaxis)
ptJigCenter = ptJigCenter.OrthoProject(p)
Else
'偏向ucs的Y轴,则锁定在Y轴上
Dim p As New Plane(ptBase, mtUCS.CoordinateSystem3d.Xaxis)
ptJigCenter = ptJigCenter.OrthoProject(p)
End If
End If
关闭正交
欢迎关注微信公众账号ByCAD