diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..25a1705 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.vs +.idea +bin/ +obj/ \ No newline at end of file diff --git a/Libs/AlgorithmServer.dll b/Libs/AlgorithmServer.dll new file mode 100644 index 0000000..e69de29 diff --git a/MainWindow.xaml b/MainWindow.xaml index dc02990..f11e841 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -97,16 +97,16 @@ - - - - + + + + + + + + + + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index f4c5b89..5fffa87 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -86,6 +86,7 @@ public partial class MainWindow { DataBaseHelper.CloseConnection(); this.Close(); + Application.Current.Shutdown(); } } diff --git a/Model/Entity/ApiEntity/ImageCollectionResult.cs b/Model/Entity/ApiEntity/ImageCollectionResult.cs new file mode 100644 index 0000000..0c41c23 --- /dev/null +++ b/Model/Entity/ApiEntity/ImageCollectionResult.cs @@ -0,0 +1,15 @@ +namespace SparkClient.Model.Common; + +public class ImageCollectionResult +{ + + /// + /// 状态码 + /// + public string Status { get; set; } + + /// + /// 图片名称列表 + /// + public List Images { get; set; } +} \ No newline at end of file diff --git a/Model/Entity/ApiEntity/StatusCodes.cs b/Model/Entity/ApiEntity/StatusCodes.cs new file mode 100644 index 0000000..81abb75 --- /dev/null +++ b/Model/Entity/ApiEntity/StatusCodes.cs @@ -0,0 +1,32 @@ +namespace SparkClient.Model.Common +{ + /// + /// 存储状态码及其描述信息的常量类。 + /// + public static class StatusCodes + { + // 成功 + public const string Success = "S000"; + + // 采图正在进行中 + public const string InProgress = "S001"; + + // 缓存图片被清理(读取不够及时) + public const string CacheCleared = "S002"; + + // 无法向单片机发送指令 + public const string CannotSendCommand = "S003"; + + // 单片机访问超时 + public const string MicrocontrollerTimeout = "S004"; + + // 单片机返回错误码 + public const string MicrocontrollerError = "S005"; + + // 未找到切工仪 + public const string DeviceNotFound = "P001"; + + // 算法调用失败 + public const string AlgorithmFailed = "P002"; + } +} \ No newline at end of file diff --git a/Model/Services/AlgorithmServer.cs b/Model/Services/AlgorithmServer.cs index 3920f59..09194bb 100644 --- a/Model/Services/AlgorithmServer.cs +++ b/Model/Services/AlgorithmServer.cs @@ -1,35 +1,28 @@ -using Newtonsoft.Json; -using System; -using System.Net.Http; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Input; -using HandyControl.Controls; -using HandyControl.Tools; +using System.Runtime.InteropServices; +using System.Windows.Forms; using Newtonsoft.Json.Linq; -using MessageBox = HandyControl.Controls.MessageBox; namespace SparkClient.Model.Services { public class AlgorithmServer { // 使用 P/Invoke 声明 C++ 函数 - [DllImport("D:/workspace/dayuAI/SparkClient/Libs/AlgorithmServer.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("../../../Libs/AlgorithmServer.dll", CallingConvention = CallingConvention.Cdecl)] private static extern double Add(double a, double b); - [DllImport("D:D:/workspace/dayuAI/SparkClient/Libs/AlgorithmServer.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("../../../Libs/AlgorithmServer.dll", CallingConvention = CallingConvention.Cdecl)] private static extern double Multiply(double a, double b); // 导入 C++ DLL 中的 ParseJsonAndReturnActions 函数 - [DllImport("D:/workspace/dayuAI/SparkClient/Libs/AlgorithmServer.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] + [DllImport("../../../Libs/AlgorithmServer.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr ParseJsonAndReturnActions(byte[] jsonData); - - public AlgorithmServer() + // 添加公共方法供外部调用 + public string CallParseJsonAndReturnActions(JObject jsonData) { - + string jsonDataString = jsonData.ToString(); + byte[] jsonDataBytes = System.Text.Encoding.UTF8.GetBytes(jsonDataString); + // 调用 C++ 函数进行加法运算 double resultAdd = Add(3.5, 4.5); MessageBox.Show($"Add(3.5, 4.5) = {resultAdd}"); @@ -37,38 +30,17 @@ namespace SparkClient.Model.Services // 调用 C++ 函数进行乘法运算 double resultMultiply = Multiply(3.5, 4.5); MessageBox.Show($"Multiply(3.5, 4.5) = {resultMultiply}"); - - // 测试 JSON 数据 - // 定义并初始化 JObject - JObject jsonData = new JObject( - new JProperty("dataAttributes", new JArray( - new JObject(new JProperty("name", "你好")), - new JObject(new JProperty("name", "hello")), - new JObject(new JProperty("name", "666")), - new JObject(new JProperty("name", "是的")), - new JObject(new JProperty("name", "确认")) - )) - ); - - // 将 JObject 序列化为字符串 - string jsonDataString = jsonData.ToString(); - - // 将 JSON 字符串转换为字节数组 - byte[] jsonDataBytes = System.Text.Encoding.UTF8.GetBytes(jsonDataString); - + // 调用 C++ DLL 函数解析 JSON IntPtr resultPtr = ParseJsonAndReturnActions(jsonDataBytes); - // 检查返回的指针是否为空 if (resultPtr != IntPtr.Zero) { - string? result = Marshal.PtrToStringAnsi(resultPtr); - MessageBox.Show(result, "解析结果", MessageBoxButton.OK, MessageBoxImage.Information); - + return Marshal.PtrToStringAnsi(resultPtr) ?? "解析结果为空"; } else { - MessageBox.Show("解析结果为空", "解析结果", MessageBoxButton.OK, MessageBoxImage.Warning); + return "解析结果为空"; } } } diff --git a/Model/Services/SOCClientService.cs b/Model/Services/SOCClientService.cs index dffd822..7821a18 100644 --- a/Model/Services/SOCClientService.cs +++ b/Model/Services/SOCClientService.cs @@ -1,23 +1,61 @@ using Newtonsoft.Json; using System; +using System.IO; using System.Net.Http; using System.Text; using System.Threading.Tasks; +using System.Windows; +using HandyControl.Tools.Extension; +using SparkClient.Model.Common; namespace SparkClient.Model.Services { + /// + /// SOC 客户端服务类,用于与远程服务器进行交互,包括启动图片收集任务、获取图片、获取采集状态等操作。 + /// public class SOCClientService { + // Log地址 + private const string LogFilePath = @"..\..\..\Resource\Document\log.txt"; + + private static readonly Dictionary StatusDescriptions = new Dictionary + { + { "S000", "成功" }, + { "S001", "采图正在进行中" }, + { "S002", "缓存图片被清理(读取不够及时)" }, + { "S003", "无法向单片机发送指令" }, + { "S004", "单片机访问超时" }, + { "S005", "单片机返回错误码" }, + { "P001", "未找到切工仪" }, + { "P002", "算法调用失败" } + }; + + /// + /// 基础URL,用于构建完整的API请求地址。 + /// private readonly string _baseUrl; + + /// + /// 认证令牌,用于HTTP请求的认证。 + /// private readonly string _authToken; + /// + /// 构造函数,初始化基础URL和认证令牌。 + /// + /// 基础URL + /// 认证令牌 public SOCClientService(string baseUrl, string authToken) { _baseUrl = baseUrl; _authToken = authToken; } - // 通用GET请求方法 + /// + /// 发送GET请求的通用方法。 + /// + /// 请求的完整URL + /// HTTP响应 private async Task SendGetRequestAsync(string url) { using (var client = new HttpClient()) @@ -27,7 +65,11 @@ namespace SparkClient.Model.Services } } - // 1. 启动图片收集任务 + /// + /// 启动图片收集任务。 + /// + /// 光照级别 + /// 任务状态 public async Task CollectImagesAsync(int lightLevel) { string url = $"{_baseUrl}/collect_images?light_level={lightLevel}"; @@ -41,27 +83,55 @@ namespace SparkClient.Model.Services } else { - return "Error: " + response.StatusCode; + return "collect_images_Error: " + (int)response.StatusCode; } } - // 2. 获取图片 - public async Task RetrieveImageAsync(int index) + /// + /// 获取指定索引的图片。 + /// + /// 图片索引 + /// 图片的字节数组 + public async Task> RetrieveImageAsync(string savePath) { - string url = $"{_baseUrl}/retrieve_image/{index}"; - var response = await SendGetRequestAsync(url); - - if (response.IsSuccessStatusCode) - { - return await response.Content.ReadAsByteArrayAsync(); - } - else + List imageNames = new List(); + // 读取图片接口 + int imageIndex = 0; + while (true) { - throw new Exception("Error retrieving image: " + response.StatusCode); + string url = $"{_baseUrl}/retrieve_image/{imageIndex}"; + var response = await SendGetRequestAsync(url); + int status = (int)response.StatusCode; + + if (status == 200) + { + byte[] imageBytes = await response.Content.ReadAsByteArrayAsync(); + string fileName = Path.Combine(savePath, $"image_{imageIndex}.bmp"); + // 图片名称List + imageNames.Add(Path.GetFileName(fileName)); + // 保存图片 + await File.WriteAllBytesAsync(fileName, imageBytes); + imageIndex++; + } + else if (status == 425) + { + await Task.Delay(1000); + } + else if (status == 410) + { + imageIndex++; + } + else if (status == 404) + { + return imageNames; + } } } - // 3. 获取采集状态 + /// + /// 获取图片采集状态。 + /// + /// 采集状态 public async Task CollectStatusAsync() { string url = $"{_baseUrl}/collect_status"; @@ -75,14 +145,94 @@ namespace SparkClient.Model.Services } else { - return "Error: " + response.StatusCode; + return "collect_status_Error: " + (int)response.StatusCode; + } + } + + /// + /// 处理图片收集、保存和状态检查。 + /// + /// 光照级别 + /// 图片保存路径 + /// 操作结果 + public async Task ProcessImageCollectionAsync(int lightLevel, string savePath) + { + try + { + // 清理 savePath 文件夹 + if (Directory.Exists(savePath)) + { + Directory.Delete(savePath, true); + } + Directory.CreateDirectory(savePath); + + // 启动任务接口 + string startStatus = await CollectImagesAsync(lightLevel); + // 成功 + if (startStatus != StatusCodes.Success) + { + // 启动任务失败 + return new ImageCollectionResult { Status = startStatus, Images = new List() }; + } + + // 读取图片接口 + List imageNames = await RetrieveImageAsync(savePath); + if (imageNames.Count != 0) + { + // 采集状态接口 + string acquisitionStatus = await CollectStatusAsync(); + // 成功 + if (acquisitionStatus != StatusCodes.Success) + { + // 采集状态失败 + return new ImageCollectionResult { Status = acquisitionStatus, Images = new List() }; + } + } + // 按下载时间排序图片名称 + return new ImageCollectionResult { Status = StatusCodes.Success, Images = imageNames }; + } + catch (Exception e) + { + // 日志记录 + // logger.Error(e, "发生异常"); + string logMessage = $"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}] 发生异常: {e.Message}{Environment.NewLine}"; + File.AppendAllText(LogFilePath, logMessage); + return new ImageCollectionResult { Status = StatusCodes.DeviceNotFound, Images = new List() }; + } + } + + /// + /// 根据状态码获取相应的描述信息。 + /// 如果状态码在预定义的状态字典中存在,则返回对应的描述信息; + /// 否则返回“未知状态: [状态码]”。 + /// + /// 状态码。 + /// 状态描述信息。 + private string GetDescription(string status) + { + if (StatusDescriptions.TryGetValue(status, out string description)) + { + return description; } + return "未知状态: " + status; } + } + + /// + /// 响应状态类,用于解析服务器返回的状态信息。 + /// public class ResponseStatus { + /// + /// 状态码 + /// public string Status { get; set; } + + /// + /// 状态消息 + /// public string Message { get; set; } } } diff --git a/Resource/DimDemo.txt b/Resource/DimDemo.txt deleted file mode 100644 index 26d79af..0000000 --- a/Resource/DimDemo.txt +++ /dev/null @@ -1,310 +0,0 @@ --- 腰 --39.660,46.816,-30.448;-43.304,46.817,-24.996;-39.662,48.374,-30.446|0|7dbb404af789839a701aebd8b3b603e1|0 --48.293,46.816,-12.953;-46.194,49.000,-19.134;-46.194,46.000,-19.134|0|7dbb404af789839a701aebd8b3b603e1|0 --30.446,48.374,-39.662;-30.442,46.817,-39.665;-35.355,46.000,-35.355|0|7dbb404af789839a701aebd8b3b603e1|0 -19.134,49.000,-46.194;24.992,48.374,-43.306;19.134,46.000,-46.194|0|7dbb404af789839a701aebd8b3b603e1|0 -35.355,49.000,-35.355;35.355,46.000,-35.355;30.448,46.816,-39.660|0|7dbb404af789839a701aebd8b3b603e1|0 -35.355,49.000,-35.355;39.662,48.374,-30.446;35.355,46.000,-35.355|0|7dbb404af789839a701aebd8b3b603e1|0 -30.446,48.374,-39.662;30.448,46.816,-39.660;24.996,46.817,-43.304|0|7dbb404af789839a701aebd8b3b603e1|0 --12.946,46.817,-48.295;-19.134,46.000,-46.194;-12.950,48.374,-48.294|0|7dbb404af789839a701aebd8b3b603e1|0 -39.665,46.817,-30.442;43.306,48.374,-24.992;43.307,46.816,-24.989|0|7dbb404af789839a701aebd8b3b603e1|0 -48.294,48.374,-12.950;46.194,46.000,-19.134;46.194,49.000,-19.134|0|7dbb404af789839a701aebd8b3b603e1|0 -6.521,46.817,-49.573;-0.000,46.000,-50.000;6.517,48.374,-49.573|0|7dbb404af789839a701aebd8b3b603e1|0 -48.295,46.817,-12.946;49.573,48.374,-6.517;49.574,46.816,-6.513|0|7dbb404af789839a701aebd8b3b603e1|0 -43.307,46.816,-24.989;46.194,49.000,-19.134;46.194,46.000,-19.134|0|7dbb404af789839a701aebd8b3b603e1|0 -24.996,46.817,-43.304;19.134,46.000,-46.194;24.992,48.374,-43.306|0|7dbb404af789839a701aebd8b3b603e1|0 -50.000,46.000,-0.000;49.574,46.816,-6.513;50.000,49.000,0.000|0|7dbb404af789839a701aebd8b3b603e1|0 -48.294,48.374,12.950;48.293,46.816,12.953;49.573,46.817,6.521|0|7dbb404af789839a701aebd8b3b603e1|0 -39.665,46.817,-30.442;35.355,46.000,-35.355;39.662,48.374,-30.446|0|7dbb404af789839a701aebd8b3b603e1|0 -46.194,46.000,19.134;48.293,46.816,12.953;46.194,49.000,19.134|0|7dbb404af789839a701aebd8b3b603e1|0 -50.000,49.000,0.000;49.573,48.374,6.517;50.000,46.000,-0.000|0|7dbb404af789839a701aebd8b3b603e1|0 -48.295,46.817,-12.946;46.194,46.000,-19.134;48.294,48.374,-12.950|0|7dbb404af789839a701aebd8b3b603e1|0 -46.194,46.000,19.134;46.194,49.000,19.134;43.306,48.374,24.992|0|7dbb404af789839a701aebd8b3b603e1|0 -30.446,48.374,39.662;35.355,46.000,35.355;35.355,49.000,35.355|0|7dbb404af789839a701aebd8b3b603e1|0 -49.573,46.817,6.521;50.000,46.000,-0.000;49.573,48.374,6.517|0|7dbb404af789839a701aebd8b3b603e1|0 -39.660,46.816,30.448;35.355,49.000,35.355;35.355,46.000,35.355|0|7dbb404af789839a701aebd8b3b603e1|0 -39.660,46.816,30.448;43.304,46.817,24.996;39.662,48.374,30.446|0|7dbb404af789839a701aebd8b3b603e1|0 -43.304,46.817,24.996;46.194,46.000,19.134;43.306,48.374,24.992|0|7dbb404af789839a701aebd8b3b603e1|0 -19.134,46.000,46.194;19.134,49.000,46.194;12.950,48.374,48.294|0|7dbb404af789839a701aebd8b3b603e1|0 -30.442,46.817,39.665;35.355,46.000,35.355;30.446,48.374,39.662|0|7dbb404af789839a701aebd8b3b603e1|0 -12.946,46.817,48.295;6.517,48.374,49.573;6.513,46.816,49.574|0|7dbb404af789839a701aebd8b3b603e1|0 -19.134,49.000,46.194;19.134,46.000,46.194;24.989,46.816,43.307|0|7dbb404af789839a701aebd8b3b603e1|0 -12.946,46.817,48.295;19.134,46.000,46.194;12.950,48.374,48.294|0|7dbb404af789839a701aebd8b3b603e1|0 -6.513,46.816,49.574;6.517,48.374,49.573;-0.000,49.000,50.000|0|7dbb404af789839a701aebd8b3b603e1|0 -0.000,46.000,50.000;6.513,46.816,49.574;-0.000,49.000,50.000|0|7dbb404af789839a701aebd8b3b603e1|0 -12.953,46.816,-48.293;19.134,49.000,-46.194;19.134,46.000,-46.194|0|7dbb404af789839a701aebd8b3b603e1|0 -6.517,48.374,49.573;12.946,46.817,48.295;12.950,48.374,48.294|0|7dbb404af789839a701aebd8b3b603e1|0 -24.989,46.816,43.307;24.992,48.374,43.306;19.134,49.000,46.194|0|7dbb404af789839a701aebd8b3b603e1|0 -24.992,48.374,43.306;30.442,46.817,39.665;30.446,48.374,39.662|0|7dbb404af789839a701aebd8b3b603e1|0 -24.989,46.816,43.307;30.442,46.817,39.665;24.992,48.374,43.306|0|7dbb404af789839a701aebd8b3b603e1|0 -39.660,46.816,30.448;39.662,48.374,30.446;35.355,49.000,35.355|0|7dbb404af789839a701aebd8b3b603e1|0 -6.521,46.817,-49.573;12.950,48.374,-48.294;12.953,46.816,-48.293|0|7dbb404af789839a701aebd8b3b603e1|0 -39.662,48.374,30.446;43.304,46.817,24.996;43.306,48.374,24.992|0|7dbb404af789839a701aebd8b3b603e1|0 -48.293,46.816,12.953;48.294,48.374,12.950;46.194,49.000,19.134|0|7dbb404af789839a701aebd8b3b603e1|0 -6.517,48.374,-49.573;-0.000,46.000,-50.000;-0.000,49.000,-50.000|0|7dbb404af789839a701aebd8b3b603e1|0 -48.294,48.374,12.950;49.573,46.817,6.521;49.573,48.374,6.517|0|7dbb404af789839a701aebd8b3b603e1|0 -49.574,46.816,-6.513;49.573,48.374,-6.517;50.000,49.000,0.000|0|7dbb404af789839a701aebd8b3b603e1|0 --0.000,46.000,-50.000;-6.513,46.816,-49.574;-0.000,49.000,-50.000|0|7dbb404af789839a701aebd8b3b603e1|0 -49.573,48.374,-6.517;48.295,46.817,-12.946;48.294,48.374,-12.950|0|7dbb404af789839a701aebd8b3b603e1|0 -43.307,46.816,-24.989;43.306,48.374,-24.992;46.194,49.000,-19.134|0|7dbb404af789839a701aebd8b3b603e1|0 --6.517,48.374,-49.573;-6.513,46.816,-49.574;-12.946,46.817,-48.295|0|7dbb404af789839a701aebd8b3b603e1|0 -43.306,48.374,-24.992;39.665,46.817,-30.442;39.662,48.374,-30.446|0|7dbb404af789839a701aebd8b3b603e1|0 -30.448,46.816,-39.660;30.446,48.374,-39.662;35.355,49.000,-35.355|0|7dbb404af789839a701aebd8b3b603e1|0 --19.134,46.000,-46.194;-19.134,49.000,-46.194;-12.950,48.374,-48.294|0|7dbb404af789839a701aebd8b3b603e1|0 -30.446,48.374,-39.662;24.996,46.817,-43.304;24.992,48.374,-43.306|0|7dbb404af789839a701aebd8b3b603e1|0 -12.953,46.816,-48.293;12.950,48.374,-48.294;19.134,49.000,-46.194|0|7dbb404af789839a701aebd8b3b603e1|0 --24.989,46.816,-43.307;-19.134,49.000,-46.194;-19.134,46.000,-46.194|0|7dbb404af789839a701aebd8b3b603e1|0 -12.950,48.374,-48.294;6.521,46.817,-49.573;6.517,48.374,-49.573|0|7dbb404af789839a701aebd8b3b603e1|0 --6.513,46.816,-49.574;-6.517,48.374,-49.573;-0.000,49.000,-50.000|0|7dbb404af789839a701aebd8b3b603e1|0 --24.989,46.816,-43.307;-30.442,46.817,-39.665;-24.992,48.374,-43.306|0|7dbb404af789839a701aebd8b3b603e1|0 --6.517,48.374,-49.573;-12.946,46.817,-48.295;-12.950,48.374,-48.294|0|7dbb404af789839a701aebd8b3b603e1|0 --24.989,46.816,-43.307;-24.992,48.374,-43.306;-19.134,49.000,-46.194|0|7dbb404af789839a701aebd8b3b603e1|0 --39.660,46.816,-30.448;-35.355,49.000,-35.355;-35.355,46.000,-35.355|0|7dbb404af789839a701aebd8b3b603e1|0 --35.355,49.000,-35.355;-30.446,48.374,-39.662;-35.355,46.000,-35.355|0|7dbb404af789839a701aebd8b3b603e1|0 --24.992,48.374,-43.306;-30.442,46.817,-39.665;-30.446,48.374,-39.662|0|7dbb404af789839a701aebd8b3b603e1|0 --43.304,46.817,-24.996;-43.306,48.374,-24.992;-39.662,48.374,-30.446|0|7dbb404af789839a701aebd8b3b603e1|0 --39.660,46.816,-30.448;-39.662,48.374,-30.446;-35.355,49.000,-35.355|0|7dbb404af789839a701aebd8b3b603e1|0 --43.304,46.817,-24.996;-46.194,46.000,-19.134;-43.306,48.374,-24.992|0|7dbb404af789839a701aebd8b3b603e1|0 --43.306,48.374,-24.992;-46.194,46.000,-19.134;-46.194,49.000,-19.134|0|7dbb404af789839a701aebd8b3b603e1|0 --49.574,46.816,6.513;-49.573,48.374,6.517;-50.000,49.000,-0.000|0|7dbb404af789839a701aebd8b3b603e1|0 --49.573,46.817,-6.521;-49.573,48.374,-6.517;-48.294,48.374,-12.950|0|7dbb404af789839a701aebd8b3b603e1|0 --46.194,49.000,19.134;-48.294,48.374,12.950;-46.194,46.000,19.134|0|7dbb404af789839a701aebd8b3b603e1|0 --49.573,48.374,6.517;-48.295,46.817,12.946;-48.294,48.374,12.950|0|7dbb404af789839a701aebd8b3b603e1|0 --35.355,49.000,35.355;-39.662,48.374,30.446;-35.355,46.000,35.355|0|7dbb404af789839a701aebd8b3b603e1|0 --35.355,49.000,35.355;-35.355,46.000,35.355;-30.448,46.816,39.660|0|7dbb404af789839a701aebd8b3b603e1|0 --43.307,46.816,24.989;-43.306,48.374,24.992;-46.194,49.000,19.134|0|7dbb404af789839a701aebd8b3b603e1|0 --19.134,49.000,46.194;-19.134,46.000,46.194;-12.953,46.816,48.293|0|7dbb404af789839a701aebd8b3b603e1|0 --19.134,46.000,46.194;-19.134,49.000,46.194;-24.992,48.374,43.306|0|7dbb404af789839a701aebd8b3b603e1|0 --30.448,46.816,39.660;-30.446,48.374,39.662;-35.355,49.000,35.355|0|7dbb404af789839a701aebd8b3b603e1|0 --6.517,48.374,49.573;-6.521,46.817,49.573;0.000,46.000,50.000|0|7dbb404af789839a701aebd8b3b603e1|0 --6.521,46.817,49.573;-6.517,48.374,49.573;-12.950,48.374,48.294|0|7dbb404af789839a701aebd8b3b603e1|0 --12.953,46.816,48.293;-12.950,48.374,48.294;-19.134,49.000,46.194|0|7dbb404af789839a701aebd8b3b603e1|0 --30.446,48.374,39.662;-24.996,46.817,43.304;-24.992,48.374,43.306|0|7dbb404af789839a701aebd8b3b603e1|0 -0.000,46.000,50.000;-0.000,49.000,50.000;-6.517,48.374,49.573|0|7dbb404af789839a701aebd8b3b603e1|0 --19.134,46.000,46.194;-24.992,48.374,43.306;-24.996,46.817,43.304|0|7dbb404af789839a701aebd8b3b603e1|0 --6.521,46.817,49.573;-12.950,48.374,48.294;-12.953,46.816,48.293|0|7dbb404af789839a701aebd8b3b603e1|0 --39.665,46.817,30.442;-35.355,46.000,35.355;-39.662,48.374,30.446|0|7dbb404af789839a701aebd8b3b603e1|0 --24.996,46.817,43.304;-30.446,48.374,39.662;-30.448,46.816,39.660|0|7dbb404af789839a701aebd8b3b603e1|0 --39.662,48.374,30.446;-43.306,48.374,24.992;-39.665,46.817,30.442|0|7dbb404af789839a701aebd8b3b603e1|0 --43.307,46.816,24.989;-46.194,49.000,19.134;-46.194,46.000,19.134|0|7dbb404af789839a701aebd8b3b603e1|0 --39.665,46.817,30.442;-43.306,48.374,24.992;-43.307,46.816,24.989|0|7dbb404af789839a701aebd8b3b603e1|0 --48.295,46.817,12.946;-46.194,46.000,19.134;-48.294,48.374,12.950|0|7dbb404af789839a701aebd8b3b603e1|0 --50.000,49.000,-0.000;-50.000,46.000,-0.000;-49.574,46.816,6.513|0|7dbb404af789839a701aebd8b3b603e1|0 --48.295,46.817,12.946;-49.573,48.374,6.517;-49.574,46.816,6.513|0|7dbb404af789839a701aebd8b3b603e1|0 --50.000,49.000,-0.000;-49.573,48.374,-6.517;-50.000,46.000,-0.000|0|7dbb404af789839a701aebd8b3b603e1|0 --50.000,46.000,-0.000;-49.573,48.374,-6.517;-49.573,46.817,-6.521|0|7dbb404af789839a701aebd8b3b603e1|0 --49.573,46.817,-6.521;-48.294,48.374,-12.950;-48.293,46.816,-12.953|0|7dbb404af789839a701aebd8b3b603e1|0 --46.194,49.000,-19.134;-48.293,46.816,-12.953;-48.294,48.374,-12.950|0|7dbb404af789839a701aebd8b3b603e1|0 --- 台面 -25.058,63.400,-0.000;17.719,63.400,-17.719;-0.000,63.400,-25.058|0|396b3abcea691c830e02a40289596796|11 --17.719,63.400,-17.719;17.719,63.400,17.719;25.058,63.400,-0.000|0|396b3abcea691c830e02a40289596796|11 --0.000,63.400,-25.058;-17.719,63.400,-17.719;25.058,63.400,-0.000|0|396b3abcea691c830e02a40289596796|11 -0.000,63.400,25.058;17.719,63.400,17.719;-25.058,63.400,0.000|0|396b3abcea691c830e02a40289596796|11 --25.058,63.400,0.000;-17.719,63.400,17.719;0.000,63.400,25.058|0|396b3abcea691c830e02a40289596796|11 --17.719,63.400,-17.719;-25.058,63.400,0.000;17.719,63.400,17.719|0|396b3abcea691c830e02a40289596796|11 --- 下腰面 22 --48.295,46.817,12.946;-10.002,9.202,4.100;-46.194,46.000,19.134|0|a4895d6e10f22c829b9d793bd382bafd|22 --49.574,46.816,6.513;-10.002,9.202,4.100;-48.295,46.817,12.946|0|a4895d6e10f22c829b9d793bd382bafd|22 --49.574,46.816,6.513;-50.000,46.000,-0.000;-10.002,9.202,4.100|0|a4895d6e10f22c829b9d793bd382bafd|22 - --9.972,9.202,-4.173;-39.660,46.816,-30.448;-35.355,46.000,-35.355|0|00dc5045a0aaa20edee44fa48934fe79|22 --39.660,46.816,-30.448;-9.972,9.202,-4.173;-43.304,46.817,-24.996|0|00dc5045a0aaa20edee44fa48934fe79|22 --9.972,9.202,-4.173;-46.194,46.000,-19.134;-43.304,46.817,-24.996|0|00dc5045a0aaa20edee44fa48934fe79|22 - -24.996,46.817,-43.304;4.173,9.202,-9.972;19.134,46.000,-46.194|0|d4bce1a0044d59d475f7c90909c737be|22 -30.448,46.816,-39.660;4.173,9.202,-9.972;24.996,46.817,-43.304|0|d4bce1a0044d59d475f7c90909c737be|22 -4.173,9.202,-9.972;30.448,46.816,-39.660;35.355,46.000,-35.355|0|d4bce1a0044d59d475f7c90909c737be|22 - -4.173,9.202,-9.972;6.521,46.817,-49.573;12.953,46.816,-48.293|0|2ac8e5af58984a47577a703618d5a05e|22 -4.173,9.202,-9.972;12.953,46.816,-48.293;19.134,46.000,-46.194|0|2ac8e5af58984a47577a703618d5a05e|22 -4.173,9.202,-9.972;-0.000,46.000,-50.000;6.521,46.817,-49.573|0|2ac8e5af58984a47577a703618d5a05e|22 - --4.100,9.202,-10.002;-12.946,46.817,-48.295;-6.513,46.816,-49.574|0|78b4ef23c9f365322759fbdfbe2eceac|22 --0.000,46.000,-50.000;-4.100,9.202,-10.002;-6.513,46.816,-49.574|0|78b4ef23c9f365322759fbdfbe2eceac|22 --12.946,46.817,-48.295;-4.100,9.202,-10.002;-19.134,46.000,-46.194|0|78b4ef23c9f365322759fbdfbe2eceac|22 - --19.134,46.000,-46.194;-4.100,9.202,-10.002;-24.989,46.816,-43.307|0|38c7a333470f49e5c29e1bc691f8aeb5|22 --24.989,46.816,-43.307;-4.100,9.202,-10.002;-30.442,46.817,-39.665|0|38c7a333470f49e5c29e1bc691f8aeb5|22 --4.100,9.202,-10.002;-35.355,46.000,-35.355;-30.442,46.817,-39.665|0|38c7a333470f49e5c29e1bc691f8aeb5|22 - --10.002,9.202,4.100;-35.355,46.000,35.355;-39.665,46.817,30.442|0|9189072cfbf3cccb1c2ef0eb831cf149|22 --39.665,46.817,30.442;-43.307,46.816,24.989;-10.002,9.202,4.100|0|9189072cfbf3cccb1c2ef0eb831cf149|22 --10.002,9.202,4.100;-43.307,46.816,24.989;-46.194,46.000,19.134|0|9189072cfbf3cccb1c2ef0eb831cf149|22 - --46.194,46.000,-19.134;-9.972,9.202,-4.173;-48.293,46.816,-12.953|0|08a840488158522766bd3b24fde624da|22 --48.293,46.816,-12.953;-9.972,9.202,-4.173;-49.573,46.817,-6.521|0|08a840488158522766bd3b24fde624da|22 --9.972,9.202,-4.173;-50.000,46.000,-0.000;-49.573,46.817,-6.521|0|08a840488158522766bd3b24fde624da|22 - -10.002,9.202,-4.100;48.295,46.817,-12.946;49.574,46.816,-6.513|0|dd7c41b1fce549f42aeacd7aab372fac|22 -50.000,46.000,-0.000;10.002,9.202,-4.100;49.574,46.816,-6.513|0|dd7c41b1fce549f42aeacd7aab372fac|22 -48.295,46.817,-12.946;10.002,9.202,-4.100;46.194,46.000,-19.134|0|dd7c41b1fce549f42aeacd7aab372fac|22 - -43.304,46.817,24.996;9.972,9.202,4.173;46.194,46.000,19.134|0|e75da2414a4fa8b60247f78d30ec2e5c|22 -39.660,46.816,30.448;9.972,9.202,4.173;43.304,46.817,24.996|0|e75da2414a4fa8b60247f78d30ec2e5c|22 -9.972,9.202,4.173;39.660,46.816,30.448;35.355,46.000,35.355|0|e75da2414a4fa8b60247f78d30ec2e5c|22 - -9.972,9.202,4.173;49.573,46.817,6.521;48.293,46.816,12.953|0|c894271128a77e1a047b177ccdbf4607|22 -9.972,9.202,4.173;48.293,46.816,12.953;46.194,46.000,19.134|0|c894271128a77e1a047b177ccdbf4607|22 -9.972,9.202,4.173;50.000,46.000,-0.000;49.573,46.817,6.521|0|c894271128a77e1a047b177ccdbf4607|22 - -46.194,46.000,-19.134;10.002,9.202,-4.100;43.307,46.816,-24.989|0|4664b8df612337edf03ba928bd73808b|22 -43.307,46.816,-24.989;10.002,9.202,-4.100;39.665,46.817,-30.442|0|4664b8df612337edf03ba928bd73808b|22 -10.002,9.202,-4.100;35.355,46.000,-35.355;39.665,46.817,-30.442|0|4664b8df612337edf03ba928bd73808b|22 - --19.134,46.000,46.194;-4.173,9.202,9.972;-12.953,46.816,48.293|0|1d6fc5b123e903da99e2eab57bb260ec|22 --12.953,46.816,48.293;-4.173,9.202,9.972;-6.521,46.817,49.573|0|1d6fc5b123e903da99e2eab57bb260ec|22 --4.173,9.202,9.972;0.000,46.000,50.000;-6.521,46.817,49.573|0|1d6fc5b123e903da99e2eab57bb260ec|22 - -4.100,9.202,10.002;30.442,46.817,39.665;24.989,46.816,43.307|0|aa6881482e26977e69a0984677871631|22 -4.100,9.202,10.002;24.989,46.816,43.307;19.134,46.000,46.194|0|aa6881482e26977e69a0984677871631|22 -4.100,9.202,10.002;35.355,46.000,35.355;30.442,46.817,39.665|0|aa6881482e26977e69a0984677871631|22 - -12.946,46.817,48.295;4.100,9.202,10.002;19.134,46.000,46.194|0|da3ca69e937333c4995bd186e06e6660|22 -6.513,46.816,49.574;4.100,9.202,10.002;12.946,46.817,48.295|0|da3ca69e937333c4995bd186e06e6660|22 -6.513,46.816,49.574;0.000,46.000,50.000;4.100,9.202,10.002|0|da3ca69e937333c4995bd186e06e6660|22 - --19.134,46.000,46.194;-24.996,46.817,43.304;-4.173,9.202,9.972|0|67b54da250ef377dc19356e7603055ff|22 --30.448,46.816,39.660;-4.173,9.202,9.972;-24.996,46.817,43.304|0|67b54da250ef377dc19356e7603055ff|22 --30.448,46.816,39.660;-35.355,46.000,35.355;-4.173,9.202,9.972|0|67b54da250ef377dc19356e7603055ff|22 - --- 亭部主刻面 21 -0.000,0.000,-0.000;-50.000,46.000,-0.000;-9.766,8.985,-4.045|0|cda6c912b39797c7ba8cf3ffea613640|21 --50.000,46.000,-0.000;0.000,0.000,-0.000;-9.766,8.985,4.045|0|cda6c912b39797c7ba8cf3ffea613640|21 - --4.045,8.985,9.766;-9.766,8.985,4.045;0.000,0.000,-0.000|0|93990da555a0dbdbecda185365def922|21 --4.173,9.202,9.972;-9.766,8.985,4.045;-4.045,8.985,9.766|0|93990da555a0dbdbecda185365def922|21 --9.766,8.985,4.045;-4.173,9.202,9.972;-35.355,46.000,35.355|0|93990da555a0dbdbecda185365def922|21 - -9.972,9.202,4.173;35.355,46.000,35.355;4.045,8.985,9.766|0|d7b0cbd2902f01b69995ac44aa07deff|21 -9.766,8.985,4.045;4.045,8.985,9.766;0.000,0.000,-0.000|0|d7b0cbd2902f01b69995ac44aa07deff|21 -9.766,8.985,4.045;9.972,9.202,4.173;4.045,8.985,9.766|0|d7b0cbd2902f01b69995ac44aa07deff|21 - -4.173,9.202,-9.972;35.355,46.000,-35.355;9.766,8.985,-4.045|0|44979f9e3066ce33059f50702fcb0c0a|21 -4.045,8.985,-9.766;9.766,8.985,-4.045;0.000,0.000,-0.000|0|44979f9e3066ce33059f50702fcb0c0a|21 -4.045,8.985,-9.766;4.173,9.202,-9.972;9.766,8.985,-4.045|0|44979f9e3066ce33059f50702fcb0c0a|21 - --9.766,8.985,-4.045;-4.045,8.985,-9.766;0.000,0.000,-0.000|0|5ccb9023f767a55a8498a2af13084186|21 --9.972,9.202,-4.173;-4.045,8.985,-9.766;-9.766,8.985,-4.045|0|5ccb9023f767a55a8498a2af13084186|21 --4.045,8.985,-9.766;-9.972,9.202,-4.173;-35.355,46.000,-35.355|0|5ccb9023f767a55a8498a2af13084186|21 - --4.045,8.985,-9.766;-0.000,46.000,-50.000;0.000,0.000,-0.000|0|ee94fca4a7073265020c9d5044dbedb0|21 -0.000,0.000,-0.000;-0.000,46.000,-50.000;4.045,8.985,-9.766|0|ee94fca4a7073265020c9d5044dbedb0|21 - -9.766,8.985,-4.045;50.000,46.000,-0.000;0.000,0.000,-0.000|0|1493d5a442ff1b307d8cfe6e736a45c2|21 -0.000,0.000,-0.000;50.000,46.000,-0.000;9.766,8.985,4.045|0|1493d5a442ff1b307d8cfe6e736a45c2|21 - -0.000,0.000,-0.000;0.000,46.000,50.000;-4.045,8.985,9.766|0|f677990350a0533680a5ae5477b48fe3|21 -4.045,8.985,9.766;0.000,46.000,50.000;0.000,0.000,-0.000|0|f677990350a0533680a5ae5477b48fe3|21 - --- 亭部缝隙?? --50.000,46.000,-0.000;-9.766,8.985,4.045;-10.002,9.202,4.100|0|0|99 --50.000,46.000,-0.000;-9.972,9.202,-4.173;-9.766,8.985,-4.045|0|0|99 --0.000,46.000,-50.000;-4.045,8.985,-9.766;-4.100,9.202,-10.002|0|0|99 -50.000,46.000,-0.000;9.766,8.985,-4.045;10.002,9.202,-4.100|0|0|99 -4.100,9.202,10.002;0.000,46.000,50.000;4.045,8.985,9.766|0|0|99 -4.045,8.985,-9.766;-0.000,46.000,-50.000;4.173,9.202,-9.972|0|0|99 --35.355,46.000,-35.355;-4.100,9.202,-10.002;-4.045,8.985,-9.766|0|0|99 -9.766,8.985,4.045;50.000,46.000,-0.000;9.972,9.202,4.173|0|0|99 -35.355,46.000,-35.355;10.002,9.202,-4.100;9.766,8.985,-4.045|0|0|99 -0.000,46.000,50.000;-4.173,9.202,9.972;-4.045,8.985,9.766|0|0|99 -4.100,9.202,10.002;4.045,8.985,9.766;35.355,46.000,35.355|0|0|99 --10.002,9.202,4.100;-9.766,8.985,4.045;-35.355,46.000,35.355|0|0|99 --- 冠部主刻面(风筝面) 11 --25.058,63.400,0.000;-35.315,57.478,-14.626;-50.000,49.000,-0.000|0|0bbf439750922c7f2e219a59d12a99c5|12 --50.000,49.000,-0.000;-35.316,57.478,14.627;-25.058,63.400,0.000|0|0bbf439750922c7f2e219a59d12a99c5|12 - -17.719,63.400,17.719;35.355,49.000,35.355;35.315,57.478,14.629|0|dbba6f34125fd5b2c424d907fa689490|12 -35.355,49.000,35.355;17.719,63.400,17.719;14.629,57.478,35.313|0|dbba6f34125fd5b2c424d907fa689490|12 - -17.719,63.400,-17.719;35.355,49.000,-35.355;14.629,57.478,-35.315|0|99f6930e4b75d96d2def876408192739|12 -35.355,49.000,-35.355;17.719,63.400,-17.719;35.313,57.478,-14.629|0|99f6930e4b75d96d2def876408192739|12 - --0.000,63.400,-25.058;-0.000,49.000,-50.000;-14.627,57.478,-35.316|0|08383999f8e7205240c161d03f7dfb84|12 --0.000,63.400,-25.058;14.629,57.478,-35.315;-0.000,49.000,-50.000|0|08383999f8e7205240c161d03f7dfb84|12 - --17.719,63.400,-17.719;-35.355,49.000,-35.355;-35.315,57.478,-14.626|0|e4266b2dd15a1c3da6e58b750c715eed|12 --17.719,63.400,-17.719;-14.627,57.478,-35.316;-35.355,49.000,-35.355|0|e4266b2dd15a1c3da6e58b750c715eed|12 - -25.058,63.400,-0.000;50.000,49.000,0.000;35.313,57.478,-14.629|0|c6e1c0df3fffda386444d1d5fcabb530|12 -25.058,63.400,-0.000;35.315,57.478,14.629;50.000,49.000,0.000|0|c6e1c0df3fffda386444d1d5fcabb530|12 - -0.000,63.400,25.058;-0.000,49.000,50.000;14.629,57.478,35.313|0|71c4bbfd0f33113e25ad5263483c0b1c|12 -0.000,63.400,25.058;-14.626,57.478,35.315;-0.000,49.000,50.000|0|71c4bbfd0f33113e25ad5263483c0b1c|12 - --17.719,63.400,17.719;-35.355,49.000,35.355;-14.626,57.478,35.315|0|45f8d52f83c5f7430398b405873a1d92|12 --17.719,63.400,17.719;-35.316,57.478,14.627;-35.355,49.000,35.355|0|45f8d52f83c5f7430398b405873a1d92|12 - --- 星刻面 --35.315,57.478,-14.626;-25.058,63.400,0.000;-17.719,63.400,-17.719|0|86b6a3c846d148b11bb1a42f80a83609|13 --14.626,57.478,35.315;0.000,63.400,25.058;-17.719,63.400,17.719|0|96027456fb0953612f46c7407d4d9789|13 --25.058,63.400,0.000;-35.316,57.478,14.627;-17.719,63.400,17.719|0|65f35d216ac8996693fa14131b5a5e0b|13 -0.000,63.400,25.058;14.629,57.478,35.313;17.719,63.400,17.719|0|6e4c972b21512ab99a14aec93b598f6a|13 -17.719,63.400,17.719;35.315,57.478,14.629;25.058,63.400,-0.000|0|6820ce13dc7f6667dcc4a412afe0f3ac|13 -35.313,57.478,-14.629;17.719,63.400,-17.719;25.058,63.400,-0.000|0|7F343D202CE6C46623B9098993F4F498|13 --14.627,57.478,-35.316;-17.719,63.400,-17.719;-0.000,63.400,-25.058|0|015DE61BEAE0BB2CE98C05C8D25E07ED|13 -17.719,63.400,-17.719;14.629,57.478,-35.315;-0.000,63.400,-25.058|0|81245B930647AA46C51C4989D41639E4|13 --- 上腰面 - --35.355,49.000,35.355;-35.316,57.478,14.627;-39.662,48.374,30.446|0|d7f46d06662280b465e80e44baaf6656|14 --46.194,49.000,19.134;-43.306,48.374,24.992;-35.316,57.478,14.627|0|d7f46d06662280b465e80e44baaf6656|14 --39.662,48.374,30.446;-35.316,57.478,14.627;-43.306,48.374,24.992|0|d7f46d06662280b465e80e44baaf6656|14 - --46.194,49.000,19.134;-35.316,57.478,14.627;-48.294,48.374,12.950|0|6273974b7ba6e76f538fc2443e709984|14 --50.000,49.000,-0.000;-49.573,48.374,6.517;-35.316,57.478,14.627|0|6273974b7ba6e76f538fc2443e709984|14 --48.294,48.374,12.950;-35.316,57.478,14.627;-49.573,48.374,6.517|0|6273974b7ba6e76f538fc2443e709984|14 - -14.629,57.478,-35.315;6.517,48.374,-49.573;-0.000,49.000,-50.000|0|03b25c5175e9e4d8619c96fd2780a4c8|14 -14.629,57.478,-35.315;12.950,48.374,-48.294;6.517,48.374,-49.573|0|03b25c5175e9e4d8619c96fd2780a4c8|14 -14.629,57.478,-35.315;19.134,49.000,-46.194;12.950,48.374,-48.294|0|03b25c5175e9e4d8619c96fd2780a4c8|14 - --14.627,57.478,-35.316;-30.446,48.374,-39.662;-35.355,49.000,-35.355|0|63b0f0caa3909830e589f01de7b8144f|14 --30.446,48.374,-39.662;-14.627,57.478,-35.316;-24.992,48.374,-43.306|0|63b0f0caa3909830e589f01de7b8144f|14 --24.992,48.374,-43.306;-14.627,57.478,-35.316;-19.134,49.000,-46.194|0|63b0f0caa3909830e589f01de7b8144f|14 - -35.313,57.478,-14.629;39.662,48.374,-30.446;35.355,49.000,-35.355|0|82e6e851718c1e77c4d2872412645ee2|14 -39.662,48.374,-30.446;35.313,57.478,-14.629;43.306,48.374,-24.992|0|82e6e851718c1e77c4d2872412645ee2|14 -43.306,48.374,-24.992;35.313,57.478,-14.629;46.194,49.000,-19.134|0|82e6e851718c1e77c4d2872412645ee2|14 - -35.315,57.478,14.629;49.573,48.374,6.517;50.000,49.000,0.000|0|cc0526c6c2f54bd71b11be0ca77c72a1|14 -35.315,57.478,14.629;48.294,48.374,12.950;49.573,48.374,6.517|0|cc0526c6c2f54bd71b11be0ca77c72a1|14 -35.315,57.478,14.629;46.194,49.000,19.134;48.294,48.374,12.950|0|cc0526c6c2f54bd71b11be0ca77c72a1|14 - -14.629,57.478,35.313;19.134,49.000,46.194;24.992,48.374,43.306|0|4b95459cf9f65a489618d114ec9561b1|14 -30.446,48.374,39.662;35.355,49.000,35.355;14.629,57.478,35.313|0|4b95459cf9f65a489618d114ec9561b1|14 -14.629,57.478,35.313;24.992,48.374,43.306;30.446,48.374,39.662|0|4b95459cf9f65a489618d114ec9561b1|14 - --14.626,57.478,35.315;-6.517,48.374,49.573;-0.000,49.000,50.000|0|c169ff75fbf71e9d8e52dc1d035618a8|14 --14.626,57.478,35.315;-19.134,49.000,46.194;-12.950,48.374,48.294|0|c169ff75fbf71e9d8e52dc1d035618a8|14 --6.517,48.374,49.573;-14.626,57.478,35.315;-12.950,48.374,48.294|0|c169ff75fbf71e9d8e52dc1d035618a8|14 - --35.315,57.478,-14.626;-49.573,48.374,-6.517;-50.000,49.000,-0.000|0|3046264364e3284ab25d874dfafc5b13|14 --35.315,57.478,-14.626;-46.194,49.000,-19.134;-48.294,48.374,-12.950|0|3046264364e3284ab25d874dfafc5b13|14 --49.573,48.374,-6.517;-35.315,57.478,-14.626;-48.294,48.374,-12.950|0|3046264364e3284ab25d874dfafc5b13|14 - --14.626,57.478,35.315;-24.992,48.374,43.306;-19.134,49.000,46.194|0|a9783029b821c23fe8724485645e2067|14 --24.992,48.374,43.306;-14.626,57.478,35.315;-30.446,48.374,39.662|0|a9783029b821c23fe8724485645e2067|14 --14.626,57.478,35.315;-35.355,49.000,35.355;-30.446,48.374,39.662|0|a9783029b821c23fe8724485645e2067|14 - -19.134,49.000,46.194;14.629,57.478,35.313;12.950,48.374,48.294|0|9a48e09f3da15e8ad7f88eb749440fc9|14 --0.000,49.000,50.000;6.517,48.374,49.573;14.629,57.478,35.313|0|9a48e09f3da15e8ad7f88eb749440fc9|14 -12.950,48.374,48.294;14.629,57.478,35.313;6.517,48.374,49.573|0|9a48e09f3da15e8ad7f88eb749440fc9|14 - -43.306,48.374,24.992;46.194,49.000,19.134;35.315,57.478,14.629|0|c5c6965a2da976f05d6b2af107edd438|14 -35.355,49.000,35.355;39.662,48.374,30.446;35.315,57.478,14.629|0|c5c6965a2da976f05d6b2af107edd438|14 -43.306,48.374,24.992;35.315,57.478,14.629;39.662,48.374,30.446|0|c5c6965a2da976f05d6b2af107edd438|14 - -35.313,57.478,-14.629;49.573,48.374,-6.517;48.294,48.374,-12.950|0|e7db2f10bfc06b6bd66626ce54239040|14 -35.313,57.478,-14.629;48.294,48.374,-12.950;46.194,49.000,-19.134|0|e7db2f10bfc06b6bd66626ce54239040|14 -35.313,57.478,-14.629;50.000,49.000,0.000;49.573,48.374,-6.517|0|e7db2f10bfc06b6bd66626ce54239040|14 - -24.992,48.374,-43.306;19.134,49.000,-46.194;14.629,57.478,-35.315|0|40ad8b5dc3d50fbce654fd1ebdddf174|14 -35.355,49.000,-35.355;30.446,48.374,-39.662;14.629,57.478,-35.315|0|40ad8b5dc3d50fbce654fd1ebdddf174|14 -24.992,48.374,-43.306;14.629,57.478,-35.315;30.446,48.374,-39.662|0|40ad8b5dc3d50fbce654fd1ebdddf174|14 - --14.627,57.478,-35.316;-6.517,48.374,-49.573;-12.950,48.374,-48.294|0|513a3ebeecf54327e17972ddac75d4e9|14 --14.627,57.478,-35.316;-12.950,48.374,-48.294;-19.134,49.000,-46.194|0|513a3ebeecf54327e17972ddac75d4e9|14 --14.627,57.478,-35.316;-0.000,49.000,-50.000;-6.517,48.374,-49.573|0|513a3ebeecf54327e17972ddac75d4e9|14 - --35.315,57.478,-14.626;-43.306,48.374,-24.992;-46.194,49.000,-19.134|0|d7efe8af63a3706f1e8ebe01a7ccac04|14 --43.306,48.374,-24.992;-35.315,57.478,-14.626;-39.662,48.374,-30.446|0|d7efe8af63a3706f1e8ebe01a7ccac04|14 --35.315,57.478,-14.626;-35.355,49.000,-35.355;-39.662,48.374,-30.446|0|d7efe8af63a3706f1e8ebe01a7ccac04|14 diff --git a/Resource/Document/log.txt b/Resource/Document/log.txt new file mode 100644 index 0000000..ea7f075 --- /dev/null +++ b/Resource/Document/log.txt @@ -0,0 +1,7 @@ +[2024-12-05 16:21:22.627] 发生异常: 由于目标计算机积极拒绝,无法连接。 (localhost:5000) +[2024-12-05 16:42:38.854] 发生异常: 由于目标计算机积极拒绝,无法连接。 (localhost:5000) +[2024-12-05 16:42:49.827] 发生异常: 由于目标计算机积极拒绝,无法连接。 (localhost:5000) +[2024-12-05 16:50:48.304] 发生异常: 由于目标计算机积极拒绝,无法连接。 (localhost:5000) +[2024-12-05 16:50:56.037] 发生异常: 由于目标计算机积极拒绝,无法连接。 (localhost:5000) +[2024-12-05 16:51:04.013] 发生异常: 由于目标计算机积极拒绝,无法连接。 (localhost:5000) +[2024-12-05 16:58:31.184] 发生异常: 由于目标计算机积极拒绝,无法连接。 (localhost:5000) diff --git a/Resource/Document/开发规约.md b/Resource/Document/开发规范.md similarity index 60% rename from Resource/Document/开发规约.md rename to Resource/Document/开发规范.md index 534066a..671318d 100644 --- a/Resource/Document/开发规约.md +++ b/Resource/Document/开发规范.md @@ -1,4 +1,4 @@ -# 开发规约 +# 开发规范 ## 一、总体架构与设计原则 ### (一)MVVM 架构概述 在软件开发中,为实现良好代码结构、可维护性与可扩展性,应分离视图逻辑与业务逻辑,MVVM 设计模式是有效的解决方案。 @@ -9,21 +9,22 @@ Model(模型层):处理数据和业务逻辑,包括数据获取、存储 ## 二、具体实现细节 ### (一)ViewModel -### 1. 命令定义与实现 -#### (1)命名规范 +#### 1. 命令定义与实现 +##### (1)命名规范 ViewModel 中的命令应采用 “动词 + 名词 + Command” 格式命名,清晰表明功能。对应的执行方法命名与命令中的动词一致,便于理解命令与执行逻辑的关联。 -#### (2)代码位置 +##### (2)代码位置 与视图交互的命令在对应的 ViewModel 类中定义和实现,ViewModel 类放在 “ViewModels” 文件夹下。大型项目中,按功能模块细分该文件夹,如 3D 模型相关的 ViewModel 放在 “ViewModels/3DModelViewModels” 文件夹。 -#### (3)实现方式 +##### (3)实现方式 使用合适的命令类实现:建议用实现 ICommand 接口的命令类,如自定义的 “RelayCommand”。它要处理执行逻辑和可执行状态判断,依据条件(如数据准备情况、用户权限)决定命令是否可执行。 命令初始化与方法绑定:在 ViewModel 构造函数中初始化命令并与执行方法绑定,如 “LoadModelCommand = new RelayCommand (LoadModel);”,确保命令触发时调用正确执行方法。 参数处理:命令执行需传递参数时,命令类要能正确处理参数传递和接收。修改命令类构造函数或执行方法以接受参数,在视图层绑定命令时设置参数值。 -### 2. 数据绑定属性 -#### (1)命名规范 + +#### 2. 数据绑定属性 +##### (1)命名规范 数据绑定属性名称用驼峰命名法,清晰反映绑定的数据内容,如 “DisplayName” 绑定文本框显示文本,“DataList” 绑定列表数据。 -#### (2)数据类型选择 +##### (2)数据类型选择 根据绑定控件需求和数据性质选择合适数据类型。简单文本显示控件用 “string” 类型;列表控件用 “ObservableCollection” 等集合类型,实现数据更新自动刷新。 -#### (3)通知机制 +##### (3)通知机制 数据绑定属性值变化时,用合适机制通知视图更新。在支持数据绑定的框架(如 WPF)中,可利用相关接口(如 WPF 的 “INotifyPropertyChanged” 接口)。示例如下: ```csharp private string _displayName; @@ -38,20 +39,21 @@ public string DisplayName } ``` 属性 “set” 方法调用时,通过 “OnPropertyChanged” 方法通知视图层属性值变化,促使控件更新显示内容。 -### 3. 事件处理与通知 -#### (1)事件命名 +#### 3. 事件处理与通知 +##### (1)事件命名 ViewModel 中通知视图的事件命名采用 “名词 + 过去分词” 形式,表明动作完成或状态改变,如 “ModelLoaded” 表示模型加载完成,便于理解事件含义和业务逻辑状态。 -#### (2)事件参数类型 +##### (2)事件参数类型 事件参数类型准确反映事件携带的信息。如 “ModelLoaded” 事件传递加载后的模型对象,参数类型为 “Model3D”。若事件需传递多个信息,创建自定义事件参数类封装信息。 -#### (3)事件触发 +##### (3)事件触发 业务逻辑完成后(如模型加载成功、数据保存完成),在合适位置触发事件,用标准事件触发机制,如 “ModelLoaded?.Invoke (model);”。触发前确保事件初始化和订阅正确,避免空引用等问题。 -## (二)View -### 1. XAML 结构与布局 -#### (1)命名空间引用 +### (二)View +#### 1. XAML 结构与布局 +##### (1)命名空间引用 XAML 文件开头只引入实际使用的命名空间,按字母顺序排序,减少复杂性、提高编译速度,如: .xaml + ```csharp ``` -#### (2)布局设计原则 +##### (2)布局设计原则 选择合适的布局容器:优先用合适布局容器实现灵活可维护布局。简单水平或垂直排列控件用 “StackPanel”,通过 “Orientation” 属性控制排列方向。需精确行列布局用 “Grid”,通过定义行和列定位控件。 避免绝对坐标定位:尽量不用绝对坐标定位控件,以免界面在不同分辨率和窗口大小下适应性差。使用布局容器可实现自适应,保证良好显示效果。 -#### (3)控件命名 + +##### (3)控件命名 为重要控件命名,采用驼峰命名法且以控件类型开头,如 “btnLoadModel”(加载模型按钮)、“txtInputFileName”(输入文件名文本框),提高代码可读性。复杂界面可分组控件并命名,方便在代码 - behind 中访问和操作,如 “LoginControls” 包含登录相关控件。 -### 2. 数据绑定与命令绑定 -#### (1)绑定表达式规范 +#### 2. 数据绑定与命令绑定 +##### (1)绑定表达式规范 数据绑定表达式:数据绑定用 “{Binding Path=PropertyName}” 格式,“Path” 可省略(绑定当前数据上下文直接属性时)。绑定深层属性需指定 “Path” 值,如: .xaml + ```csharp ``` 命令绑定表达式:命令绑定用 “{Binding CommandName}” 格式,确保命令在 ViewModel 数据上下文中存在,如: .xaml + ```csharp