@jjlmoya/utils-diy 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/package.json +60 -0
  2. package/src/category/i18n/en.ts +110 -0
  3. package/src/category/i18n/es.ts +110 -0
  4. package/src/category/i18n/fr.ts +101 -0
  5. package/src/category/index.ts +25 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +143 -0
  9. package/src/data.ts +11 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +57 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +146 -0
  14. package/src/pages/[locale].astro +251 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/tests/faq_count.test.ts +19 -0
  17. package/src/tests/locale_completeness.test.ts +42 -0
  18. package/src/tests/mocks/astro_mock.js +2 -0
  19. package/src/tests/no_h1_in_components.test.ts +48 -0
  20. package/src/tests/schemas_fulfillment.test.ts +23 -0
  21. package/src/tests/seo_length.test.ts +22 -0
  22. package/src/tests/title_quality.test.ts +55 -0
  23. package/src/tests/tool_validation.test.ts +17 -0
  24. package/src/tool/balusterCalculator/bibliography.astro +14 -0
  25. package/src/tool/balusterCalculator/component.astro +605 -0
  26. package/src/tool/balusterCalculator/i18n/en.ts +264 -0
  27. package/src/tool/balusterCalculator/i18n/es.ts +264 -0
  28. package/src/tool/balusterCalculator/i18n/fr.ts +264 -0
  29. package/src/tool/balusterCalculator/index.ts +33 -0
  30. package/src/tool/balusterCalculator/seo.astro +15 -0
  31. package/src/tool/balusterCalculator/ui.ts +15 -0
  32. package/src/tool/clayCalculator/bibliography.astro +14 -0
  33. package/src/tool/clayCalculator/component.astro +731 -0
  34. package/src/tool/clayCalculator/i18n/en.ts +183 -0
  35. package/src/tool/clayCalculator/i18n/es.ts +183 -0
  36. package/src/tool/clayCalculator/i18n/fr.ts +183 -0
  37. package/src/tool/clayCalculator/index.ts +33 -0
  38. package/src/tool/clayCalculator/seo.astro +15 -0
  39. package/src/tool/clayCalculator/ui.ts +19 -0
  40. package/src/tool/concreteCalculator/bibliography.astro +13 -0
  41. package/src/tool/concreteCalculator/component.astro +1089 -0
  42. package/src/tool/concreteCalculator/i18n/en.ts +201 -0
  43. package/src/tool/concreteCalculator/i18n/es.ts +201 -0
  44. package/src/tool/concreteCalculator/i18n/fr.ts +201 -0
  45. package/src/tool/concreteCalculator/index.ts +28 -0
  46. package/src/tool/concreteCalculator/seo.astro +14 -0
  47. package/src/tool/concreteCalculator/ui.ts +35 -0
  48. package/src/tool/cutOptimizer/bibliography.astro +13 -0
  49. package/src/tool/cutOptimizer/component.astro +825 -0
  50. package/src/tool/cutOptimizer/i18n/en.ts +178 -0
  51. package/src/tool/cutOptimizer/i18n/es.ts +178 -0
  52. package/src/tool/cutOptimizer/i18n/fr.ts +178 -0
  53. package/src/tool/cutOptimizer/index.ts +28 -0
  54. package/src/tool/cutOptimizer/optimizer.ts +199 -0
  55. package/src/tool/cutOptimizer/seo.astro +14 -0
  56. package/src/tool/cutOptimizer/ui.ts +25 -0
  57. package/src/tool/drillCalculator/bibliography.astro +13 -0
  58. package/src/tool/drillCalculator/component.astro +1210 -0
  59. package/src/tool/drillCalculator/engine.ts +63 -0
  60. package/src/tool/drillCalculator/i18n/en.ts +137 -0
  61. package/src/tool/drillCalculator/i18n/es.ts +137 -0
  62. package/src/tool/drillCalculator/i18n/fr.ts +137 -0
  63. package/src/tool/drillCalculator/index.ts +28 -0
  64. package/src/tool/drillCalculator/seo.astro +14 -0
  65. package/src/tool/drillCalculator/ui.ts +41 -0
  66. package/src/tool/drillSharpener/bibliography.astro +13 -0
  67. package/src/tool/drillSharpener/component.astro +712 -0
  68. package/src/tool/drillSharpener/engine.ts +42 -0
  69. package/src/tool/drillSharpener/i18n/en.ts +121 -0
  70. package/src/tool/drillSharpener/i18n/es.ts +121 -0
  71. package/src/tool/drillSharpener/i18n/fr.ts +121 -0
  72. package/src/tool/drillSharpener/index.ts +31 -0
  73. package/src/tool/drillSharpener/seo.astro +14 -0
  74. package/src/tool/drillSharpener/ui.ts +53 -0
  75. package/src/tool/epoxyCalculator/bibliography.astro +14 -0
  76. package/src/tool/epoxyCalculator/component.astro +888 -0
  77. package/src/tool/epoxyCalculator/i18n/en.ts +195 -0
  78. package/src/tool/epoxyCalculator/i18n/es.ts +195 -0
  79. package/src/tool/epoxyCalculator/i18n/fr.ts +195 -0
  80. package/src/tool/epoxyCalculator/index.ts +33 -0
  81. package/src/tool/epoxyCalculator/seo.astro +15 -0
  82. package/src/tool/epoxyCalculator/ui.ts +22 -0
  83. package/src/tool/furnitureFit/bibliography.astro +13 -0
  84. package/src/tool/furnitureFit/component.astro +552 -0
  85. package/src/tool/furnitureFit/engine.ts +51 -0
  86. package/src/tool/furnitureFit/i18n/en.ts +152 -0
  87. package/src/tool/furnitureFit/i18n/es.ts +152 -0
  88. package/src/tool/furnitureFit/i18n/fr.ts +152 -0
  89. package/src/tool/furnitureFit/index.ts +28 -0
  90. package/src/tool/furnitureFit/seo.astro +14 -0
  91. package/src/tool/furnitureFit/ui.ts +21 -0
  92. package/src/tool/mortarCalculator/bibliography.astro +13 -0
  93. package/src/tool/mortarCalculator/component.astro +1139 -0
  94. package/src/tool/mortarCalculator/i18n/en.ts +219 -0
  95. package/src/tool/mortarCalculator/i18n/es.ts +205 -0
  96. package/src/tool/mortarCalculator/i18n/fr.ts +220 -0
  97. package/src/tool/mortarCalculator/index.ts +24 -0
  98. package/src/tool/mortarCalculator/seo.astro +14 -0
  99. package/src/tool/mortarCalculator/ui.ts +37 -0
  100. package/src/tool/passepartoutCalculator/bibliography.astro +13 -0
  101. package/src/tool/passepartoutCalculator/component.astro +741 -0
  102. package/src/tool/passepartoutCalculator/i18n/en.ts +178 -0
  103. package/src/tool/passepartoutCalculator/i18n/es.ts +178 -0
  104. package/src/tool/passepartoutCalculator/i18n/fr.ts +178 -0
  105. package/src/tool/passepartoutCalculator/index.ts +28 -0
  106. package/src/tool/passepartoutCalculator/seo.astro +14 -0
  107. package/src/tool/passepartoutCalculator/ui.ts +17 -0
  108. package/src/tool/stairCalculator/bibliography.astro +52 -0
  109. package/src/tool/stairCalculator/component.astro +766 -0
  110. package/src/tool/stairCalculator/engine.ts +128 -0
  111. package/src/tool/stairCalculator/i18n/en.ts +149 -0
  112. package/src/tool/stairCalculator/i18n/es.ts +149 -0
  113. package/src/tool/stairCalculator/i18n/fr.ts +149 -0
  114. package/src/tool/stairCalculator/index.ts +31 -0
  115. package/src/tool/stairCalculator/seo.astro +211 -0
  116. package/src/tool/stairCalculator/ui.ts +109 -0
  117. package/src/tool/thermalExpansionCalculator/bibliography.astro +13 -0
  118. package/src/tool/thermalExpansionCalculator/component.astro +771 -0
  119. package/src/tool/thermalExpansionCalculator/engine.ts +23 -0
  120. package/src/tool/thermalExpansionCalculator/i18n/en.ts +174 -0
  121. package/src/tool/thermalExpansionCalculator/i18n/es.ts +174 -0
  122. package/src/tool/thermalExpansionCalculator/i18n/fr.ts +174 -0
  123. package/src/tool/thermalExpansionCalculator/index.ts +28 -0
  124. package/src/tool/thermalExpansionCalculator/seo.astro +14 -0
  125. package/src/tool/thermalExpansionCalculator/ui.ts +41 -0
  126. package/src/tool/voltageDropCalculator/bibliography.astro +13 -0
  127. package/src/tool/voltageDropCalculator/component.astro +1022 -0
  128. package/src/tool/voltageDropCalculator/i18n/en.ts +155 -0
  129. package/src/tool/voltageDropCalculator/i18n/es.ts +155 -0
  130. package/src/tool/voltageDropCalculator/i18n/fr.ts +148 -0
  131. package/src/tool/voltageDropCalculator/index.ts +28 -0
  132. package/src/tool/voltageDropCalculator/seo.astro +14 -0
  133. package/src/tool/voltageDropCalculator/ui.ts +22 -0
  134. package/src/tools.ts +16 -0
  135. package/src/types.ts +72 -0
