public override void RecomputeSolution() { // get best layers List <ILayer2D> bestLayers = SolutionLayered.Solver.BuildLayers(Content, ContainerDimensions, Offset.Z, ConstraintSet, true); List <LayerEncap> bestLayerDescs = bestLayers.ConvertAll(l => new LayerEncap(l.LayerDescriptor)); bool allFound = true; foreach (LayerEncap l in SolutionLay.LayerEncaps) { if (null == bestLayerDescs.Find(bld => bld.Equals(l))) { allFound = false; break; } } if (allFound) { SolutionLay.RebuildLayers(); } else // recomputes whole new solution { Solution = new SolutionLayered(this, bestLayerDescs); } }
public LayerSummary(SolutionLayered sol, int indexLayer, bool symetryX, bool symetryY) { Sol = sol; IndexLayer = indexLayer; SymetryX = symetryX; SymetryY = symetryY; }
public void AddSolution(List <KeyValuePair <LayerEncap, int> > listLayers) { Solution = new SolutionLayered(this, listLayers); }
public void AddSolution(List <KeyValuePair <LayerDesc, int> > listLayers) { Solution = new SolutionLayered(this, listLayers.ConvertAll(l => new KeyValuePair <LayerEncap, int>(new LayerEncap(l.Key), l.Value)) ); }
public void AddSolution(List <LayerEncap> layers) { Solution = new SolutionLayered(this, layers); }
public void AddSolution(List <LayerDesc> layerDescs) { Solution = new SolutionLayered(this, layerDescs.ConvertAll(l => new LayerEncap(l))); }
public void AddSolution(ILayer2D layer, bool alternateLayers = true) { Solution = new SolutionLayered(this, layer, alternateLayers); }
public void AddSolution(LayerDesc layerDesc, bool alternateLayers = true) { Solution = new SolutionLayered(this, layerDesc, alternateLayers); }
public void AddSolution(ILayer2D layer, bool mirrorLength = true, bool mirrorWidth = true) { Solution = new SolutionLayered(this, layer, mirrorLength, mirrorWidth); }
public void AddSolution(LayerDesc layerDesc, bool mirrorLength = true, bool mirrorWidth = true) { Solution = new SolutionLayered(this, layerDesc, mirrorLength, mirrorWidth); }