mirror of
https://github.com/klxf/eext-jiepei-helper.git
synced 2025-12-06 14:14:14 +08:00
Fix board size precision
This commit is contained in:
parent
1ae3b9ff77
commit
2735957340
@ -1,3 +1,7 @@
|
|||||||
|
# 1.1.1
|
||||||
|
|
||||||
|
修复板子大小精度问题,自动识别将保留两位小数
|
||||||
|
|
||||||
# 1.1.0
|
# 1.1.0
|
||||||
|
|
||||||
1. 支持自动识别板子层数
|
1. 支持自动识别板子层数
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"uuid": "817c3321fba54f70b0186500933ed47b",
|
"uuid": "817c3321fba54f70b0186500933ed47b",
|
||||||
"displayName": "捷配下单助手",
|
"displayName": "捷配下单助手",
|
||||||
"description": "一键前往捷配下单 PCB,支持保存下单偏好",
|
"description": "一键前往捷配下单 PCB,支持保存下单偏好",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"publisher": "Mr_Fang",
|
"publisher": "Mr_Fang",
|
||||||
"engines": {
|
"engines": {
|
||||||
"eda": "^2.3.0"
|
"eda": "^2.3.0"
|
||||||
|
|||||||
@ -251,6 +251,7 @@
|
|||||||
class="w-16 p-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm"
|
class="w-16 p-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm"
|
||||||
id="BoardWidth"
|
id="BoardWidth"
|
||||||
type="number"
|
type="number"
|
||||||
|
step="0.01"
|
||||||
value="10"
|
value="10"
|
||||||
/>
|
/>
|
||||||
<span class="text-gray-700">CM × 宽(y)</span>
|
<span class="text-gray-700">CM × 宽(y)</span>
|
||||||
@ -258,6 +259,7 @@
|
|||||||
class="w-16 p-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm"
|
class="w-16 p-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm"
|
||||||
id="BoardHeight"
|
id="BoardHeight"
|
||||||
type="number"
|
type="number"
|
||||||
|
step="0.01"
|
||||||
value="10"
|
value="10"
|
||||||
/>
|
/>
|
||||||
<span class="text-gray-700">CM,数量</span>
|
<span class="text-gray-700">CM,数量</span>
|
||||||
@ -1532,8 +1534,8 @@
|
|||||||
const BBox = await eda.pcb_Primitive.getPrimitivesBBox([selectedPrimitives[0].getState_PrimitiveId()]);
|
const BBox = await eda.pcb_Primitive.getPrimitivesBBox([selectedPrimitives[0].getState_PrimitiveId()]);
|
||||||
const boardHeight = eda.sys_Unit.milToMm(BBox.maxY - BBox.minY - 10) / 10;
|
const boardHeight = eda.sys_Unit.milToMm(BBox.maxY - BBox.minY - 10) / 10;
|
||||||
const boardWidth = eda.sys_Unit.milToMm(BBox.maxX - BBox.minX - 10) / 10;
|
const boardWidth = eda.sys_Unit.milToMm(BBox.maxX - BBox.minX - 10) / 10;
|
||||||
document.getElementById('BoardHeight').value = boardHeight;
|
document.getElementById('BoardHeight').value = boardHeight.toFixed(2);
|
||||||
document.getElementById('BoardWidth').value = boardWidth;
|
document.getElementById('BoardWidth').value = boardWidth.toFixed(2);
|
||||||
eda.sys_Message.showToastMessage('已自动识别板子大小', 'success');
|
eda.sys_Message.showToastMessage('已自动识别板子大小', 'success');
|
||||||
} else {
|
} else {
|
||||||
eda.sys_Message.showToastMessage('所选图元非板框', 'error');
|
eda.sys_Message.showToastMessage('所选图元非板框', 'error');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user