指定された点から指定された角度と距離にある点を取得します。
サポートされているプラットフォーム: Windows のみ
VBA:
RetVal = object.PolarPoint(Point, Angle, Distance)
タイプ: Utility
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
始点を指定する 3D WCS 座標。
アクセス: 入力のみ
タイプ: 倍精度浮動小数点数型
ラジアンで表した角度
アクセス: 入力のみ
タイプ: 倍精度浮動小数点数型
現在の作図単位での距離。
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
指定された点から指定された角度と距離にある 3D WCS 座標。
追加の注意はありません。
VBA:
Sub Example_PolarPoint()
' This example finds the coordinate of a point that is a given
' distance and angle from a base point.
Dim polarPnt As Variant
Dim basePnt(0 To 2) As Double
Dim angle As Double
Dim distance As Double
basePnt(0) = 2#: basePnt(1) = 2#: basePnt(2) = 0#
angle = 0.1744444 ' 45 degrees
distance = 5
polarPnt = ThisDrawing.Utility.PolarPoint(basePnt, angle, distance)
' Create a line from the base point to the polar point
Dim lineObj As AcadLine
Set lineObj = ThisDrawing.ModelSpace.AddLine(basePnt, polarPnt)
ZoomAll
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_PolarPoint()
;; This example finds the coordinate of a point that is a given
;; distance and angle from a base point.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq basePnt (vlax-3d-point 2 2 0)
ang 0.1744444 ;; 45 degrees
dist 5)
(setq polarPnt (vla-PolarPoint (vla-get-Utility doc) basePnt ang dist))
;; Create a line from the base point to the polar point
(setq modelSpace (vla-get-ModelSpace doc))
(setq lineObj (vla-AddLine modelSpace basePnt polarPnt))
(vla-ZoomAll acadObj)
)