private MeshGeometry3D Build(MDT.TwoSectionTool t) { var builder = new MeshBuilder(); builder.AddCylinder(new Vector3(), new Vector3(0.0f, 0.0f, -(float)t.Length1), t.Diameter1 / 2.0); builder.AddCylinder(new Vector3(0.0f, 0.0f, -(float)t.Length1), new Vector3(0.0f, 0.0f, -(float)(t.Length1 + t.Length2)), t.Diameter2 / 2.0); return(builder.ToMesh()); }
private static MDT.Tool ToTwoSection(MMT.Tool tool) { var t = new MDT.TwoSectionTool(); var tst = tool as MMT.TwoSectionTool; t.Diameter1 = tst.Diameter1; t.Diameter2 = tst.Diameter2; t.Length1 = tst.Length1; t.Length2 = tst.Length2; UpdateBaseData(t, tool); return(t); }