Home > IPCB_PrimitivePoured > getState_PourFills
IPCB_PrimitivePoured.getState_PourFills() method
获取属性状态:覆铜填充区域
签名
typescript
function getState_PourFills(): Array<IPCB_PrimitivePouredPourFill>;1
返回值
Array<IPCB_PrimitivePouredPourFill>
覆铜填充区域
示例
javascript
// 1. 获取画布上已有的覆铜填充图元
const pouredList = await eda.pcb_PrimitivePoured.getAll();
if (!pouredList || pouredList.length === 0) {
console.log('说明:PCB 上没有覆铜填充,请先手动绘制覆铜并重建(设计 → 覆铜)');
return;
}
const poured = pouredList[0];
// 2. 读取全部填充子区域
const pourFills = poured.getState_PourFills();
console.log('pourFillCount:', pourFills.length);
// 3. 输出第一个子区域的关键属性(path 是复杂多边形对象,只输出有无)
if (pourFills.length > 0) {
const first = pourFills[0];
console.log('第一个子区域 fill:', first.fill, 'lineWidth:', first.lineWidth);
console.log('第一个子区域 path:', first.path ? '已包含' : '未包含');
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18