Home > IPCB_PrimitivePour > getState_ComplexPolygon
IPCB_PrimitivePour.getState_ComplexPolygon() method
获取属性状态:复杂多边形
签名
typescript
function getState_ComplexPolygon(): IPCB_Polygon;1
返回值
复杂多边形
示例
javascript
// 1. 生成本次运行专用的坐标,避免与之前保留的测试图元重合
const x = 2000 + Math.floor(Math.random() * 100000);
const y = 2000 + Math.floor(Math.random() * 100000);
// 2. 创建一个矩形轮廓的覆铜边框
const polygon = eda.pcb_MathPolygon.createPolygon(['R', x, y, 500, 300, 0, 0]);
const pour = await eda.pcb_PrimitivePour.create('', 1, polygon, 'solid', false, '嘉立创示例_读轮廓', 5, 10, false);
// 3. 读取轮廓多边形并取源数组
const complexPolygon = pour.getState_ComplexPolygon();
const source = complexPolygon.getSource();
// 4. 清理测试图元(查询类需要清理)
await eda.pcb_PrimitivePour.delete([pour.getState_PrimitiveId()]);
console.log('source:', JSON.stringify(source));1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16