|
板凳
楼主 |
发表于 2020-3-29 21:37:56
|
只看该作者
感谢回复。但是还是不如下面的方法直接,下面的方法控制应该更灵活,但是最后一步增加面的函数却没有开放
SubD subD = new SubD();
Point3d p11 = new Point3d(0, 0, 0);
Point3d p12 = new Point3d(0, 10, 10);
Point3d p13 = new Point3d(0, 20, 20);
Point3d p14 = new Point3d(0, 22, 30);
Point3d p21 = new Point3d(40, 0, 0);
Point3d p22 = new Point3d(40, 10, 10);
Point3d p23 = new Point3d(40, 20, 20);
Point3d p24 = new Point3d(40, 22, 30);
SubDVertex v11 = subD.Vertices.Add(SubDVertexTag.Smooth, p11);
SubDVertex v12 = subD.Vertices.Add(SubDVertexTag.Smooth, p12);
SubDVertex v13 = subD.Vertices.Add(SubDVertexTag.Smooth, p13);
SubDVertex v14 = subD.Vertices.Add(SubDVertexTag.Smooth, p14);
SubDVertex v21 = subD.Vertices.Add(SubDVertexTag.Smooth, p21);
SubDVertex v22 = subD.Vertices.Add(SubDVertexTag.Smooth, p22);
SubDVertex v23 = subD.Vertices.Add(SubDVertexTag.Smooth, p23);
SubDVertex v24 = subD.Vertices.Add(SubDVertexTag.Smooth, p24);
SubDEdge eg1121 = subD.Edges.Add(SubDEdgeTag.Smooth, v11, v21);
SubDEdge eg2122 = subD.Edges.Add(SubDEdgeTag.Smooth, v21, v22);
SubDEdge eg2212 = subD.Edges.Add(SubDEdgeTag.Smooth, v22, v12);
SubDEdge eg1211 = subD.Edges.Add(SubDEdgeTag.Smooth, v12, v11);
SubDEdge eg1222 = subD.Edges.Add(SubDEdgeTag.Smooth, v12, v22);
SubDEdge eg2223 = subD.Edges.Add(SubDEdgeTag.Smooth, v22, v23);
SubDEdge eg2313 = subD.Edges.Add(SubDEdgeTag.Smooth, v23, v13);
SubDEdge eg1312 = subD.Edges.Add(SubDEdgeTag.Smooth, v13, v23);
//subD.Faces.Add() //这个函数目前无法引用
doc.Objects.Add(subD);
doc.Views.Redraw(); |
|