Exemplo n.º 1
0
        void CutInner(TriMesh.HalfEdge cur, TriMesh.HalfEdge next)
        {
            TriMesh.Vertex share1 = cur.FromVertex;
            TriMesh.Vertex share2 = next.ToVertex;
            TriMesh.Vertex mid    = cur.ToVertex;

            Vector3D normal = TriMeshUtil.ComputeNormalFace(cur.Face);
            Vector3D vec    = next.ToVertex.Traits.Position - cur.FromVertex.Traits.Position;
            Vector3D dir    = normal.Cross(vec).Normalize();


            TriMesh.Vertex v2 = TriMeshModify.VertexSplit(mid, share1, share2,
                                                          mid.Traits.Position - dir * move, mid.Traits.Position + dir * move);

            TriMesh.HalfEdge hf = mid.FindHalfedgeTo(v2);
            TriMeshModify.RemoveEdge(hf.Edge);
            this.vertexMap.Add(mid, v2);
        }
Exemplo n.º 2
0
 private void splitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     TriMeshModify.VertexSplit(Mesh);
     OnChanged(EventArgs.Empty);
 }