@@ -0,0 +1,63 @@
1
+ export interface DrillMaterial {
2
+ id: string;
3
+ vcHss: number;
4
+ vcCarbide: number;
5
+ fz: number;
6
+ }
7
+
8
+ export interface DrillResult {
9
+ idealRpm: number;
10
+ displayRpm: number;
11
+ feed: number;
12
+ warning: string;
13
+ }
14
+
15
+ export interface DrillContext {
16
+ lips: number;
17
+ fz: number;
18
+ maxRpm: number;
19
+ isLimited: boolean;
20
+ }
21
+
22
+ export const MATERIALS: DrillMaterial[] = [
23
+ { id: 'steel', vcHss: 25, vcCarbide: 100, fz: 0.1 },
24
+ { id: 'inox', vcHss: 12, vcCarbide: 55, fz: 0.05 },
25
+ { id: 'alu', vcHss: 120, vcCarbide: 400, fz: 0.15 },
26
+ { id: 'brass', vcHss: 70, vcCarbide: 220, fz: 0.1 },
27
+ { id: 'castiron', vcHss: 18, vcCarbide: 80, fz: 0.2 },
28
+ { id: 'wood', vcHss: 200, vcCarbide: 500, fz: 0.3 },
29
+ { id: 'plastic', vcHss: 50, vcCarbide: 150, fz: 0.15 },
30
+ ];
31
+
32
+ function dcWarningLevel(idealRpm: number): string {
33
+ if (idealRpm > 15000) return 'outofrange';
34
+ return '';
35
+ }
36
+
37
+ export function calculateDrill(diameter: number, toolType: 'hss' | 'carbide', material: DrillMaterial, ctx: DrillContext): DrillResult {
38
+ const vc = toolType === 'hss' ? material.vcHss : material.vcCarbide;
39
+ const idealRpm = Math.round((vc * 1000) / (Math.PI * diameter));
40
+ let displayRpm = idealRpm;
41
+ let warning = '';
42
+
43
+ if (ctx.isLimited && idealRpm > ctx.maxRpm) {
44
+ displayRpm = ctx.maxRpm;
45
+ warning = 'limited';
46
+ } else {
47
+ warning = dcWarningLevel(idealRpm);
48
+ }
49
+
50
+ const actualFz = ctx.fz || material.fz;
51
+ const feed = Math.round(displayRpm * actualFz * ctx.lips);
52
+
53
+ return { idealRpm, displayRpm, feed, warning };
54
+ }
55
+
56
+ export function findClosestSpeed(ideal: number, available: number[]): number {
57
+ if (available.length === 0) return ideal;
58
+ return available.reduce((prev, curr) => Math.abs(curr - ideal) < Math.abs(prev - ideal) ? curr : prev);
59
+ }
60
+
61
+ export function getSpeedDifference(closest: number, ideal: number): number {
62
+ return Math.abs(closest - ideal) / ideal * 100;
63
+ }
@@ -0,0 +1,137 @@
1
+ import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { DrillCalculatorUI } from '../ui';
4
+
5
+ const slug = 'drill-rpm-calculator';
6
+ const title = 'Drill and Machining RPM Calculator';
7
+ const description = 'Calculate the ideal revolutions per minute for your drill or milling machine based on material and bit diameter. Prevent tool burnout and achieve better results.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: 'Why do drill bits burn out?',
12
+ answer: 'Primarily due to excessive RPM. When the bit rotates faster than the material can dissipate heat, friction raises the temperature above the steel hardness limit, causing the cutting edge to soften and lose effectiveness.',
13
+ },
14
+ {
15
+ question: 'What is cutting speed (Vc)?',
16
+ answer: 'Cutting speed is the linear velocity in metres per minute at which the tool edge travels across the material surface. Each material has a recommended Vc that is independent of the drill diameter.',
17
+ },
18
+ {
19
+ question: 'When should I use carbide (Widia) tools?',
20
+ answer: 'Use carbide when you need much higher speeds, in industrial production, or when machining extremely hard materials. For hobby work, HSS is sufficient and more resistant to flexural breakage.',
21
+ },
22
+ {
23
+ question: 'Is lubrication always necessary?',
24
+ answer: 'In metals, it is almost always recommended. In aluminium it prevents material adhesion to the bit. In steels it reduces heat. For wood and plastics, dry drilling with frequent retraction is better.',
25
+ },
26
+ {
27
+ question: 'How do I calculate feed rate without a CNC machine?',
28
+ answer: 'On a manual drill, feed is controlled by hand pressure. You should see a steady, clean chip. If you see dust, you are either pressing too lightly or RPM is too high. If chips are very thick and the machine struggles, you are pressing too hard.',
29
+ },
30
+ ];
31
+
32
+ const howToData = [
33
+ { name: 'Select the material', text: 'Choose what material you will be drilling or milling (steel, aluminium, wood, etc.). Each has different hardness and thermal properties.' },
34
+ { name: 'Enter the diameter', text: 'Input the exact diameter of your drill or end mill in millimetres. Remember that larger diameters require lower rotation speeds.' },
35
+ { name: 'Choose tool type', text: 'Determine whether your bit is high speed steel (HSS) or carbide (Widia). Carbide tools support much higher speeds.' },
36
+ { name: 'Set RPM on your machine', text: 'Configure your drill or milling machine with the calculated value. If your machine has fixed speed positions, use our closest speed finder to select the safest pulley position.' },
37
+ ];
38
+
39
+ const faqSchema: WithContext<FAQPage> = {
40
+ '@context': 'https://schema.org',
41
+ '@type': 'FAQPage',
42
+ mainEntity: faqData.map((item) => ({
43
+ '@type': 'Question',
44
+ name: item.question,
45
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
46
+ })),
47
+ };
48
+
49
+ const howToSchema: WithContext<HowToThing> = {
50
+ '@context': 'https://schema.org',
51
+ '@type': 'HowTo',
52
+ name: title,
53
+ description,
54
+ step: howToData.map((step, i) => ({
55
+ '@type': 'HowToStep',
56
+ position: i + 1,
57
+ name: step.name,
58
+ text: step.text,
59
+ })),
60
+ };
61
+
62
+ const appSchema: WithContext<SoftwareApplication> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'SoftwareApplication',
65
+ name: title,
66
+ description,
67
+ applicationCategory: 'UtilityApplication',
68
+ operatingSystem: 'All',
69
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
70
+ inLanguage: 'en',
71
+ };
72
+
73
+ export const content: ToolLocaleContent<DrillCalculatorUI> = {
74
+ slug,
75
+ title,
76
+ description,
77
+ faqTitle: 'Frequently Asked Questions',
78
+ faq: faqData,
79
+ bibliographyTitle: 'Technical References',
80
+ bibliography: [
81
+ { name: 'Sandvik Coromant: Cutting Speed and Feed Rate Formulae', url: 'https://www.sandvik.coromant.com/en-gb/knowledge/machining-formulas-definitions/general-turning-formulas-definitions' },
82
+ { name: 'Machine Calculations and Workshop Tables — Machinery Handbook', url: 'https://www.google.com/search?q=machinery+handbook+cutting+speeds' },
83
+ ],
84
+ howTo: howToData,
85
+ schemas: [faqSchema, howToSchema, appSchema],
86
+ seo: [
87
+ { type: 'title', text: 'The Importance of Correct RPM in Machining', level: 2 },
88
+ { type: 'paragraph', html: 'Calculating the correct revolutions per minute is the difference between a perfect result and costly failure. It is not about spinning a bit as fast as possible, but respecting the physics of friction and material resistance. Our calculator optimises tool performance and surface finish quality.' },
89
+ { type: 'title', text: 'Understanding Cutting Speed', level: 3 },
90
+ { type: 'card', icon: 'mdi:math-log', title: 'RPM Calculation Formula', html: '<p>Cutting speed is a value in metres per minute indicating the ideal speed at which the edge should traverse the material. The formula we use is: <code>RPM = (Vc × 1000) / (π × D)</code> where D is the diameter in millimetres. This calculation is independent of the workpiece diameter.' },
91
+ { type: 'title', text: 'HSS vs Carbide Tools', level: 3 },
92
+ { type: 'paragraph', html: '<strong>High Speed Steel (HSS)</strong> is economical and impact-resistant, but has limited heat resistance. <strong>Carbide</strong> allows cutting speeds 3 to 5 times higher, but is more brittle. The calculator automatically adjusts parameters based on tool type.' },
93
+ { type: 'title', text: '3 Common Drilling Mistakes', level: 3 },
94
+ { type: 'paragraph', html: '<strong>Too high RPM:</strong> Causes overheating and loss of steel hardness. <strong>Too low RPM:</strong> Causes vibration and fatigue fracture. <strong>No coolant:</strong> Dramatically reduces tool life due to excessive heat buildup.' },
95
+ ],
96
+ ui: {
97
+ labelMaterial: 'Work Material',
98
+ matSteel: 'Mild Steel',
99
+ matInox: 'Stainless Steel',
100
+ matAlu: 'Aluminium',
101
+ matBrass: 'Brass',
102
+ matCastIron: 'Cast Iron',
103
+ matWood: 'Wood',
104
+ matPlastic: 'Plastics',
105
+ coolSteel: 'Cutting Oil',
106
+ coolInox: 'EP Cutting Oil',
107
+ coolAlu: 'Solvent / Paraffin',
108
+ coolBrass: 'Dry / Air Blast',
109
+ coolCastIron: 'Dry',
110
+ coolWood: 'Suction Only',
111
+ coolPlastic: 'Air Jet',
112
+ labelTool: 'Tool Type',
113
+ typeHss: 'High Speed Steel',
114
+ typeWidia: 'Carbide (Widia)',
115
+ labelDiameter: 'Diameter',
116
+ unitMm: 'mm',
117
+ unitInch: 'inch',
118
+ modeColumnDrill: 'Column Drill Mode',
119
+ labelAdvanced: 'Feed Parameters',
120
+ labelLips: 'Number of Flutes (z)',
121
+ labelFz: 'Feed per Tooth (Fz)',
122
+ labelMachine: 'Your Machine Speeds',
123
+ presetStandard: 'Standard',
124
+ presetCnc: 'CNC',
125
+ addRpmManual: 'Add RPM manually...',
126
+ addButton: '+',
127
+ resultRpm: 'Optimal Speed',
128
+ resultCooling: 'Coolant Type',
129
+ resultFeed: 'Resulting Feed Rate',
130
+ resultClosest: 'Recommended Setting',
131
+ rpmUnit: 'Revolutions / Minute',
132
+ recommendedLabel: 'Recommended Setting',
133
+ recommendedHint: 'Set your machine selector to this position',
134
+ statusLimitActive: 'Machine limit active',
135
+ statusOutOfRange: 'Out of commercial standard range',
136
+ },
137
+ };
@@ -0,0 +1,137 @@
1
+ import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { DrillCalculatorUI } from '../ui';
4
+
5
+ const slug = 'calculadora-mecanizado-taladro';
6
+ const title = 'Calculadora RPM Mecanizado y Taladro';
7
+ const description = 'Calcula las revoluciones por minuto ideales para tu taladro o fresadora según el material y diámetro de la broca. Evita quemar tus herramientas.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: '¿Por qué se queman las brocas al taladrar?',
12
+ answer: 'Principalmente por un exceso de revoluciones (RPM). Cuando la broca gira más rápido de lo que el material permite disipar el calor, la fricción eleva la temperatura por encima del límite del temple del acero, haciendo que el filo se ablande y deje de cortar.',
13
+ },
14
+ {
15
+ question: '¿Qué es la velocidad de corte (Vc)?',
16
+ answer: 'Es la velocidad lineal en metros por minuto a la que el filo de la herramienta recorre la superficie del material. Cada material tiene una Vc recomendada que no depende del diámetro de la broca.',
17
+ },
18
+ {
19
+ question: '¿Cuándo debo usar una herramienta de Metal Duro (Widia)?',
20
+ answer: 'Debes usar metal duro cuando necesites trabajar a velocidades mucho más altas, en producciones industriales o cuando el material a taladrar sea extremadamente duro. Para el bricolaje común, el HSS es suficiente y más resistente a roturas por flexión.',
21
+ },
22
+ {
23
+ question: '¿Es necesario usar lubricante siempre?',
24
+ answer: 'En metales, casi siempre es recomendable. En aluminio evita que el material se pegue a la broca, y en aceros reduce el calor. En maderas y plásticos es mejor trabajar en seco con extracciones frecuentes de la broca.',
25
+ },
26
+ {
27
+ question: '¿Cómo calculo el avance si no tengo una fresadora CNC?',
28
+ answer: 'En un taladro manual, el avance se siente por la presión. Debes ver que sale una viruta constante y limpia. Si sale polvo, estás presionando poco o las RPM son excesivas. Si la viruta es muy gruesa y el taladro sufre, estás presionando demasiado.',
29
+ },
30
+ ];
31
+
32
+ const howToData = [
33
+ { name: 'Selecciona el material', text: 'Indica qué material vas a taladrar o fresar (acero, aluminio, madera, etc.). Cada uno tiene una dureza y capacidad térmica distinta.' },
34
+ { name: 'Introduce el diámetro', text: 'Escribe el diámetro exacto de tu broca o fresa en milímetros. Recuerda que a mayor diámetro, menor debe ser la velocidad de giro.' },
35
+ { name: 'Elige el tipo de herramienta', text: 'Determina si tu broca es de acero rápido (HSS) o de metal duro (Carburo/Widia). Las de metal duro soportan mucha más velocidad.' },
36
+ { name: 'Ajusta las RPM en tu máquina', text: 'Configura tu taladro o fresadora con el valor calculado. Si tu máquina tiene posiciones fijas, usa nuestra herramienta de velocidad cercana para elegir la posición de polea más segura.' },
37
+ ];
38
+
39
+ const faqSchema: WithContext<FAQPage> = {
40
+ '@context': 'https://schema.org',
41
+ '@type': 'FAQPage',
42
+ mainEntity: faqData.map((item) => ({
43
+ '@type': 'Question',
44
+ name: item.question,
45
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
46
+ })),
47
+ };
48
+
49
+ const howToSchema: WithContext<HowToThing> = {
50
+ '@context': 'https://schema.org',
51
+ '@type': 'HowTo',
52
+ name: title,
53
+ description,
54
+ step: howToData.map((step, i) => ({
55
+ '@type': 'HowToStep',
56
+ position: i + 1,
57
+ name: step.name,
58
+ text: step.text,
59
+ })),
60
+ };
61
+
62
+ const appSchema: WithContext<SoftwareApplication> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'SoftwareApplication',
65
+ name: title,
66
+ description,
67
+ applicationCategory: 'UtilityApplication',
68
+ operatingSystem: 'All',
69
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
70
+ inLanguage: 'es',
71
+ };
72
+
73
+ export const content: ToolLocaleContent<DrillCalculatorUI> = {
74
+ slug,
75
+ title,
76
+ description,
77
+ faqTitle: 'Preguntas Frecuentes',
78
+ faq: faqData,
79
+ bibliographyTitle: 'Referencias Técnicas',
80
+ bibliography: [
81
+ { name: 'Sandvik Coromant: Cutting Speed and Feed Rate Formulae', url: 'https://www.sandvik.coromant.com/en-gb/knowledge/machining-formulas-definitions/general-turning-formulas-definitions' },
82
+ { name: 'Máquinas. Cálculos de taller — A.L. Casillas', url: 'https://www.google.com/search?q=Casillas+Maquinas+Calculos+de+taller' },
83
+ ],
84
+ howTo: howToData,
85
+ schemas: [faqSchema, howToSchema, appSchema],
86
+ seo: [
87
+ { type: 'title', text: 'La importancia de las Revoluciones por Minuto en el mecanizado', level: 2 },
88
+ { type: 'paragraph', html: 'El cálculo correcto de las revoluciones por minuto es la diferencia entre un trabajo perfecto y un desastre costoso. No se trata de hacer girar una broca lo más rápido posible, sino de respetar las leyes de la física aplicadas a la fricción y resistencia de materiales. Nuestra calculadora está diseñada para optimizar el rendimiento de tus herramientas y la calidad de tus acabados.' },
89
+ { type: 'title', text: 'Entendiendo la Velocidad de Corte', level: 3 },
90
+ { type: 'card', icon: 'mdi:math-log', title: 'Fórmula de Cálculo de RPM', html: '<p>La velocidad de corte es un valor en metros por minuto que indica la velocidad ideal a la que el filo debe pasar por el material. La fórmula que usamos es: <code>RPM = (Vc × 1000) / (π × D)</code> donde D es el diámetro en milímetros. Este cálculo es independiente del diámetro del material que cortamos.' },
91
+ { type: 'title', text: 'HSS vs Metal Duro', level: 3 },
92
+ { type: 'paragraph', html: 'Las herramientas de <strong>Acero Rápido (HSS)</strong> son económicas y resistentes a impactos, pero tienen resistencia térmica limitada. El <strong>Metal Duro (Carburo)</strong> permite velocidades de corte 3 a 5 veces superiores, pero son más frágiles. La calculadora ajusta automáticamente los parámetros según el tipo de herramienta.' },
93
+ { type: 'title', text: '3 Errores Comunes al Taladrar', level: 3 },
94
+ { type: 'paragraph', html: '<strong>RPM demasiadas altas:</strong> Causa recalentamiento y pérdida de temple del acero. <strong>RPM demasiadas bajas:</strong> La broca vibra y se puede romper por fatiga. <strong>Sin refrigeración:</strong> El calor reduce la vida útil de la herramienta significativamente.' },
95
+ ],
96
+ ui: {
97
+ labelMaterial: 'Material de la pieza',
98
+ matSteel: 'Acero Suave',
99
+ matInox: 'Inoxidable',
100
+ matAlu: 'Aluminio',
101
+ matBrass: 'Latón',
102
+ matCastIron: 'Fundición',
103
+ matWood: 'Maderas',
104
+ matPlastic: 'Plásticos',
105
+ coolSteel: 'Taladrina o Aceite',
106
+ coolInox: 'Aceite de Corte EP',
107
+ coolAlu: 'Alcohol / Parafina',
108
+ coolBrass: 'En seco / Aire',
109
+ coolCastIron: 'En seco',
110
+ coolWood: 'Solo Aspiración',
111
+ coolPlastic: 'Chorro de Aire',
112
+ labelTool: 'Tipo de Herramienta',
113
+ typeHss: 'Aceros (HSS)',
114
+ typeWidia: 'Metal Duro (Widia)',
115
+ labelDiameter: 'Diámetro',
116
+ unitMm: 'mm',
117
+ unitInch: 'pulg',
118
+ modeColumnDrill: 'Modo Taladro Columna',
119
+ labelAdvanced: 'Parámetros de Avance',
120
+ labelLips: 'Nº de Filos (z)',
121
+ labelFz: 'Avance/diente (Fz)',
122
+ labelMachine: 'Velocidades de tu Máquina',
123
+ presetStandard: 'Estándar',
124
+ presetCnc: 'CNC',
125
+ addRpmManual: 'Añadir RPM manual...',
126
+ addButton: '+',
127
+ resultRpm: 'Velocidad Óptima',
128
+ resultCooling: 'Refrigeración',
129
+ resultFeed: 'Avance Resultante',
130
+ resultClosest: 'Ajuste recomendado',
131
+ rpmUnit: 'Revoluciones / Minuto',
132
+ recommendedLabel: 'Ajuste recomendado',
133
+ recommendedHint: 'Configura el selector de tu máquina a esta posición',
134
+ statusLimitActive: 'Límite de máquina activo',
135
+ statusOutOfRange: 'Rango fuera de estándar comercial',
136
+ },
137
+ };
@@ -0,0 +1,137 @@
1
+ import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { DrillCalculatorUI } from '../ui';
4
+
5
+ const slug = 'calculateur-tours-taraudage';
6
+ const title = 'Calculateur RPM Perçage et Fraisage';
7
+ const description = 'Calculez le nombre idéal de tours par minute pour votre perceuse ou fraiseuse selon le matériau et le diamètre du foret. Évitez de surchauffer vos outils.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: 'Pourquoi mes forets surchauffent-ils?',
12
+ answer: 'Principalement à cause d\'un excès de tours/minute. Quand le foret tourne plus vite que le matériau ne peut dissiper la chaleur, la friction élève la température au-delà du point de trempe de l\'acier, ce qui ramollit le tranchant.',
13
+ },
14
+ {
15
+ question: 'Qu\'est-ce que la vitesse de coupe (Vc)?',
16
+ answer: 'C\'est la vitesse linéaire en mètres par minute à laquelle le tranchant de l\'outil parcourt la surface du matériau. Chaque matériau a une Vc recommandée qui ne dépend pas du diamètre du foret.',
17
+ },
18
+ {
19
+ question: 'Quand utiliser des outils en carbure (Widia)?',
20
+ answer: 'Utilisez le carbure quand vous avez besoin de vitesses beaucoup plus élevées, en production industrielle ou pour usiner des matériaux extrêmement durs. Pour le bricolage, l\'acier rapide est suffisant et plus résistant à la rupture en flexion.',
21
+ },
22
+ {
23
+ question: 'La lubrification est-elle toujours nécessaire?',
24
+ answer: 'Pour les métaux, c\'est presque toujours recommandé. L\'aluminium empêche le matériau de coller au foret. L\'acier réduit la chaleur. Pour le bois et les plastiques, le perçage à sec avec extraction fréquente est préférable.',
25
+ },
26
+ {
27
+ question: 'Comment calculer l\'avance sans machine CNC?',
28
+ answer: 'Sur une perceuse manuelle, l\'avance se contrôle par la pression manuelle. Vous devez voir une virure continue et nette. Si vous voyez de la poudre, vous appuyez trop faiblement ou le RPM est trop élevé.',
29
+ },
30
+ ];
31
+
32
+ const howToData = [
33
+ { name: 'Sélectionnez le matériau', text: 'Choisissez le matériau à percer ou fraiser (acier, aluminium, bois, etc.). Chacun a des propriétés thermiques différentes.' },
34
+ { name: 'Entrez le diamètre', text: 'Entrez le diamètre exact de votre foret ou fraise en millimètres. Rappelez-vous que les plus grands diamètres nécessitent moins de tours.' },
35
+ { name: 'Sélectionnez le type d\'outil', text: 'Déterminez si votre foret est en acier rapide (HSS) ou en carbure (Widia). Les outils en carbure supportent des vitesses beaucoup plus élevées.' },
36
+ { name: 'Réglez le RPM sur votre machine', text: 'Configurez votre perceuse avec la valeur calculée. Si votre machine a des positions fixes, utilisez notre outil de vitesse la plus proche pour sélectionner la position de poulie la plus sûre.' },
37
+ ];
38
+
39
+ const faqSchema: WithContext<FAQPage> = {
40
+ '@context': 'https://schema.org',
41
+ '@type': 'FAQPage',
42
+ mainEntity: faqData.map((item) => ({
43
+ '@type': 'Question',
44
+ name: item.question,
45
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
46
+ })),
47
+ };
48
+
49
+ const howToSchema: WithContext<HowToThing> = {
50
+ '@context': 'https://schema.org',
51
+ '@type': 'HowTo',
52
+ name: title,
53
+ description,
54
+ step: howToData.map((step, i) => ({
55
+ '@type': 'HowToStep',
56
+ position: i + 1,
57
+ name: step.name,
58
+ text: step.text,
59
+ })),
60
+ };
61
+
62
+ const appSchema: WithContext<SoftwareApplication> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'SoftwareApplication',
65
+ name: title,
66
+ description,
67
+ applicationCategory: 'UtilityApplication',
68
+ operatingSystem: 'All',
69
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
70
+ inLanguage: 'fr',
71
+ };
72
+
73
+ export const content: ToolLocaleContent<DrillCalculatorUI> = {
74
+ slug,
75
+ title,
76
+ description,
77
+ faqTitle: 'Questions Fréquentes',
78
+ faq: faqData,
79
+ bibliographyTitle: 'Références Techniques',
80
+ bibliography: [
81
+ { name: 'Sandvik Coromant: Formules de Vitesse de Coupe et d\'Avance', url: 'https://www.sandvik.coromant.com/en-gb/knowledge/machining-formulas-definitions/general-turning-formulas-definitions' },
82
+ { name: 'Calculs d\'usinage et Tables de l\'Atelier — Manuel du Technicien', url: 'https://www.google.com/search?q=calculs+usinage+vitesses+coupe' },
83
+ ],
84
+ howTo: howToData,
85
+ schemas: [faqSchema, howToSchema, appSchema],
86
+ seo: [
87
+ { type: 'title', text: 'L\'importance du RPM correct en usinage', level: 2 },
88
+ { type: 'paragraph', html: 'Calculer le bon nombre de tours par minute est la différence entre un résultat parfait et un échec coûteux. Il ne s\'agit pas de faire tourner un foret aussi vite que possible, mais de respecter la physique du frottement et de la résistance des matériaux. Notre calculateur optimise la performance des outils et la qualité de finition.' },
89
+ { type: 'title', text: 'Comprendre la Vitesse de Coupe', level: 3 },
90
+ { type: 'card', icon: 'mdi:math-log', title: 'Formule de Calcul du RPM', html: '<p>La vitesse de coupe est une valeur en mètres par minute indiquant la vitesse idéale à laquelle le tranchant doit parcourir le matériau. La formule que nous utilisons est: <code>RPM = (Vc × 1000) / (π × D)</code> où D est le diamètre en millimètres. Ce calcul est indépendant du diamètre de la pièce.' },
91
+ { type: 'title', text: 'Acier Rapide vs Carbure', level: 3 },
92
+ { type: 'paragraph', html: 'L\'<strong>acier rapide (HSS)</strong> est économique et résistant aux chocs, mais a une résistance thermique limitée. Le <strong>carbure</strong> permet des vitesses de coupe 3 à 5 fois supérieures, mais est plus fragile. La calculatrice ajuste automatiquement les paramètres selon le type d\'outil.' },
93
+ { type: 'title', text: '3 Erreurs Courantes en Perçage', level: 3 },
94
+ { type: 'paragraph', html: '<strong>RPM trop élevé:</strong> Cause une surchauffe et une perte de trempe. <strong>RPM trop faible:</strong> Cause des vibrations et une rupture par fatigue. <strong>Sans lubrifiant:</strong> Réduit drastiquement la durée de vie de l\'outil.' },
95
+ ],
96
+ ui: {
97
+ labelMaterial: 'Matériau de la pièce',
98
+ matSteel: 'Acier Doux',
99
+ matInox: 'Acier Inoxydable',
100
+ matAlu: 'Aluminium',
101
+ matBrass: 'Laiton',
102
+ matCastIron: 'Fonte',
103
+ matWood: 'Bois',
104
+ matPlastic: 'Plastiques',
105
+ coolSteel: 'Huile de Coupe',
106
+ coolInox: 'Huile de Coupe EP',
107
+ coolAlu: 'Solvant / Paraffine',
108
+ coolBrass: 'À sec / Air',
109
+ coolCastIron: 'À sec',
110
+ coolWood: 'Aspiration Seule',
111
+ coolPlastic: 'Jet d\'Air',
112
+ labelTool: 'Type d\'Outil',
113
+ typeHss: 'Acier Rapide (HSS)',
114
+ typeWidia: 'Carbure (Widia)',
115
+ labelDiameter: 'Diamètre',
116
+ unitMm: 'mm',
117
+ unitInch: 'pouce',
118
+ modeColumnDrill: 'Mode Perceuse à Colonne',
119
+ labelAdvanced: 'Paramètres d\'Avance',
120
+ labelLips: 'Nombre de Dents (z)',
121
+ labelFz: 'Avance par Dent (Fz)',
122
+ labelMachine: 'Vitesses de votre Machine',
123
+ presetStandard: 'Standard',
124
+ presetCnc: 'CNC',
125
+ addRpmManual: 'Ajouter RPM manuel...',
126
+ addButton: '+',
127
+ resultRpm: 'Vitesse Optimale',
128
+ resultCooling: 'Type de Lubrifiant',
129
+ resultFeed: 'Avance Résultante',
130
+ resultClosest: 'Réglage Recommandé',
131
+ rpmUnit: 'Tours / Minute',
132
+ recommendedLabel: 'Réglage Recommandé',
133
+ recommendedHint: 'Réglez le sélecteur de votre machine sur cette position',
134
+ statusLimitActive: 'Limite de machine active',
135
+ statusOutOfRange: 'Hors de la plage standard commerciale',
136
+ },
137
+ };
@@ -0,0 +1,28 @@
1
+ import DrillCalculatorComponent from './component.astro';
2
+ import DrillCalculatorSEO from './seo.astro';
3
+ import DrillCalculatorBibliography from './bibliography.astro';
4
+ import type { DiyToolEntry, ToolDefinition } from '../../types';
5
+ import type { DrillCalculatorUI } from './ui';
6
+
7
+ export {
8
+ DrillCalculatorComponent,
9
+ DrillCalculatorSEO,
10
+ DrillCalculatorBibliography,
11
+ };
12
+
13
+ const es = async () => (await import('./i18n/es')).content;
14
+ const en = async () => (await import('./i18n/en')).content;
15
+ const fr = async () => (await import('./i18n/fr')).content;
16
+
17
+ export const drillCalculator: DiyToolEntry<DrillCalculatorUI> = {
18
+ id: 'drill-rpm-calculator',
19
+ icons: { bg: 'mdi:tools', fg: 'mdi:speedometer' },
20
+ i18n: { es, en, fr },
21
+ };
22
+
23
+ export const DRILL_CALCULATOR_TOOL: ToolDefinition = {
24
+ entry: drillCalculator,
25
+ Component: DrillCalculatorComponent,
26
+ SEOComponent: DrillCalculatorSEO,
27
+ BibliographyComponent: DrillCalculatorBibliography,
28
+ };
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { drillCalculator } from './index';
4
+ import type { KnownLocale } from '../../types';
5
+
6
+ interface Props {
7
+ locale?: KnownLocale;
8
+ }
9
+ const { locale = 'es' } = Astro.props;
10
+ const content = await drillCalculator.i18n[locale]?.();
11
+ if (!content) return null;
12
+ ---
13
+
14
+ <SEORenderer content={{ locale: locale as string, sections: content.seo }} />
@@ -0,0 +1,41 @@
1
+ export interface DrillCalculatorUI extends Record<string, string> {
2
+ labelMaterial: string;
3
+ matSteel: string;
4
+ matInox: string;
5
+ matAlu: string;
6
+ matBrass: string;
7
+ matCastIron: string;
8
+ matWood: string;
9
+ matPlastic: string;
10
+ coolSteel: string;
11
+ coolInox: string;
12
+ coolAlu: string;
13
+ coolBrass: string;
14
+ coolCastIron: string;
15
+ coolWood: string;
16
+ coolPlastic: string;
17
+ labelTool: string;
18
+ typeHss: string;
19
+ typeWidia: string;
20
+ labelDiameter: string;
21
+ unitMm: string;
22
+ unitInch: string;
23
+ modeColumnDrill: string;
24
+ labelAdvanced: string;
25
+ labelLips: string;
26
+ labelFz: string;
27
+ labelMachine: string;
28
+ presetStandard: string;
29
+ presetCnc: string;
30
+ addRpmManual: string;
31
+ addButton: string;
32
+ resultRpm: string;
33
+ resultCooling: string;
34
+ resultFeed: string;
35
+ resultClosest: string;
36
+ rpmUnit: string;
37
+ recommendedLabel: string;
38
+ recommendedHint: string;
39
+ statusLimitActive: string;
40
+ statusOutOfRange: string;
41
+ }
@@ -0,0 +1,13 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { drillSharpener } from './index';
4
+ import type { KnownLocale } from '../../types';
5
+
6
+ interface Props {
7
+ locale?: KnownLocale;
8
+ }
9
+ const { locale = 'es' } = Astro.props;
10
+ const content = await drillSharpener.i18n[locale]?.();
11
+ ---
12
+
13
+ {content && <SharedBibliography links={content.bibliography} />}