孔洞逻辑完成

This commit is contained in:
mmc
2026-03-03 09:40:29 +08:00
parent bb16a532ec
commit ca90d8dc05
7 changed files with 134 additions and 116 deletions

View File

@@ -19,14 +19,17 @@ class PathRepositoryImpl implements PathRepository {
required ReferencePoint reference,
required int heading,
required OuterBoundary outer,
required List<HoleBoundary> holes,
required Map<String, HoleBoundary> holes,
required int workType,
}) async {
final body = {
'reference': reference.toJson(),
'heading': heading,
'outer': outer.toJson(),
'holes': holes.map((hole) => hole.toJson()).toList(),
'holes': holes != null && holes.isNotEmpty
? holes.values.first
.toJson() // 取第一个值并序列化,去掉外层 Map
: {},
'workType': workType,
};