예제 #1
0
        public RoomObject(int roomOutlineId, int floor, List <SiyoHeya> siyoHeyas)
            : base(roomOutlineId, floor)
        {
            this.NameInDrawing = XData.Room.GetRoomName(roomOutlineId);
            this.Name          = RoomObject.GetInteriorRoomNameOrDefault(this.NameInDrawing);
            this.CenterPoint   = AutoCad.Db.Entity.GetCenter(roomOutlineId);

            this.StartPoint = AutoCad.Db.Polyline.GetStartPoint(roomOutlineId);
            this.EndPoint   = AutoCad.Db.Polyline.GetEndPoint(roomOutlineId);

            //始点と終点が重なっていない線はエラーにする
            if (!AutoCad.Db.Polyline.IsClosed(roomOutlineId) && !this.StartPoint.EqualsRound(this.EndPoint))
            {
                throw new ApplicationException(Messages.NotClosedRoomLine(floor, this.StartPoint, this.EndPoint));
            }

            //部屋名を取得できない線はエラーにする
            if (string.IsNullOrEmpty(this.Name))
            {
                throw new ApplicationException(Messages.InvalidRoomline(this.StartPoint, this.EndPoint));
            }

            //仕様書と図面で表記の異なる部屋があるので、(iシリーズ→システムバスなど)
            //仕様書で使われている部屋名も持っておく
            this.CodeInSiyo = RoomObject.GetRoomCodeInSiyo(this, this.Name, siyoHeyas);
        }
예제 #2
0
        public bool IsInRoomOfSiyo(List <SiyoHeya> siyoHeyas)
        {
            var roomCode = RoomObject.GetRoomCodeInSiyo(this.Symbol.Room, this.RoomName, siyoHeyas);

            return(!string.IsNullOrEmpty(roomCode));
        }