标签:src set 获取 lin tools http gif ace object
public Form1() { InitializeComponent(); //注册鼠标事件 this.renderView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.OnRenderWindow_MouseClick); } private void OnRenderWindow_MouseClick(object sender, MouseEventArgs e) { //通过鼠标位置选择形状 PickHelper pickHelper = renderView.PickShape(e.X, e.Y); if (pickHelper != null) { //获取所选形状的点位置 Vector3 pt = pickHelper.GetPointOnShape(); //创建球 TopoShape shape = GlobalInstance.BrepTools.MakeSphere(pt, 2); //显示球 SceneNode sceneNode = renderView.ShowGeometry(shape, 100); //设置球的颜色 FaceStyle style = new FaceStyle(); style.SetColor(new ColorValue(1, 0, 0, 1)); sceneNode.SetFaceStyle(style); } }
Caesar卢尚宇
2020年11月24日
AnyCAD C#开发-查询鼠标位置处的物体PickHelper
标签:src set 获取 lin tools http gif ace object
原文地址:https://www.cnblogs.com/nxopen2018/p/14032667.html