//选择面 renderView.SetPickMode((int)(EnumPickMode.RF_SceneNode | EnumPickMode.RF_Face));
//选择边 renderView.SetPickMode((int)(EnumPickMode.RF_SceneNode | EnumPickMode.RF_Edge));
private void button1_Click(object sender, EventArgs e) { //创建块1 TopoShape box1 = BrepToolsFeat.MakeBox(new Vector3(0, 0, 0), new Vector3(0, 0, 1), new Vector3(100, 50, 20)); //创建块2 TopoShape box2 = BrepToolsFeat.MakeBox(new Vector3(0, 0, 0), new Vector3(50, 50, 50), 20, 100); //显示几何 int box1ID = 0; SceneNode sceneNode = renderView.ShowGeometry(box1, box1ID); int box2ID = 1; SceneNode sceneNode1 = renderView.ShowGeometry(box2, box2ID); FaceStyle style = new FaceStyle(); style.SetColor(new ColorValue(0, 1, 0, 1)); sceneNode1.SetFaceStyle(style); //设置本身不能被选中 sceneNode.SetPickable(false); }
Caesar卢尚宇
2020年11月22日