RoomState DistinguishRoom( Room room )
{
RoomState res = RoomState.Unknown;
if( room.Area > 0 )
{
// Placed if having Area
res = RoomState.Placed;
}
else if( null == room.Location )
{
// No Area and No Location => Unplaced
res = RoomState.NotPlaced;
}
else
{
// must be Redundant or NotEnclosed
SpatialElementBoundaryOptions opt
= new SpatialElementBoundaryOptions();
IList<IList<BoundarySegment>> segs
= room.GetBoundarySegments( opt );
res = ( null == segs || segs.Count == 0 )
? RoomState.NotEnclosed
: RoomState.Redundant;
}
return res;
}