diff --git a/docs/web-cad-implementation-plan.zh-CN.md b/docs/web-cad-implementation-plan.zh-CN.md index 9002dab..0f5626f 100644 --- a/docs/web-cad-implementation-plan.zh-CN.md +++ b/docs/web-cad-implementation-plan.zh-CN.md @@ -1692,6 +1692,7 @@ DocumentSnapshot 现在区分模型树投影与 `DocumentObjectSnapshot` 真值 | Data 编辑 | `PASS` | 浏览器将 Pad Length 从 42 改为 50,树版本 v18→v19、对象 Status→Touched、tree state→dirty | | View/Data 分离 | `PASS` | Visibility 等 View 属性提交文档事务但不把几何对象标记 Touched | | 类型控件 | `PASS` | View 标签由 metadata 生成 1 个 checkbox、2 个 enumeration、2 个 numeric、2 个 color 控件 | +| Part primitive Task | `PASS` | Part 工作台任务可选择 Box/Cylinder/Sphere/Cone,尺寸和角度草稿写入 `Part::*` 对象属性并进入 OCCT 重算 | | 校验 | `PASS` | 负 Length、越界 Percent、未知 Enumeration、无效颜色、缺失 Link、只读 Property 在 Facade 拒绝 | | Undo/Redo | `PASS` | Length 42→50 可撤销回 42、重做至 50,Property 和树投影同步 | | SQLite/OPFS | `PASS` | Chrome `sqlite-opfs` 保存 v19 后重新加载 Length=61、Status=Touched、tree state=dirty | diff --git a/src/App.tsx b/src/App.tsx index d03602c..886038e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -351,7 +351,7 @@ function TaskPanel({ workbench, facade, showNotice }: { workbench: Workbench; fa const primitiveUnits: Record = { width: 'mm', length: 'mm', height: 'mm', radius: 'mm', radius1: 'mm', radius2: 'mm', angle: 'deg' } const primitiveFallbacks: Record = { width: 10, length: 10, height: 10, radius: 5, radius1: 5, radius2: 0, angle: 360 } const primitiveLabel = (field: string) => field === 'radius1' ? 'Bottom radius' : field === 'radius2' ? 'Top radius' : field[0].toUpperCase() + field.slice(1) - return
Active command

{isSketch ? 'Edit Sketch' : definition.taskTitle}

Preview
1
{isSketch ? 'Geometry and constraints' : definition.objectType}{definition.taskSummary}
{activeTask?.commandId === 'primitive' && <>{primitiveFields.map((field) => )}}
Changes remain local until the document is recomputed.
+ return
Active command

{isSketch ? 'Edit Sketch' : definition.taskTitle}

Preview
1
{isSketch ? 'Geometry and constraints' : definition.objectType}{definition.taskSummary}
{activeTask?.commandId === 'primitive' && <>{primitiveFields.map((field) => )}}{activeTask?.commandId !== 'primitive' && <>}
Changes remain local until the document is recomputed.
} function PropertyPanel({ facade, objectId, scope, showNotice }: { facade: BitBybitWebCadFacade; objectId: string; scope: 'data' | 'view'; showNotice: (message: string) => void }) {