架构图增强:橡皮、手动确认识别(平板推荐)、连线一律正交+角点拖拽、手绘/连线职责分离、尺寸标注一键操作;帮助文件大规模更新;修复品牌按钮与 pubspec 描述

This commit is contained in:
2026-10-11 11:22:01 +08:00
parent 1762ee4abf
commit c8147e294d
16 changed files with 767 additions and 614 deletions
+64 -27
View File
@@ -116,11 +116,31 @@ class ArchLeftBody extends StatelessWidget {
_sec(t, '手绘识别'),
const SizedBox(height: 8),
Text(
'松手自动把笔迹扶正为标准图形(矩形 / 圆 / 箭头 / 折线 / 曲线):'
'支持两笔组合(如两笔试画一个矩形)与圆柱(顶盖 + 柱体);'
'识别不了的笔迹会保留为墨迹。文字请双击图形 / 空白处直接输入。',
'笔迹一律扶正为标准图形(矩形 / 圆 / 箭头 / 折线 / 曲线):支持两笔组合、'
'圆柱拼接与图元库匹配(库里有什么就能画什么);识别不了的保留为墨迹,'
'可用「橡皮」擦除。文字请双击图形 / 空白处直接输入。',
style: TextStyle(color: t.dim, fontSize: 10, height: 1.5),
),
const SizedBox(height: 6),
Row(
children: <Widget>[
Expanded(
child: Text('松手自动识别',
style: TextStyle(color: t.sub, fontSize: 11)),
),
Switch(
value: c.archAutoRecognize,
onChanged: c.setArchAutoRecognize,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
],
),
if (!c.archAutoRecognize)
Text(
'已关闭:笔迹先保留为墨迹(${c.arch.strokes.length} 笔待识别),'
'点顶部「识别」按钮统一确认(平板手写推荐)。',
style: TextStyle(color: t.dim, fontSize: 10, height: 1.5),
),
const SizedBox(height: 14),
_sec(t, '绘图辅助(F8 / F10)'),
const SizedBox(height: 8),
@@ -273,8 +293,8 @@ class ArchLeftBody extends StatelessWidget {
const SizedBox(height: 14),
_sec(t, '连线'),
const SizedBox(height: 6),
Text('按住左键画出路径 → 松手自动识别为直线 / 折线(近轴段扶正);'
'端点自动吸附图元边框;选中后可拖动折点继续编辑。',
Text('画路径即出连线,一律横平竖直(正交);端点自动吸附图元边框,'
'选中后拖拽路径上的角点可调整走线位置。',
style: TextStyle(color: t.dim, fontSize: 10, height: 1.5)),
const SizedBox(height: 14),
_sec(t, '图形库'),
@@ -355,7 +375,7 @@ class ArchLeftBody extends StatelessWidget {
],
),
),
child: const Text('识别演示 ▶'),
child: const Text('识别墨迹 ▶'),
),
),
],
@@ -667,8 +687,40 @@ class ArchRightBody extends StatelessWidget {
],
),
const SizedBox(height: 10),
Text('尺寸(点数值修改 · 右键图标在画布上标注)',
style: TextStyle(color: t.dim, fontSize: 10)),
Row(
children: <Widget>[
Text('尺寸 · mm(点数值直接修改)',
style: TextStyle(color: t.dim, fontSize: 10)),
const Spacer(),
InkWell(
onTap: () {
final List<ArchDimKind> kinds = archShapeDimKinds(s);
final bool all = kinds.every(s.dims.contains);
for (final ArchDimKind k in kinds) {
if (all == s.dims.contains(k)) {
c.toggleArchShapeDim(s.id, k);
}
}
},
borderRadius: BorderRadius.circular(6),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 5, vertical: 2),
child: Text(
archShapeDimKinds(s)
.every(s.dims.contains)
? '清除标注'
: '标注全部',
style: TextStyle(
color: t.accent,
fontSize: 10,
fontWeight: FontWeight.w600,
),
),
),
),
],
),
const SizedBox(height: 4),
for (final ArchDimKind k in archShapeDimKinds(s))
Padding(
@@ -734,25 +786,10 @@ class ArchRightBody extends StatelessWidget {
cn.label.isEmpty ? '(无标签)' : '标签:${cn.label}',
style: TextStyle(color: t.sub, fontSize: 11),
),
const SizedBox(height: 8),
Row(
children: <Widget>[
_mini(
t,
'直线',
() => c.updateArchConnector(
cn.copyWith(route: ArchRoute.straight), status: '走线:直线'),
active: cn.route == ArchRoute.straight,
),
const SizedBox(width: 6),
_mini(
t,
'正交折线',
() => c.updateArchConnector(
cn.copyWith(route: ArchRoute.ortho), status: '走线:正交折线'),
active: cn.route == ArchRoute.ortho,
),
],
const SizedBox(height: 4),
Text(
'走线:一律正交(横平竖直);拖拽路径上的角点可调整走线位置。',
style: TextStyle(color: t.dim, fontSize: 10.5, height: 1.5),
),
const SizedBox(height: 6),
Row(