using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace RevitHttpControl.Models
{
///
/// 模型总览响应
///
public class ModelOverviewResponse
{
///
/// 项目基本信息
///
public ProjectInfo Project { get; set; }
///
/// 主要构件统计
///
public ElementCounts Elements { get; set; }
///
/// 模型组织信息
///
public ModelStructure Structure { get; set; }
///
/// 模型层级信息
///
public ModelHierarchy Hierarchy { get; set; }
///
/// 链接文件统计
///
public LinkFiles Links { get; set; }
///
/// 统计生成时间
///
public DateTime GeneratedAt { get; set; }
}
///
/// 项目基本信息
///
public class ProjectInfo
{
///
/// 项目名称
///
public string Name { get; set; }
///
/// 文件路径
///
public string FilePath { get; set; }
///
/// Revit版本
///
public string RevitVersion { get; set; }
///
/// 是否为中心文件
///
public bool IsCentralFile { get; set; }
///
/// 项目状态
///
public string Status { get; set; }
///
/// 文件大小(字节)
///
[JsonProperty("fileSize")]
public long FileSizeBytes { get; set; }
///
/// 文件大小(格式化显示)
///
public string FileSizeDisplay { get; set; }
///
/// 面片数
///
[JsonProperty("polygonCount")]
public long PolygonCount { get; set; }
///
/// 模型特征数
///
[JsonProperty("featureCount")]
public int FeatureCount { get; set; }
}
///
/// 主要构件数量统计
///
public class ElementCounts
{
///
/// 墙数量
///
public int Walls { get; set; }
///
/// 门数量
///
public int Doors { get; set; }
///
/// 窗数量
///
public int Windows { get; set; }
///
/// 楼板数量
///
public int Floors { get; set; }
///
/// 天花板数量
///
public int Ceilings { get; set; }
///
/// 柱数量
///
public int Columns { get; set; }
///
/// 梁数量
///
public int Beams { get; set; }
///
/// 房间数量
///
public int Rooms { get; set; }
///
/// 总构件数
///
public int Total => Walls + Doors + Windows + Floors + Ceilings + Columns + Beams + Rooms;
}
///
/// 模型组织结构信息
///
public class ModelStructure
{
///
/// 楼层数量
///
public int Levels { get; set; }
///
/// 三维视图数量
///
public int Views3D { get; set; }
///
/// 平面视图数量
///
public int FloorPlans { get; set; }
///
/// 立面视图数量
///
public int Elevations { get; set; }
///
/// 剖面视图数量
///
public int Sections { get; set; }
///
/// 图纸数量
///
public int Sheets { get; set; }
}
///
/// 模型层级信息
///
public class ModelHierarchy
{
///
/// 楼层详情列表
///
public List Levels { get; set; }
///
/// 组数量
///
public int Groups { get; set; }
///
/// 工作集数量
///
public int Worksets { get; set; }
///
/// 阶段数量
///
public int Phases { get; set; }
///
/// 设计选项数量
///
public int DesignOptions { get; set; }
}
///
/// 楼层信息
///
public class LevelInfo
{
///
/// 楼层名称
///
public string Name { get; set; }
///
/// 标高值(毫米)
///
public double Elevation { get; set; }
///
/// 标高值(米,显示用)
///
public string ElevationDisplay => $"{Elevation / 1000:F1}m";
}
///
/// 链接文件统计
///
public class LinkFiles
{
///
/// Revit链接文件
///
public LinkCategory RevitLinks { get; set; }
///
/// CAD链接文件
///
public LinkCategory CadLinks { get; set; }
///
/// 点云链接数量
///
public int PointClouds { get; set; }
///
/// 图像链接数量
///
public int Images { get; set; }
///
/// 链接文件总结描述
///
public string Summary { get; set; }
}
///
/// 链接文件分类统计
///
public class LinkCategory
{
///
/// 总数
///
public int Total { get; set; }
///
/// 已加载数量
///
public int Loaded { get; set; }
///
/// 未加载数量
///
public int Unloaded { get; set; }
///
/// 未找到数量
///
public int NotFound { get; set; }
}
}