Vla-get-degree2
- 構文
- (vla-get-degree2 vla-object degree )
- 機能
- スプラインの多項表現の次数を取得する。
- 引数
-
- vla-object … Spline のVLAオブジェクト
- degree … 多項表現の次数 1~25
- 戻り値
- nil
- MEMO : スプラインの順位は、スプラインの項数 +1 。
- サンプル
(vl-load-com)
(defun c:Example_Degree()
;; スプラインを作成して次数を取得するサンプル
(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-ZoomExtents acadObj)
(vla-Regen doc :vlax-true)
(alert (strcat "スプラインの次数は: " (itoa (vla-get-Degree2 splineObj))))
)
関連事項