Beispiel #1
0
        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;
 }
Beispiel #3
0
 public void AddSolution(List <KeyValuePair <LayerEncap, int> > listLayers)
 {
     Solution = new SolutionLayered(this, listLayers);
 }
Beispiel #4
0
 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))
                                    );
 }
Beispiel #5
0
 public void AddSolution(List <LayerEncap> layers)
 {
     Solution = new SolutionLayered(this, layers);
 }
Beispiel #6
0
 public void AddSolution(List <LayerDesc> layerDescs)
 {
     Solution = new SolutionLayered(this, layerDescs.ConvertAll(l => new LayerEncap(l)));
 }
Beispiel #7
0
 public void AddSolution(ILayer2D layer, bool alternateLayers = true)
 {
     Solution = new SolutionLayered(this, layer, alternateLayers);
 }
Beispiel #8
0
 public void AddSolution(LayerDesc layerDesc, bool alternateLayers = true)
 {
     Solution = new SolutionLayered(this, layerDesc, alternateLayers);
 }
Beispiel #9
0
 public void AddSolution(ILayer2D layer, bool mirrorLength = true, bool mirrorWidth = true)
 {
     Solution = new SolutionLayered(this, layer, mirrorLength, mirrorWidth);
 }
Beispiel #10
0
 public void AddSolution(LayerDesc layerDesc, bool mirrorLength = true, bool mirrorWidth = true)
 {
     Solution = new SolutionLayered(this, layerDesc, mirrorLength, mirrorWidth);
 }