File size: 7,305 Bytes
da96410
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7d9340f
 
 
 
 
 
 
 
 
da96410
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import React from 'react';
import { DRAWING_IMAGE_SRC } from '../constants/drawingImage.js';

export default function DrawingModal({ isOpen, onClose }) {
  if (!isOpen) return null;

  return (
    <div className="fixed inset-0 z-50 flex items-center justify-center p-3 bg-black/80 backdrop-blur-sm animate-fade-in">
      <div className="bg-slate-900 border border-slate-700/80 rounded-2xl w-full max-w-4xl max-h-[92vh] flex flex-col shadow-2xl overflow-hidden">
        {/* HEADER */}
        <div className="flex items-center justify-between px-5 py-3.5 bg-slate-950 border-b border-slate-800">
          <div className="flex items-center gap-2.5">
            <span className="p-2 bg-sky-500/10 text-sky-400 rounded-xl border border-sky-500/20 text-lg">
              📐
            </span>
            <div>
              <h2 className="text-base font-bold text-slate-100 flex items-center gap-2">
                Desenho Técnico: Exercício Pós-Graduação CNC
                <span className="text-[10px] bg-amber-500/20 text-amber-300 px-2 py-0.5 rounded border border-amber-500/30 uppercase tracking-wide font-extrabold">
                  Percurso da Ferramenta
                </span>
              </h2>
              <p className="text-xs text-slate-400">
                Peça Bruta: Bloco 80 × 80 × 24 mm • Zero Peça G54 no Canto Inferior Esquerdo (X0, Y0)
              </p>
            </div>
          </div>
          <button
            type="button"
            onClick={onClose}
            className="w-8 h-8 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 hover:text-white flex items-center justify-center text-sm font-bold transition-colors"
          >
            ✕
          </button>
        </div>

        {/* BODY */}
        <div className="p-5 overflow-y-auto flex-1 flex flex-col lg:flex-row gap-5">
          {/* DRAWING IMAGE */}
          <div className="flex-1 bg-slate-950 p-3 rounded-xl border border-slate-800 flex flex-col items-center justify-between shadow-inner">
            <div className="w-full flex-1 bg-white rounded-lg p-2 flex items-center justify-center shadow-md border border-slate-700/40 min-h-[300px]">
              <img
                src={DRAWING_IMAGE_SRC}
                alt="Desenho Técnico Oficial do Exercício de Pós-Graduação CNC"
                className="max-h-[460px] w-auto max-w-full object-contain rounded hover:scale-[1.01] transition-transform duration-200"
              />
            </div>
            <span className="text-[11px] text-slate-300 mt-2.5 text-center bg-slate-900/90 px-3 py-1.5 rounded-lg border border-slate-800">
              Ponto Inicial indicado no desenho: <strong className="text-amber-400">Círculo Laranja (X60, Y25)</strong> com sentido da <strong className="text-amber-400">Seta F</strong> para cima.
            </span>
          </div>

          {/* PARAMETERS & COTAS TABLE */}
          <div className="w-full lg:w-80 flex flex-col gap-3 shrink-0 text-xs">
            {/* DADOS DE CORTE */}
            <div className="bg-slate-950 p-3.5 rounded-xl border border-slate-800 flex flex-col gap-2">
              <span className="font-bold text-sky-400 uppercase tracking-wider text-[11px] flex items-center gap-1.5">
                ⚙️ Dados de Usinagem Especificados
              </span>
              <div className="grid grid-cols-2 gap-2 text-slate-300">
                <div className="bg-slate-900/90 p-2 rounded-lg border border-slate-800">
                  <div className="text-[10px] text-slate-400">Ferramenta:</div>
                  <div className="font-bold text-amber-300">T08 (Fresa Ø8mm)</div>
                </div>
                <div className="bg-slate-900/90 p-2 rounded-lg border border-slate-800">
                  <div className="text-[10px] text-slate-400">Rotação (S):</div>
                  <div className="font-bold text-emerald-300">10.000 RPM (M03)</div>
                </div>
                <div className="bg-slate-900/90 p-2 rounded-lg border border-slate-800">
                  <div className="text-[10px] text-slate-400">Avanço Corte (F):</div>
                  <div className="font-bold text-sky-300">4.000 mm/min</div>
                </div>
                <div className="bg-slate-900/90 p-2 rounded-lg border border-slate-800">
                  <div className="text-[10px] text-slate-400">Profundidade (Z):</div>
                  <div className="font-bold text-rose-300">Z = -3.0 mm</div>
                </div>
              </div>
            </div>

            {/* COTAS E COORDENADAS DO PERCURSO */}
            <div className="bg-slate-950 p-3.5 rounded-xl border border-slate-800 flex flex-col gap-2 flex-1">
              <span className="font-bold text-amber-400 uppercase tracking-wider text-[11px] flex items-center gap-1.5">
                📏 Geometria do Contorno Fechado
              </span>
              <ul className="space-y-1.5 text-slate-300 leading-tight">
                <li className="p-1.5 bg-slate-900/80 rounded border border-slate-800/80">
                  <strong className="text-white">1. Reta Inferior:</strong> de (0, 0) a (50, 0) [Cota 50mm]
                </li>
                <li className="p-1.5 bg-slate-900/80 rounded border border-slate-800/80">
                  <strong className="text-white">2. Arco Convexo R1:</strong> Raio 10mm (G03) até (60, 10) [I0 J10]
                </li>
                <li className="p-1.5 bg-slate-900/80 rounded border border-slate-800/80">
                  <strong className="text-white">3. Reta Direita:</strong> Sobe de (60, 10) a (60, 40) passando por (60, 25)
                </li>
                <li className="p-1.5 bg-slate-900/80 rounded border border-slate-800/80">
                  <strong className="text-white">4. Arco Côncavo R2:</strong> Raio 20mm (G02) curva para dentro até (40, 60)
                </li>
                <li className="p-1.5 bg-slate-900/80 rounded border border-slate-800/80">
                  <strong className="text-white">5. Reta Superior:</strong> de (40, 60) a (10, 60) [Cota 30mm]
                </li>
                <li className="p-1.5 bg-slate-900/80 rounded border border-slate-800/80">
                  <strong className="text-white">6. Chanfro 45°:</strong> de (10, 60) descendo até (0, 50) [10×10mm]
                </li>
                <li className="p-1.5 bg-slate-900/80 rounded border border-slate-800/80">
                  <strong className="text-white">7. Reta Esquerda:</strong> de (0, 50) descendo até a origem (0, 0)
                </li>
              </ul>
            </div>
          </div>
        </div>

        {/* FOOTER */}
        <div className="px-5 py-3 bg-slate-950 border-t border-slate-800 flex items-center justify-between">
          <span className="text-[11px] text-slate-400">
            Dica: A Fresa T08 não fura no maciço! Posicione sempre fora da peça antes de descer em Z.
          </span>
          <button
            type="button"
            onClick={onClose}
            className="px-4 py-1.5 bg-blue-600 hover:bg-blue-500 active:bg-blue-700 text-white font-bold text-xs rounded-lg transition-colors shadow"
          >
            Entendido / Fechar
          </button>
        </div>
      </div>
    </div>
  );
}