ice-entity-designer 0.0.36 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/index.umd.js +2 -2
- package/dist/types/index.d.mts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/power/PowerDesigner.d.mts +0 -13
- package/dist/types/power/PowerDesigner.d.ts +0 -13
- package/dist/types/secondary/SecondaryDesigner.d.mts +64 -0
- package/dist/types/secondary/SecondaryDesigner.d.ts +64 -0
- package/dist/types/secondary/secondary_shapes.d.mts +73 -0
- package/dist/types/secondary/secondary_shapes.d.ts +73 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -126,7 +126,8 @@ npm run build
|
|
|
126
126
|
| `examples/uml-editor.html` | UML 类图编辑器:三段式类框、六种关系、语义校验、矢量导出、PlantUML / Mermaid 文本互操作 |
|
|
127
127
|
| `examples/statechart-editor.html` | 状态机编辑器:伪状态 / 普通状态 / 复合状态容器、转移标签 `事件 [守卫] / 动作` |
|
|
128
128
|
| `examples/gantt-editor.html` | 甘特编辑器:时间轴与按天吸附、依赖线、自动排程、关键路径、资源冲突校验、矢量导出 |
|
|
129
|
-
| `examples/power-editor.html` | 电力一次系统图(单线图)编辑器:110kV
|
|
129
|
+
| `examples/power-editor.html` | 电力一次系统图(单线图)编辑器:110kV 变电站案例(**110kV 双母线 + 10kV 单母线分段**两级电压,两回进线 / 两台主变 / 母联 / 母线 PT / 4 条 10kV 出线 / 电容器组 / 站用变,共 69 台设备),开关分合、带电分析与色标、五防相关校验 |
|
|
130
|
+
| `examples/secondary-editor.html` | 电力**二次回路**(简化版):110kV 线路保护电流回路 —— CT 三个二次绕组 → 三相电流回路(A411/B411/C411 + N411)→ 端子排(201~204)→ 线路保护装置,N 侧接地;二次校验(回路编号 / 三相成组 / 端子号唯一 / 必须接地) |
|
|
130
131
|
| `examples/power-symbols.html` | 电力符号表:23 种一次设备符号(记法对齐 JB/T 5872-1991 与 GB/T 4728.1/3/4/6),可缩放平移、导出 SVG |
|
|
131
132
|
| [`ice-entity-designer-react-demo`](../ice-entity-designer-react-demo) | 独立的 React 集成示例工程(webpack + TypeScript),涵盖 ref / hook / onChange / 受控模式 |
|
|
132
133
|
|
|
@@ -459,6 +460,36 @@ const svg = power.toSvg({ background: '#ffffff' });
|
|
|
459
460
|
可运行示例:`examples/power-editor.html`(110kV 变电站:双母线 + 母联 + 两回进线 + 两台主变);
|
|
460
461
|
符号表页:`examples/power-symbols.html`。
|
|
461
462
|
|
|
463
|
+
#### 5.10 电力二次回路(简化版)
|
|
464
|
+
|
|
465
|
+
一次图是**单线图**,二次图是**回路图**:一条线 = 一个具体回路,线上标**回路编号**(A411/B411/C411/N411)、
|
|
466
|
+
端子带**端子号**(201…)、电缆带**电缆编号**(1D1…)。记法与范围见 `docs/power-secondary-spec.md`
|
|
467
|
+
(图种清单、IEEE C37.2 功能编号对照、来源)。
|
|
468
|
+
|
|
469
|
+
```js
|
|
470
|
+
import { ICE, SecondaryDesigner } from 'ice-entity-designer';
|
|
471
|
+
|
|
472
|
+
const ice = new ICE().init('canvas-1');
|
|
473
|
+
const secondary = new SecondaryDesigner(ice);
|
|
474
|
+
|
|
475
|
+
const winding = secondary.createSymbol('ctWinding', { name: '1LHa' });
|
|
476
|
+
const { strip, terminals } = secondary.createTerminalStrip({ title: '1D 端子排', terminals: [{ no: '201' }, { no: '202' }] });
|
|
477
|
+
const device = secondary.createSymbol('relayDevice', { name: '线路保护', tag: 'RCS-941A' });
|
|
478
|
+
secondary.createWire({ sourceId: winding.state.id, targetId: terminals[0].state.id, circuitNo: 'A411', cableNo: '1D1' });
|
|
479
|
+
secondary.createWire({ sourceId: terminals[0].state.id, targetId: device.state.id, circuitNo: 'A411' });
|
|
480
|
+
secondary.validateSecondary(); // 回路编号 / 三相成组 / 端子号唯一 / 必须接地
|
|
481
|
+
const svg = secondary.toSvg({ background: '#ffffff' });
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
| 能力 | 说明 |
|
|
485
|
+
|---|---|
|
|
486
|
+
| 元件库 | 常开/常闭接点、按钮、切换开关、压板、信号灯、保护装置方框、互感器二次绕组、端子、接地(记法按 GB/T 4728.7,文字符号用 C37.2 功能编号) |
|
|
487
|
+
| 端子排 | 容器:端子是真实子节点 —— 拖动端子排端子跟着走,端子各自可接线,**快照往返不丢端子** |
|
|
488
|
+
| 回路编号 | `createWire({ circuitNo })`:线就是回路,编号画在线上;电缆编号是数据字段 |
|
|
489
|
+
| 二次校验 | 导线必须有回路编号、三相电流回路编号成组(缺相报错)、端子号唯一、二次回路必须接地 |
|
|
490
|
+
|
|
491
|
+
可运行示例:`examples/secondary-editor.html`(110kV 线路保护电流回路,简化版)。
|
|
492
|
+
|
|
462
493
|
## 6. 在 React 中使用
|
|
463
494
|
|
|
464
495
|
包内置 React 绑定(子路径导出 `ice-entity-designer/react`),不需要自己写 ref / effect 胶水代码。
|