Vla-put-knots
- 構文
- (vla-put-knots vla-object knot )
- 機能
- スプラインのノット ベクトルを指定する。
- 引数
-
- vla-object … Spline の VLAオブジェクト
- knot … スプラインのノット ベクトル。
- 戻り値
- nil
- サンプル
(vl-load-com)
(defun c:Example_Knots()
;; モデル空間内スプライン オブジェクトを作成し、
;; 新しいスプラインのノット ベクトルを返すサンプル
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; スプライン オブジェクトを定義。
(setq startTan (vlax-3d-point 0.5 0.5 0)
endTan (vlax-3d-point 0.5 0.5 0)
fitPoints (vlax-make-safearray vlax-vbDouble '(0 . 8)))
(vlax-safearray-fill fitPoints '(0 0 0
5 5 0
10 0 0
)
)
;; スプラインを作成
(setq modelSpace (vla-get-ModelSpace doc))
(setq splineObj (vla-AddSpline modelSpace fitPoints startTan endTan))
(vla-ZoomAll acadObj)
;; 新しいスプラインのノット ベクトルを表示。
(setq knotVector (vlax-safearray->list (vlax-variant-value (vla-get-Knots splineObj))))
(alert (strcat "新しいスプラインのノット ベクトルは : "
"\n" (rtos (nth 0 knotVector) 2)
"\n" (rtos (nth 1 knotVector) 2)
"\n" (rtos (nth 2 knotVector) 2)))
)
関連事項