Home > IPCB_PrimitiveFill > getState_FillMode
IPCB_PrimitiveFill.getState_FillMode() method
获取属性状态:填充模式
签名
typescript
function getState_FillMode(): EPCB_PrimitiveFillMode | undefined;1
返回值
EPCB_PrimitiveFillMode | undefined
填充模式
示例
javascript
// 1. 创建一个实心填充的矩形
const x = 2000 + Math.floor(Math.random() * 100000);
const y = 2000 + Math.floor(Math.random() * 100000);
const polygon = eda.pcb_MathPolygon.createPolygon(['R', x, y, 500, 300, 0, 0]);
const fill = await eda.pcb_PrimitiveFill.create(1, polygon, '', 0, 10, false);
// 2. 读取填充模式(0=SOLID 实心,1=MESH 网格,2=INNER_ELECTRICAL_LAYER 内电层)
const fillMode = fill.getState_FillMode();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.pcb_PrimitiveFill.delete([fill.getState_PrimitiveId()]);
console.log('fillMode:', fillMode);1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13