/// <summary> /// Тестовая отрисовка ячейки /// </summary> public void TestDraw() { var ext = PtCenter.GetRectangleFromCenter(ModuleSize); var pl = ext.GetPolyline(); EntityHelper.AddEntityToCurrentSpace(pl); EntityHelper.AddEntityToCurrentSpace(new DBPoint(PtCenter.Convert3d())); var text = new DBText(); text.TextString = $"[{Row};{Column}]"; text.Height = 1; text.Justify = AttachmentPoint.MiddleCenter; text.AlignmentPoint = PtCenter.Convert3d(); text.AdjustAlignment(HostApplicationServices.WorkingDatabase); EntityHelper.AddEntityToCurrentSpace(text); var textIndex = new DBText(); textIndex.TextString = Index.ToString(); textIndex.Height = 0.25; textIndex.Justify = AttachmentPoint.MiddleCenter; textIndex.AlignmentPoint = new Point3d(PtCenter.X, PtCenter.Y - 1.5, 0); textIndex.AdjustAlignment(HostApplicationServices.WorkingDatabase); EntityHelper.AddEntityToCurrentSpace(textIndex); }
/// <summary> /// Только для угловых ячеек - наложение модулей от разных сегментов /// </summary> /// <param name="cell"></param> public bool Overlay(InsCell cell) { // Модули должны быть перпендикулярно направлены if (!Direction.IsPerpendicularTo(cell.Direction, Tolerance)) { return(false); } // Точки центров модулей должны совпадать if (!PtCenter.IsEqualTo(cell.PtCenter, Tolerance)) { return(false); } // Значение инсоляции - лучшее из двух if (InsValue < cell.InsValue) { InsValue = cell.InsValue; } return(true); }