Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
MicroStation Wiki (日本語) 05 曲線を配置する方法
    • Sign In

    • Wiki (日本語)
    • -Bentley Product Wiki
      • +00 ライセンス関連情報
      • -01 MicroStation
        • +01 FAQ
        • +02 操作
        • +03 作図補助
        • +04 寸法/文字
        • +05 セル
        • +06 画層
        • +07 補助座標系
        • +08 基本図形
        • +09 3次元モデリング
        • +10 参照/点群/ラスター
        • +11 印刷
        • +12 アイテムタイプとレポート
        • +13 バッチ処理
        • +14 DGN
        • +15 DWG
        • +16 インポート/エクスポート
        • +17 構成
        • +18 作業環境
        • +19 ユーザインターフェイス
        • +20 インストール関連
        • +21 地理座標系(GCS)
        • +22 MDL
        • +23 その他
        • +24 Bentley Cloud and Web Services
        • -25 MVBA
          • 00 MVBAプロジェクト作成方法の紹介
          • 01 線分を配置する方法
          • 02 弧を配置する方法
          • 03 円を配置する方法
          • 04 多角形を配置する方法
          • 05 曲線を配置する方法
          • 06 文字を配置する方法
          • 07 長方体を配置する方法
          • 08 円柱を配置する方法
          • 09 球を配置する方法
          • 10 円錐を配置する方法
          • 01 値が50以下のテキスト要素を削除する方法
          • 02 メッシュ要素に付属しているItemTypeのプロパティ値を該当要素の画層に設定する方法
          • 03 BSplineに沿い、等距離でセルを配置する方法
          • 04 Dumbbellを配置する方法
          • 作業単位設定
          • 形状を連続線分へ変換ツール
      • +02 ContextCapture
      • 03 AutoPIPE
      • +04 STAAD.Pro
      • +05 MAXSURF / Multiframe
      • +06 OpenCities Map(BentleyMap)
      • +07 ProjectWise 365 Services
      • +08 Bentley View
      • +09 SYNCHRO
      • +10 Descartes
      • +11 Pointools
      • +12 LumenRT
      • +13 SACS
      • +14 Multiframe
      • +15 Orbit 3DM
      • +16 OpenBuildings Designer
      • +30 リリースアナウンスメント
      • +31 サポート関連情報
      • +32 ダウンロード関連情報
      • 33 Bentleyトレーニングサイトの利用方法
      • 4/27(木)開催 Bentley Regional Seminar 2023 Tokyo アジェンダ
      • YII 2022 Going Digital Awards in Infrastructureについて
      • 【無償トレーニングキャンペーン】12月17日までに特定の製品ご購入のお客様向けキャンペーンのご案内

     
     Questions about this article, topic, or product? Click here. 

    05 曲線を配置する方法

      プロダクト: MicroStation 
      バージョン: CONNECT
      環境: N/A
      エリア: Programming
      サブエリア: MVBA

    曲線を配置する方法を紹介します。

    Option Explicit
    
    Sub Main()
        Dim oBsplineCurveElement As BsplineCurveElement
        Dim oFitCurve As InterpolationCurve
        Dim aFitPoints(4) As Point3d
    
        ' Create an interpolation-based B-spline curve
        aFitPoints(0) = Point3dZero
        aFitPoints(1) = Point3dFromXYZ(0#, 1#, 0#)
        aFitPoints(2) = Point3dFromXYZ(1#, 2#, -2#)
        aFitPoints(3) = Point3dFromXYZ(2#, 2#, -1#)
        aFitPoints(4) = Point3dFromXYZ(3#, 2#, 3#)
    
        Set oFitCurve = New InterpolationCurve
        oFitCurve.SetFitPoints aFitPoints
    
        ' Draw the Interpolation Curve (a fit-point based flavor of B-spline curve)
        Set oBsplineCurveElement = CreateBsplineCurveElement2(Nothing, oFitCurve)
        ActiveModelReference.AddElement oBsplineCurveElement
        oBsplineCurveElement.Redraw
    End Sub

    挿入ポイントによる曲線を放置するには、各挿入ポイントを指定する必要がありますのでaFitPoints配列を定義し、各挿入ポイント座標値を保存します。
    またNew InterpolationCurveでoFitCurveを設定し、oFitCurve.SetFitPointsで各挿入ポイントをoFitCurveに設定します。
    次にCreateBsplineCurveElement2を呼び出し、パラメータを渡してから、ActiveModelReference.AddElementで曲線が放置できます。


    CreateBsplineCurveElement2の説明は下記となります:
    Set BsplineCurveElement = object.CreateBsplineCurveElement2 (Template, Curve)


    object:A valid object.
    Template:An Element expression. An existing element whose settings are used to initialize the new element. If Nothing, the new element's settings are initialized from MicroStation's active settings.
    Curve:An InterpolationCurve expression.

    • Share
    • History
    • More
    • Cancel
    • Jingyuan Lv Created by Bentley Colleague Jingyuan Lv
    • When: Sat, May 7 2022 12:17 AM
    • Jingyuan Lv Last revision by Bentley Colleague Jingyuan Lv
    • When: Tue, May 17 2022 2:35 AM
    • Revisions: 5
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies