diff --git a/src/components/Modules/PaperTapeWidthAngleCalculate.vue b/src/components/Modules/PaperTapeWidthAngleCalculate.vue
index 1abb27b..070425a 100644
--- a/src/components/Modules/PaperTapeWidthAngleCalculate.vue
+++ b/src/components/Modules/PaperTapeWidthAngleCalculate.vue
@@ -1,11 +1,122 @@
-
-
+
+
+
+
+
+
+
+ {{ $t('parameters') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('reset') }}
+
+
+
+
+
+
+
+
+
+
+ {{ $t('results') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ const paperCoreDiameter = ref(createParam(76.2, 'mm'))
+ const paperRollWallThickness = ref(createParam(10, 'mm'))
+ const innerPaperWidth = ref(createParam(105, 'mm'))
+
+ const result = computed(() => {
+ const paperRollExternalDiameter = paperCoreDiameter.value.value + 2 * paperRollWallThickness.value.value
+ const paperHolderAngle = 90 - radiansToDegrees(Math.acos(innerPaperWidth.value.value / (paperCoreDiameter.value.value * Math.PI)))
+ const leadingLength = innerPaperWidth.value.value / Math.sin(degreesToRadians(90 - paperHolderAngle))
+ const beltAngle = 90 - radiansToDegrees(Math.atan(paperRollExternalDiameter * Math.PI / leadingLength))
+ const paperWidth = leadingLength * Math.sin(Math.atan(paperRollExternalDiameter * Math.PI / leadingLength))
+
+ return {
+ beltAngle: createParam(beltAngle, '°'),
+ paperHolderAngle: createParam(paperHolderAngle, '°'),
+ leadingLength: createParam(leadingLength, 'mm'),
+ paperWidth: createParam(paperWidth, 'mm'),
+ }
+ })
+
+ const resetParameters = () => {
+ paperCoreDiameter.value = createParam(76.2, 'mm')
+ paperRollWallThickness.value = createParam(10, 'mm')
+ innerPaperWidth.value = createParam(105, 'mm')
+ }
+
+
diff --git a/src/locale/en.json b/src/locale/en.json
index 853f036..bc48997 100644
--- a/src/locale/en.json
+++ b/src/locale/en.json
@@ -31,5 +31,9 @@
"productionAmountPerDay": "Daily output",
"productionAmountPerHour": "Hourly output",
"productionWeightPerDay": "Daily output",
- "productionWeightPerHour": "Hourly output"
+ "productionWeightPerHour": "Hourly output",
+ "beltAngle": "Belt angle",
+ "paperHolderAngle": "Paper holder angle",
+ "leadingLength": "Leading length",
+ "paperWidth": "Paper width"
}
diff --git a/src/locale/zh.json b/src/locale/zh.json
index feab888..b50abdc 100644
--- a/src/locale/zh.json
+++ b/src/locale/zh.json
@@ -31,5 +31,9 @@
"productionAmountPerHour": "每小时产量",
"productionWeightPerHour": "每小时产量",
"productionAmountPerDay": "每天产量",
- "productionWeightPerDay": "每天产量"
+ "productionWeightPerDay": "每天产量",
+ "beltAngle": "皮带角度",
+ "paperHolderAngle": "纸架角度",
+ "leadingLength": "导程",
+ "paperWidth": "面纸宽度"
}
diff --git a/src/utils/angle.ts b/src/utils/angle.ts
new file mode 100644
index 0000000..8e996f0
--- /dev/null
+++ b/src/utils/angle.ts
@@ -0,0 +1,8 @@
+// 角度转弧度
+export function degreesToRadians (degrees: number): number {
+ return degrees * (Math.PI / 180)
+}
+// 弧度转角度
+export function radiansToDegrees (radians: number): number {
+ return radians * (180 / Math.PI)
+}