public HouseSpot(string spotName, Cell cellStart, ISchemeParser parser) { project = parser.Project; CountFloorsMain = ProjectScheme.ProjectInfo.CountFloorsMain; if (ProjectScheme.ProjectInfo.IsEnabledDominant) { CountFloorsDominant = ProjectScheme.ProjectInfo.CountFloorsDominant; } else { CountFloorsDominant = CountFloorsMain; } SpotName = spotName; this.cellStart = cellStart; this.parser = parser; DefineSpot(); }
internal Segment(Cell cellStartLeft, Cell cellStartRight, Cell direction, ISchemeParser parser, HouseSpot houseSpot) { HouseSpot = houseSpot; Number = houseSpot.Segments.Count + 1; CellStartLeft = cellStartLeft; CellStartRight = cellStartRight; Direction = direction; DirectionLeftToRight = direction.ToRight(); this.parser = parser; ModulesLeft = parser.GetSteps(cellStartLeft, direction, out CellEndLeft); ModulesRight = parser.GetSteps(cellStartRight, direction, out CellEndRight); // Кол шагов в секции CountSteps = ModulesLeft.Count > ModulesRight.Count ? ModulesLeft.Count : ModulesRight.Count; IsVertical = defineVertical(); StartLevel = GetMaxLevel(cellStartLeft, cellStartRight, direction); EndLevel = GetMaxLevel(CellEndLeft, CellEndRight, direction.Negative); // Определение вида торцов сегмента StartType = defineEndType(CellStartLeft, CellStartRight, direction.Negative, true); EndType = defineEndType(CellEndLeft, CellEndRight, direction, false); // Если старт секции угловой - отнимаем три лишних шага if (StartType == SegmentEnd.CornerLeft || StartType == SegmentEnd.CornerRight) { CountSteps -= (HouseSpot.WidthOrdinary - 1); } // боковая инсоляция ModulesSideStart = DefineSideModules(StartType, true); ModulesSideEnd = DefineSideModules(EndType, false); }