Home > IPCB_PrimitivePad > getState_Rotation
IPCB_PrimitivePad.getState_Rotation() method
获取属性状态:旋转角度
签名
typescript
function getState_Rotation(): number;1
返回值
number
旋转角度
示例
javascript
// 1. 生成本次运行专用的坐标,创建一个旋转 90 度的长圆形焊盘
const x = 3000 + Math.floor(Math.random() * 100000);
const pad = await eda.pcb_PrimitivePad.create(1, '1', x, 3000, 90, ['OVAL', 80, 40], '', null, 0, 0, 0, false, 0);
// 2. 读取旋转角度
const rotation = pad.getState_Rotation();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.pcb_PrimitivePad.delete([pad.getState_PrimitiveId()]);
console.log('rotation:', rotation);1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11