public static AngolarTransmissionImpl ToImplementation(this AngolarTransmission at, Dictionary <string, Tool> tools) { var ati = new AngolarTransmissionImpl() { Name = at.Name, Description = at.Description, ToolLinkType = at.ToolLinkType, BodyModelFile = at.BodyModelFile }; foreach (var item in at.Subspindles) { if (tools.TryGetValue(item.ToolName, out Tool tool)) { ati.Subspindles.Add(new AngolarTransmissionImpl.Subspindle() { Tool = tool, Position = item.Position, Direction = item.Direction }); } else { throw new ArgumentException(); } } return(ati); }
public AngolarTransmission3ProxyViewModel(int nSpindles = 3) : base(nSpindles) { SubSpindle3 = new ATSubSpindleProxyViewModel(AngolarTransmission.ThirdSubSpindle(), this); }
public AngolarTransmission2ProxyViewModel(int nSpindles = 2) : base(nSpindles) { SubSpindle2 = new ATSubSpindleProxyViewModel(AngolarTransmission.SecondSubSpindle(), this); }