private void Cut_Click(object sender, EventArgs e) { TriMeshModify.ComputeSelectedEdgeFromColor(Mesh); double move = TriMeshUtil.ComputeEdgeAvgLength(Mesh) * 0.1; TriMeshEdgeCutFromBoundary cut = new TriMeshEdgeCutFromBoundary(Mesh); cut.Cut(move); TriMeshUtil.ClearMeshColor(Mesh); TriMeshUtil.ShowBoundary(Mesh); TriMeshUtil.FixIndex(Mesh); TriMeshUtil.SetUpNormalVertex(Mesh); OnChanged(EventArgs.Empty); }
public void Show() { TriMeshUtil.ClearMeshColor(this.mesh); int count = 0; foreach (var hf in this.mesh.HalfEdges) { double angle = TriMeshUtil.ComputeAngle(hf) / Math.PI * 180; if (hf.Face != null && angle > this.capAngle) { this.SelectAngle(hf); count++; } } }
public double[] SetColor(string item, TriMesh mesh, CriteriaInfo criteriaInfo) { TriMeshUtil.ClearMeshColor(mesh); double[] value = null; if (item == "DehidraAngleMin") { value = ColorEdgeByDihedralAngle(mesh, criteriaInfo.DehidraAngleMin, criteriaInfo.DehidraAngleMax); } if (item == "DehidraAngleMax") { value = ColorEdgeByDihedralAngle(mesh, criteriaInfo.DehidraAngleMin, criteriaInfo.DehidraAngleMax); } if (item == "GaussinMin") { value = ColorVertexByGaussin(mesh, criteriaInfo.GaussinMin, criteriaInfo.GaussinMax); } if (item == "GaussinMax") { value = ColorVertexByGaussin(mesh, criteriaInfo.GaussinMin, criteriaInfo.GaussinMax); } if (item == "MeanCurvatureMax") { value = ColorVertexByMeanCurvature(mesh, criteriaInfo.MeanCurvatureMin, criteriaInfo.MeanCurvatureMax); } if (item == "MeanCurvatureMin") { value = ColorVertexByMeanCurvature(mesh, criteriaInfo.MeanCurvatureMin, criteriaInfo.MeanCurvatureMax); } return(value); }
private void clearColorToolStripMenuItem_Click(object sender, EventArgs e) { TriMeshUtil.ClearMeshColor(Mesh); OnChanged(EventArgs.Empty); }
private void clearToolStripMenuItem_Click(object sender, EventArgs e) { TriMeshUtil.ClearMeshColor(Mesh); GlobalSetting.DisplaySetting.DisplayMode = EnumDisplayMode.Basic; OnChanged(EventArgs.Empty); }