zoukankan      html  css  js  c++  java
  • WinForm中使用AnyCAD三维控件 の 初始化

    在WinForm中可以方便的集成AnyCAD.Net三维控件,只需要以下几部即可完成。

    一、添加DLL程序集

    AnyCAD.Foundation.Net.dll

    AnyCAD.Presentation.Net.dll

    AnyCAD.Exchange.Net.dll

    二、初始化控件

    1.首先创建一个窗体

    2.在窗体上放置一个Panel用来放置三维控件

    3.初始化控件

    完整代码如下:

        public partial class MainForm : Form
        {
            private RenderWindow3d m_RenderView = null;
    
            public AnyCAD.Presentation.RenderWindow3d RenderView
            {
                get { return m_RenderView; }
                set { m_RenderView = value; }
            }
    
            public MainForm()
            {
                InitializeComponent();
    
                // Add 3D RenderView to container.
                var container = this.splitContainer1.Panel2;
    
                m_RenderView = new RenderWindow3d();
    
                m_RenderView.Size = container.ClientSize;
                m_RenderView.Dock = System.Windows.Forms.DockStyle.Fill;
                container.Controls.Add(m_RenderView);
            }
      }
    

      

    编译运行,效果如下:

    三、注意事项

    1. 请确保把sdk的dll复制到程序exe文件所在的目录。

    2. 请关注SDK的更新:http://pan.baidu.com/share/home?uk=3474438112

  • 相关阅读:
    169. Majority Element
    283. Move Zeroes
    1331. Rank Transform of an Array
    566. Reshape the Matrix
    985. Sum of Even Numbers After Queries
    1185. Day of the Week
    867. Transpose Matrix
    1217. Play with Chips
    766. Toeplitz Matrix
    1413. Minimum Value to Get Positive Step by Step Sum
  • 原文地址:https://www.cnblogs.com/anycad/p/4888012.html
Copyright © 2011-2022 走看看