public static IntTools.ToolSet ToInternal(this ExTools.ToolSet toolSet) { var tSet = new IntTools.ToolSet() { Tools = new System.Collections.Generic.List <IntTools.Tool>() }; foreach (var item in toolSet.Tools) { if (item.ToolType != MachineModels.Enums.ToolType.AngularTransmission) { tSet.Tools.Add(ToInternal(item)); } } var tDictionary = tSet.Tools.ToDictionary(t => t.Name, t => t); foreach (var item in toolSet.Tools) { if (item.ToolType == MachineModels.Enums.ToolType.AngularTransmission) { tSet.Tools.Add(ToInternal(item as ExTools.AngolarTransmission, tDictionary)); } } return(tSet); }
public static bool LoadTooling(string toolingFile, out IntTooling.Tooling tooling, out IntTools.ToolSet toolSet) { var result = LoadTooling(toolingFile, out ExTooling.Tooling too, out ExTools.ToolSet ts); tooling = too.ToInternal(); toolSet = ts.ToInternal(); return(result); }