pip install matplotlib numpy import matplotlib.pyplot as plt from matplotlib.patches…
- User
pip install matplotlib numpy
import matplotlib.pyplot as plt from matplotlib.patches import Rectangle, Circle import numpy as np import math
L, W, H = 1000, 500, 40 DIA, DEPTH = 350, 12 SLOT_L, SLOT_W = 50, 15 a = DIA/2 Rs = (aa + DEPTHDEPTH)/(2*DEPTH) # 1282.04
def lens_y(x): # профиль сферической линзы Y(x) = (Rs-h) - sqrt(Rs^2 - x^2) return (Rs - DEPTH) - np.sqrt(np.maximum(0, Rs2 - x2))
fig = plt.figure(figsize=(16.5, 11.7)) # A3 fig.suptitle(f'SLIM SINK BLACK {L}x{W}x{H} | Линза D{DIA} / {DEPTH}мм | Слот {SLOT_L}x{SLOT_W} в центре | Матовая черная эпоксидная смола', fontsize=11, fontweight='bold')
--- 1. ВИД СВЕРХУ ---
ax1 = plt.subplot2grid((2,3),(0,0), colspan=2) ax1.add_patch(Rectangle((0,0), L, W, fill=False, lw=1.5)) ax1.add_patch(Circle((L/2, W/2), a, fill=False, ls='--', lw=1, color='#666')) ax1.add_patch(Rectangle((L/2-SLOT_L/2, W/2-SLOT_W/2), SLOT_L, SLOT_W, fill=True, color='black')) ax1.set_xlim(-100, L+100) ax1.set_ylim(-100, W+150) ax1.set_aspect('equal') ax1.set_title('ВИД СВЕРХУ', fontsize=10, fontweight='bold') ax1.text(L/2, W/2+ a+20, f'ЛИНЗА D{DIA}', ha='center', fontsize=8) ax1.text(L/2, W/2, f'СЛОТ {SLOT_L}x{SLOT_W}', ha='center', va='center', color='white', fontsize=7, fontweight='bold')
размеры
ax1.annotate('', xy=(0, W+40), xytext=(L, W+40), arrowprops=dict(arrowstyle='<->', lw=0.8)) ax1.text(L/2, W+55, f'{L}', ha='center', fontsize=9) ax1.annotate('', xy=(L+40, 0), xytext=(L+40, W), arrowprops=dict(arrowstyle='<->', lw=0.8)) ax1.text(L+60, W/2, f'{W}', va='center', fontsize=9)
--- 2. ВИД СПЕРЕДИ (1000х40) ---
ax2 = plt.subplot2grid((2,3),(1,0)) ax2.add_patch(Rectangle((0,0), L, H, fill=False, lw=1.2)) ax2.set_xlim(-50, L+50) ax2.set_ylim(-20, H+40) ax2.set_title('ВИД СПЕРЕДИ (ДЛИНА)', fontsize=10, fontweight='bold') ax2.set_aspect('equal') ax2.annotate('', xy=(0, H+15), xytext=(L, H+15), arrowprops=dict(arrowstyle='<->', lw=0.8)) ax2.text(L/2, H+20, f'{L} мм', ha='center', fontsize=8)
--- 3. ВИД СБОКУ (500х40) ---
ax3 = plt.subplot2grid((2,3),(1,1)) ax3.add_patch(Rectangle((0,0), W, H, fill=False, lw=1.2)) ax3.set_xlim(-50, W+50) ax3.set_ylim(-20, H+40) ax3.set_title('ВИД СБОКУ (ГЛУБИНА)', fontsize=10, fontweight='bold') ax3.set_aspect('equal')
--- 4. РАЗРЕЗ А-А ПРОДОЛЬНЫЙ (вдоль 1000) ---
ax4 = plt.subplot2grid((2,3),(1,2)) xs = np.linspace(-a, a, 200) ys = lens_y(xs)
Контур с учетом слота 50мм в центре
X = [-L/2, -a] + list(xs[xs < -SLOT_L/2]) + [-SLOT_L/2, -SLOT_L/2, SLOT_L/2, SLOT_L/2] + list(xs[xs >
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.