Beispiel #1
0
        /// <summary>
        /// Передвигает нужные квартиры на место
        /// </summary>
        /// <param name="codes"></param>
        /// <param name="points"></param>
        /// <returns></returns>
        private List <List <Flat> > MoveFlats(Point3d[] points)
        {
            var result = new List <List <Flat> >();

            foreach (List <Flat> flatComb in AllFlatCombinations)
            {
                List <Flat> fl = new List <Flat>();
                for (int i = 0; i < points.Length; i++)
                {
                    var flat = flatComb[i];

                    var vec = new Vector3d(points[i].X - flat.BasePlane.OriginX,
                                           points[i].Y - flat.BasePlane.OriginY,
                                           points[i].Z - flat.BasePlane.OriginZ);

                    var xform = Transform.Translation(vec);

                    var levelFlat = new Flat(flat);
                    levelFlat = levelFlat.Transform(xform) as Flat;

                    fl.Add(levelFlat);
                }
                result.Add(fl);
            }
            return(result);
        }