オブジェクトの 3D 法線単位ベクトルを指定します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.Normal
タイプ: Arc、Attribute、AttributeReference、BlockReference、Circle、Dim3PointAngular、DimAligned、DimAngular、DimArcLength、DimDiametric、Dimension、DimOrdinate、DimRadial、DimRadialLarge、DimRotated、Ellipse、ExternalReference、Hatch、Leader、Line、LWPolyline、MInsertBlock、MText、Point、Polyline、Region、Section、Shape、Solid、Text、Tolerance、Trace
このプロパティが適用されるオブジェクト。
読み込み専用: いいえ
タイプ: バリアント型(倍精度実数の 3 要素配列)
WCS の 3D 法線単位ベクトル
この法線ベクトルは、指定されたオブジェクトの Z 軸を定義します。法線は WCS で戻されますが、オブジェクトを OCS で決定する場合にも使用できます。OCS との間で相互変換する場合は、TranslateCoordinates メソッドでこのプロパティを OCSNormal として使用してください。

このプロパティが指定するのはベクトルであって、点ではないことに注意してください。ベクトルは空間内の位置ではなく、法線の方向を定義します。ある点にこの法線ベクトルを加算して、別の点を取得できます。
Tolerance: 法線ベクトルは Tolerance オブジェクトの方向に垂直でなければなりません。Tolerance オブジェクトに垂直ではない法線はエラーになります。
VBA:
Sub Example_Normal()
' This example creates a circle in model space.
' It then finds the current normal to that circle
' and changes the normal.
' Define a circle
Dim circleObj As AcadCircle
Dim center(0 To 2) As Double
Dim radius As Double
center(0) = 4: center(1) = 4: center(2) = 0
radius = 1
' Add the circle to model space
Set circleObj = ThisDrawing.ModelSpace.AddCircle(center, radius)
ZoomAll
' Find the normal for the circle
Dim currNormal As Variant
currNormal = circleObj.Normal
MsgBox "The current normal for the circle is " & circleObj.Normal(0) & ", " & circleObj.Normal(1) & ", " & circleObj.Normal(2), , "Normal Example"
' Change the normal for the circle
Dim newNormal(0 To 2) As Double
newNormal(0) = 1: newNormal(1) = 1: newNormal(2) = -1
circleObj.Normal = newNormal
circleObj.Update
MsgBox "The current normal for the circle is " & circleObj.Normal(0) & ", " & circleObj.Normal(1) & ", " & circleObj.Normal(2), , "Normal Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_Normal()
;; This example creates a circle in model space.
;; It then finds the current normal to that circle
;; and changes the normal.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define a circle
(setq center (vlax-3d-point 4 4 0)
radius 1)
;; Add the circle to model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq circleObj (vla-AddCircle modelSpace center radius))
(vla-ZoomAll acadObj)
;; Find the normal for the circle
(setq currNormal (vlax-variant-value (vla-get-Normal circleObj)))
(alert (strcat "The current normal for the circle is " (rtos (vlax-safearray-get-element currNormal 0) 2) ", "
(rtos (vlax-safearray-get-element currNormal 1) 2) ", "
(rtos (vlax-safearray-get-element currNormal 2) 2)))
;; Change the normal for the circle
(setq newNormal (vlax-3d-point 1 1 -1))
(vla-put-Normal circleObj newNormal)
(vla-Update circleObj)
(setq newNormal (vlax-variant-value newNormal))
(alert (strcat "The current normal for the circle is " (rtos (vlax-safearray-get-element newNormal 0) 2) ", "
(rtos (vlax-safearray-get-element newNormal 1) 2) ", "
(rtos (vlax-safearray-get-element newNormal 2) 2)))
)