<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>칩배출량 &#8211; MyEngNote</title>
	<atom:link href="https://myengnote.com/tag/%ec%b9%a9%eb%b0%b0%ec%b6%9c%eb%9f%89/feed/" rel="self" type="application/rss+xml" />
	<link>https://myengnote.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Jul 2026 04:43:04 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>
	<item>
		<title>선삭 절삭 속도 계산기 &#038; 시뮬레이터</title>
		<link>https://myengnote.com/machining-cutting-speed-roughness-calculator-simulator/</link>
					<comments>https://myengnote.com/machining-cutting-speed-roughness-calculator-simulator/#respond</comments>
		
		<dc:creator><![CDATA[동동]]></dc:creator>
		<pubDate>Tue, 30 Jun 2026 00:14:12 +0000</pubDate>
				<category><![CDATA[공학계산기]]></category>
		<category><![CDATA[공구노즈알]]></category>
		<category><![CDATA[선삭절삭속도]]></category>
		<category><![CDATA[칩배출량]]></category>
		<category><![CDATA[표면거칠기]]></category>
		<category><![CDATA[회전수계산]]></category>
		<guid isPermaLink="false">https://myengnote.com/machining-cutting-speed-roughness-calculator-simulator/</guid>

					<description><![CDATA[공작물 직경과 주축 회전수(RPM)를 기반으로 선반 가공의 원주 방향 절삭 속도(m/min)와 이송량에 따른 이론적 표면 조도(Ra, Ry) 및 소재 제거율(MRR)을 실시간 2D 절삭 칩 시뮬레이션으로 분석합니다. <a href="https://myengnote.com/machining-cutting-speed-roughness-calculator-simulator/" style="text-decoration:none; color:#0073aa; font-weight:bold;">[본문 전체보기 >]</a>]]></description>
										<content:encoded><![CDATA[
<h2 style="font-size: 1.6em; font-weight: 800; color: #0c0e25; border-bottom: 2px solid #00f2fe; padding-bottom: 8px; margin-bottom: 20px;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f680.png" alt="🚀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 선삭 절삭 속도 계산기 &#038; 시뮬레이터</h2>


<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&#038;family=Outfit:wght@400;500;600;700;800&#038;display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Scoped & Isolated Styles for cuttingspeed-calculator-wrapper */
        /* Modern Reset and Design Tokens */
        .cuttingspeed-calculator-wrapper *, .cuttingspeed-calculator-wrapper *::before, .cuttingspeed-calculator-wrapper *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        .cuttingspeed-calculator-wrapper {
            --color-bg-dark: #f8f9fd;
            --color-bg-deep: #ffffff;
            --color-panel-bg: rgba(255, 255, 255, 0.85);
            --color-border: rgba(0, 0, 0, 0.06);
            --color-border-hover: rgba(0, 0, 0, 0.12);
            --color-text-main: #1e293b;
            --color-text-muted: #475569;
            --color-text-dark: #94a3b8;
            --color-cyan: #0284c7; /* Cobalt blue accent */
            --color-cyan-glow: rgba(2, 132, 199, 0.15);
            --color-magenta: #db2777; /* Pink/magenta accent */
            --color-magenta-glow: rgba(219, 39, 119, 0.15);
            --color-purple: #7c3aed;
            --color-purple-glow: rgba(124, 58, 237, 0.12);
            --color-success: #10b981;
            --color-warning: #f59e0b;
            --color-danger: #ef4444;
            --gradient-primary: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
            --gradient-accent: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-purple) 100%);
            --gradient-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.95) 100%);
            --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            --shadow-neon-cyan: 0 0 15px var(--color-cyan-glow);
            --shadow-neon-magenta: 0 0 15px var(--color-magenta-glow);
            --shadow-card: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
            --blur-glass: blur(16px);
        }
        .cuttingspeed-calculator-wrapper {
            width: 100%;
            max-width: 1440px;
            margin: 0 auto;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        .cuttingspeed-calculator-wrapper {
            background-color: var(--color-bg-dark);
            color: var(--color-text-main);
            font-family: var(--font-body);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            overflow-x: hidden;
            position: relative;
        }
        .app-background-glow {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
            pointer-events: none;
        }
        .app-background-glow::before, 
        .app-background-glow::after {
            content: '';
            position: absolute;
            width: 600px;
            height: 600px;
            border-radius: 50%;
            filter: blur(140px);
            opacity: 0.15;
        }
        .app-background-glow::before {
            background: var(--color-cyan);
            top: -10%;
            right: -5%;
            animation: pulse-slow 15s infinite alternate;
        }
        .app-background-glow::after {
            background: var(--color-purple);
            bottom: -10%;
            left: -5%;
            animation: pulse-slow 20s infinite alternate-reverse;
        }
        @keyframes pulse-slow {
            0% { transform: scale(1) translate(0, 0); opacity: 0.12; }
            100% { transform: scale(1.2) translate(50px, 50px); opacity: 0.22; }
        }
        .app-container {
            width: 100%;
            max-width: 1440px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
        .app-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            background: var(--color-panel-bg);
            backdrop-filter: var(--blur-glass);
            border: 1px solid var(--color-border);
            border-radius: 16px;
            box-shadow: var(--shadow-card);
        }
        .logo-area {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .logo-icon {
            font-size: 32px;
            background: linear-gradient(135deg, var(--color-cyan), var(--color-magenta));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .logo-area h1 {
            font-family: var(--font-heading);
            font-weight: 800;
            font-size: 24px;
            letter-spacing: 1.5px;
            background: linear-gradient(90deg, var(--color-text-main), var(--color-text-muted));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .logo-area .subtitle {
            font-size: 12px;
            color: var(--color-text-muted);
            font-weight: 500;
            letter-spacing: 0.5px;
        }
        .fa-spin-slow {
            animation: fa-spin 15s linear infinite;
        }
        .header-badge {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.2);
            padding: 6px 14px;
            border-radius: 20px;
        }
        .pulse-dot {
            width: 8px;
            height: 8px;
            background-color: var(--color-success);
            border-radius: 50%;
            box-shadow: 0 0 10px var(--color-success);
            animation: pulse-dot-anim 1.5s infinite;
        }
        @keyframes pulse-dot-anim {
            0% { transform: scale(0.9); opacity: 0.6; }
            50% { transform: scale(1.2); opacity: 1; }
            100% { transform: scale(0.9); opacity: 0.6; }
        }
        .badge-text {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-success);
            letter-spacing: 0.5px;
        }
        .app-main-grid {
            display: grid;
            grid-template-columns: 340px 1fr 340px;
            gap: 24px;
            align-items: start;
        }
        .panel {
            background: var(--gradient-panel);
            backdrop-filter: var(--blur-glass);
            border: 1px solid var(--color-border);
            border-radius: 20px;
            padding: 24px;
            box-shadow: var(--shadow-card);
            display: flex;
            flex-direction: column;
            gap: 20px;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .panel:hover {
            border-color: var(--color-border-hover);
        }
        .panel-header {
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid var(--color-border);
            padding-bottom: 14px;
        }
        .panel-header i {
            font-size: 18px;
        }
        .panel-header h2 {
            font-family: var(--font-heading);
            font-size: 18px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }
        .text-cyan { color: var(--color-cyan); }
        .text-magenta { color: var(--color-magenta); }
        .text-purple { color: var(--color-purple); }
        .control-panel {
            grid-column: 1;
        }
        .input-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .input-label-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .input-label-row label {
            font-size: 13px;
            font-weight: 600;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .helper-text {
            font-size: 10px;
            color: var(--color-text-muted);
            font-weight: 500;
        }
        .number-input-wrapper {
            display: flex;
            position: relative;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--color-border);
            background: #ffffff;
            transition: all 0.2s ease;
        }
        .number-input-wrapper:focus-within {
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
        .custom-number-input {
            flex: 1;
            width: 0;
            min-width: 0;
            background: #f8fafc !important;
            border: none !important;
            outline: none !important;
            color: #0f172a !important;
            padding: 10px 14px !important;
            font-family: var(--font-body) !important;
            font-size: 15px !important;
            font-weight: 700 !important;
            text-align: right !important;
            box-shadow: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: textfield !important;
        }
        .custom-number-input::-webkit-outer-spin-button,
        .custom-number-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .unit-badge {
            background: rgba(0, 0, 0, 0.03);
            color: var(--color-text-muted);
            font-size: 11px;
            font-weight: 700;
            padding: 0 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-left: 1px solid var(--color-border);
            pointer-events: none;
            flex-shrink: 0;
        }
        .custom-slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: rgba(0, 0, 0, 0.05);
            outline: none;
            margin: 8px 0;
            transition: background 0.2s ease;
        }
        .custom-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            cursor: pointer;
            transition: transform 0.1s ease, box-shadow 0.2s ease;
        }
        #slider-diameter::-webkit-slider-thumb { background: var(--color-cyan); box-shadow: 0 0 10px var(--color-cyan); }
        #slider-rpm::-webkit-slider-thumb { background: var(--color-purple); box-shadow: 0 0 10px var(--color-purple); }
        #slider-feed::-webkit-slider-thumb { background: var(--color-magenta); box-shadow: 0 0 10px var(--color-magenta); }
        #slider-nose::-webkit-slider-thumb { background: var(--color-cyan); box-shadow: 0 0 10px var(--color-cyan); }
        #slider-ap::-webkit-slider-thumb { background: var(--color-magenta); box-shadow: 0 0 10px var(--color-magenta); }
        .presets-section {
            display: flex;
            flex-direction: column;
            gap: 12px;
            border-top: 1px solid var(--color-border);
            padding-top: 18px;
        }
        .presets-section h3 {
            font-size: 13px;
            font-weight: 700;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .presets-grid {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .preset-btn {
            background: rgba(0, 0, 0, 0.015);
            border: 1px solid var(--color-border);
            border-radius: 10px;
            padding: 8px 12px;
            cursor: pointer;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 12px;
            text-align: left;
            transition: all 0.2s ease;
        }
        .preset-btn:hover {
            background: rgba(0, 0, 0, 0.05);
            border-color: var(--color-border);
            transform: translateX(4px);
        }
        .preset-btn.active {
            background: linear-gradient(90deg, var(--color-cyan-glow), var(--color-magenta-glow));
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
        .preset-icon {
            width: 28px;
            height: 28px;
            background: rgba(0, 0, 0, 0.02);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: var(--color-cyan);
        }
        .preset-btn:hover .preset-icon, .preset-btn.active .preset-icon {
            background: var(--gradient-primary);
            color: #fff;
            box-shadow: var(--shadow-neon-cyan);
        }
        .preset-details {
            display: flex;
            flex-direction: column;
            gap: 2px;
            align-items: flex-start;
            text-align: left;
        }
        .preset-name {
            font-size: 13px !important;
            font-weight: 600;
            letter-spacing: 0.25px;
        }
        .preset-spec {
            font-size: 11px;
            color: var(--color-text-muted);
            font-weight: 500;
        }
        .simulation-panel { grid-column: 2; align-self: start; }
        .canvas-scale-indicator {
            font-size: 11px;
            color: var(--color-text-muted);
            background: rgba(0, 0, 0, 0.02);
            padding: 4px 10px;
            border-radius: 6px;
            border: 1px solid var(--color-border);
        }
        .canvas-card {
            background: #ffffff;
            border: 1px solid var(--color-border);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
            position: relative;
        }
        canvas {
            display: block;
            width: 100%;
            background: #ffffff;
        }
        /* Canvas HUD Overlay */
        .hud-overlay {
            position: absolute;
            top: 10px;
            left: 12px;
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(0,0,0,0.05);
            border-radius: 8px;
            padding: 6px 10px;
            font-size: 0.75rem;
            font-family: 'Outfit', sans-serif;
            color: var(--color-text-main);
            pointer-events: none;
            display: flex;
            flex-direction: column;
            gap: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            z-index: 10;
        }
        .hud-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .hud-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--color-success);
            animation: pulse-dot-anim 1.5s infinite;
        }
        .results-panel {
            grid-column: 3;
        }
        .ratio-readout-box {
            background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(124, 58, 237, 0.03) 100%);
            border: 1px solid rgba(2, 132, 199, 0.25);
            border-radius: 16px;
            padding: 20px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            box-shadow: 0 0 15px rgba(2, 132, 199, 0.05);
        }
        .ratio-title {
            font-size: 11px;
            font-weight: 700;
            color: var(--color-cyan);
            letter-spacing: 1px;
            text-transform: uppercase;
        }
        .ratio-value {
            font-family: var(--font-heading);
            font-weight: 800;
            font-size: 30px;
            background: linear-gradient(90deg, var(--color-text-main), var(--color-cyan));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .ratio-type {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-muted);
        }
        .results-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .result-card {
            background: rgba(255, 255, 255, 0.85);
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.2s ease;
        }
        .result-card:hover {
            transform: translateY(-2px);
            border-color: rgba(2, 132, 199, 0.2);
            background: rgba(2, 132, 199, 0.03);
        }
        .card-icon {
            width: 38px;
            height: 38px;
            background: rgba(0, 0, 0, 0.015);
            border: 1px solid var(--color-border);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: var(--color-text-muted);
            flex-shrink: 0;
        }
        .result-card:hover .card-icon {
            color: var(--color-cyan);
            border-color: rgba(2, 132, 199, 0.3);
            background: rgba(2, 132, 199, 0.1);
        }
        .card-content {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .card-unit {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-muted);
        }
        .card-value {
            font-family: var(--font-heading);
            font-weight: 700;
            font-size: 18px;
            color: var(--color-text-main);
        }
        .card-unit-text {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-dark);
            margin-left: 4px;
        }
        .formula-card {
            background: #ffffff !important;
            border: 1px solid var(--color-border) !important;
            border-radius: 12px !important;
            padding: 16px !important;
            box-shadow: var(--shadow-card) !important;
            transition: all 0.2s ease !important;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .formula-card h4 {
            font-weight: 700;
            color: var(--color-text-main);
        }
        #text-judgment {
            font-size: 12px !important;
            font-weight: 500 !important;
            color: var(--color-text-muted) !important;
            line-height: 1.6 !important;
            word-break: keep-all !important;
        }
        .formula-equation {
            font-family: monospace;
            color: var(--color-cyan);
            font-size: 13px;
            background: #f8fafc;
            padding: 6px 10px;
            border-radius: 6px;
            border: 1px solid var(--color-border);
            text-align: center;
        }
        .efficiency-bar-container {
            background: #e2e8f0;
            height: 6px;
            border-radius: 3px;
            overflow: hidden;
        }
        .efficiency-bar {
            height: 100%;
            width: 0%;
            background: var(--gradient-primary);
            transition: width 0.3s ease;
        }
        .warning-box {
            background: #fffbeb;
            border: 1px dashed var(--color-warning);
            border-radius: 10px;
            padding: 12px;
            font-size: 12px;
            color: #b45309;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-top: 15px;
            display: none;
        }
        @container motor-container (max-width: 1100px) {
            .app-main-grid {
                grid-template-columns: 1fr 1fr;
                gap: 20px;
            }
            .control-panel {
                grid-column: 1;
            }
            .simulation-panel {
                grid-column: 2;
            }
            .results-panel {
                grid-column: 1 / span 2;
            }
        }
        @container motor-container (max-width: 768px) {
            .app-main-grid {
                grid-template-columns: 1fr;
            }
            .control-panel, .simulation-panel, .results-panel {
                grid-column: 1;
            }
            .simulation-panel {
                order: -1;
            }
            .app-header {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }
            .logo-area {
                flex-direction: column;
                gap: 8px;
            }
        }
        @container motor-container (max-width: 480px) {
            .app-container {
                padding: 12px;
                gap: 16px;
            }
            .panel {
                padding: 16px;
            }
        }
/* ━━ WordPress 레이아웃 Override: 디자인 1 (2열 컴팩트 대칭 레이아웃) ━━ */
.cuttingspeed-calculator-wrapper .app-main-grid,
.cuttingspeed-calculator-wrapper .main-grid,
.cuttingspeed-calculator-wrapper .sim-grid {
    display: grid !important;
    grid-template-columns: 340px 1fr !important;
    gap: 24px !important;
    align-items: start !important;
}
/* 3열 레이아웃을 2열 레이아웃으로 변경하는 특화 스타일 */
.cuttingspeed-calculator-wrapper .right-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    min-width: 0 !important;
    grid-column: 2 !important;
}
.cuttingspeed-calculator-wrapper .simulation-panel,
.cuttingspeed-calculator-wrapper .canvas-panel,
.cuttingspeed-calculator-wrapper .sim-panel {
    grid-column: auto !important;
    order: 1 !important;
    align-self: stretch !important;
}
.cuttingspeed-calculator-wrapper .control-panel {
    grid-column: 1 !important;
}
/* 2열 통합 결과 분석 영역 레이아웃 */
.cuttingspeed-calculator-wrapper .simulation-results-section {
    display: grid !important;
    grid-template-columns: 1.1fr 1.3fr !important;
    gap: 20px !important;
    border-top: 1px solid var(--color-border) !important;
    padding-top: 20px !important;
    margin-top: 10px !important;
    align-items: stretch !important;
}
/* Readout Box 스타일 */
.cuttingspeed-calculator-wrapper .simulation-results-section .ratio-readout-box,
.cuttingspeed-calculator-wrapper .simulation-results-section .re-readout-box,
.cuttingspeed-calculator-wrapper .simulation-results-section .status-readout-box,
.cuttingspeed-calculator-wrapper .simulation-results-section .flow-readout-box,
.cuttingspeed-calculator-wrapper .simulation-results-section [class*="readout-box"],
.cuttingspeed-calculator-wrapper .simulation-results-section .gauge-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
.cuttingspeed-calculator-wrapper .simulation-results-section .results-grid {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    justify-content: flex-start !important;
}
.cuttingspeed-calculator-wrapper .simulation-results-section .results-grid .result-card {
    flex: none !important;
    display: flex !important;
    align-items: center !important;
    min-height: 72px !important;
    height: auto !important;
    padding: 12px 16px !important;
}
.cuttingspeed-calculator-wrapper .simulation-results-section .formula-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
}
/* 모바일/반응형 (800px 이하) ── 항상 세로형(1열) 정렬 및 시뮬레이터 캔버스 최상단 배치 */
@media (max-width: 800px) {
    .cuttingspeed-calculator-wrapper .app-main-grid,
    .cuttingspeed-calculator-wrapper .main-grid,
    .cuttingspeed-calculator-wrapper .sim-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .cuttingspeed-calculator-wrapper .control-panel {
        order: 2 !important;
        width: 100% !important;
    }
    .cuttingspeed-calculator-wrapper .right-column {
        order: 1 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .cuttingspeed-calculator-wrapper .simulation-panel,
    .cuttingspeed-calculator-wrapper .canvas-panel,
    .cuttingspeed-calculator-wrapper .sim-panel,
    .cuttingspeed-calculator-wrapper .canvas-section {
        order: -1 !important;
    }
    .cuttingspeed-calculator-wrapper .simulation-results-section {
        grid-template-columns: 1fr !important;
    }
    .cuttingspeed-calculator-wrapper .simulation-results-section .ratio-readout-box,
    .cuttingspeed-calculator-wrapper .simulation-results-section .re-readout-box,
    .cuttingspeed-calculator-wrapper .simulation-results-section .status-readout-box,
    .cuttingspeed-calculator-wrapper .simulation-results-section .flow-readout-box,
    .cuttingspeed-calculator-wrapper .simulation-results-section [class*="readout-box"],
    .cuttingspeed-calculator-wrapper .simulation-results-section .gauge-container {
        grid-column: 1 !important;
        grid-row: auto !important;
        height: auto !important;
    }
    .cuttingspeed-calculator-wrapper .simulation-results-section .results-grid {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    .cuttingspeed-calculator-wrapper .simulation-results-section .formula-card {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}
.cuttingspeed-calculator-wrapper .app-container,
.cuttingspeed-calculator-wrapper .main-container {
    max-width: 100% !important;
    padding: 12px !important;
}
/* Premium Advice/Formula Card & Typography Overrides */
.cuttingspeed-calculator-wrapper .simulation-results-section .formula-card,
.cuttingspeed-calculator-wrapper .results-panel .formula-card {
    background: #ffffff !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: var(--shadow-card) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 8px !important;
}
.cuttingspeed-calculator-wrapper .simulation-results-section .formula-card h4,
.cuttingspeed-calculator-wrapper .results-panel .formula-card h4 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--color-text-main) !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    word-break: keep-all !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.cuttingspeed-calculator-wrapper .formula-equation {
    font-family: 'Outfit', 'Cambria Math', 'Times New Roman', monospace !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
    word-break: keep-all !important;
    text-align: center !important;
}
.cuttingspeed-calculator-wrapper #text-judgment {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--color-text-muted) !important;
    line-height: 1.6 !important;
    word-break: keep-all !important;
}
</style>
<div class="cuttingspeed-calculator-wrapper" style="position: relative; width: 100%; box-sizing: border-box; overflow: hidden; margin: 30px auto; border-radius: 20px;">
    <div class="app-background-glow" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: hidden;"></div>
    <div style="position: relative; z-index: 2; width: 100%;">
<div class="cuttingspeed-calculator-wrapper">
    <div class="app-container">
        <!-- Header -->
        <header class="app-header">
            <div class="logo-area">
                <div class="logo-icon"><i class="fa-solid fa-screwdriver-wrench text-cyan"></i></div>
                <div>
                    <h1>CUTTING SPEED</h1>
                    <div class="subtitle">선삭 절삭 속도 및 표면 조도 시뮬레이터</div>
                </div>
            </div>
            <div class="header-badge">
                <div class="pulse-dot"></div>
                <div class="badge-text">LATHE CORE ACTIVE</div>
            </div>
        </header>
        <!-- Main Layout Grid -->
        <main class="app-main-grid">
            <!-- Left Panel: Controls -->
            <section class="panel control-panel">
                <div class="panel-header">
                    <i class="fa-solid fa-sliders text-cyan"></i>
                    <h2>가공 공정 제어 변수</h2>
                </div>
                <!-- Workpiece Diameter (D) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-circle-dot text-cyan"></i> 공작물 외경 직경 (D)</label>
                        <span class="helper-text">(10 ~ 250 mm)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-diameter" class="custom-number-input" min="10" max="250" value="50">
                        <div class="unit-badge">mm</div>
                    </div>
                    <input type="range" id="slider-diameter" class="custom-slider" min="10" max="250" value="50">
                </div>
                <!-- Spindle Speed (N) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-rotate text-purple"></i> 스핀들 회전수 (N)</label>
                        <span class="helper-text">(100 ~ 4000 RPM)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-rpm" class="custom-number-input" min="100" max="4000" value="2500">
                        <div class="unit-badge">RPM</div>
                    </div>
                    <input type="range" id="slider-rpm" class="custom-slider" min="100" max="4000" step="50" value="2500">
                </div>
                <!-- Feed Rate (f) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-right-long text-magenta"></i> 1회전당 이송량 (f)</label>
                        <span class="helper-text">(0.05 ~ 1.00 mm/rev)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-feed" class="custom-number-input" min="0.05" max="1.00" step="0.01" value="0.08">
                        <div class="unit-badge">mm/rev</div>
                    </div>
                    <input type="range" id="slider-feed" class="custom-slider" min="0.05" max="1.00" step="0.01" value="0.08">
                </div>
                <!-- Tool Nose Radius (r) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-bezier-curve text-cyan"></i> 공구 노즈 반경 (r)</label>
                        <span class="helper-text">(0.2 ~ 2.4 mm)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-nose" class="custom-number-input" min="0.2" max="2.4" step="0.2" value="0.8">
                        <div class="unit-badge">mm</div>
                    </div>
                    <input type="range" id="slider-nose" class="custom-slider" min="0.2" max="2.4" step="0.2" value="0.8">
                </div>
                <!-- Depth of Cut (ap) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-arrows-left-right-to-line text-magenta"></i> 절입 깊이 (a_p)</label>
                        <span class="helper-text">(0.1 ~ 5.0 mm)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-ap" class="custom-number-input" min="0.1" max="5.0" step="0.1" value="0.5">
                        <div class="unit-badge">mm</div>
                    </div>
                    <input type="range" id="slider-ap" class="custom-slider" min="0.1" max="5.0" step="0.1" value="0.5">
                </div>
                <!-- Material Presets -->
                <div class="presets-section">
                    <h3><i class="fa-solid fa-tags text-cyan"></i> 피삭재별 권장 가공 프리셋</h3>
                    <div class="presets-grid">
                        <button class="preset-btn active" data-preset="al-finish">
                            <div class="preset-icon"><i class="fa-solid fa-bolt"></i></div>
                            <div class="preset-details">
                                <span class="preset-name">알루미늄 초정밀 정삭</span>
                                <span class="preset-spec">D50, N2500, f0.08, r0.8</span>
                            </div>
                        </button>
                        <button class="preset-btn" data-preset="steel-rough">
                            <div class="preset-icon"><i class="fa-solid fa-fire"></i></div>
                            <div class="preset-details">
                                <span class="preset-name">탄소강 중절삭 황삭</span>
                                <span class="preset-spec">D85, N750, f0.35, r1.2</span>
                            </div>
                        </button>
                        <button class="preset-btn" data-preset="heavy-diameter">
                            <div class="preset-icon"><i class="fa-solid fa-weight-hanging"></i></div>
                            <div class="preset-details">
                                <span class="preset-name">대형 피스톤 샤프트 선삭</span>
                                <span class="preset-spec">D180, N350, f0.50, r1.6</span>
                            </div>
                        </button>
                    </div>
                </div>
                <!-- Over-speed warning -->
                <div id="warning-overspeed" class="warning-box">
                    <i class="fa-solid fa-triangle-exclamation"></i>
                    <span><strong>주의:</strong> 원주 절삭 속도가 지나치게 높습니다! 공구 수명 단축 및 팁 마모가 극대화되어 열화 파손 한계에 이릅니다.</span>
                </div>
            </section>
            <!-- Auto Injected Right Column wrapper for Design 1 -->
            <div class="right-column">
                <section class="panel simulation-panel">
                                <div class="panel-header">
                                    <div style="display: flex; align-items: center; gap: 12px;">
                                        <i class="fa-solid fa-circle-nodes text-cyan"></i>
                                        <h2>실시간 선반 가공 거동 및 칩 배출 모니터링</h2>
                                    </div>
                                    <div class="canvas-scale-indicator">ACTIVE</div>
                                </div>
                                <div class="canvas-card">
                                    <div class="hud-overlay">
                                        <div class="hud-item">
                                            <div class="hud-dot"></div>
                                            <span style="letter-spacing:0.5px; font-weight:700;">2D LATHE RENDERER</span>
                                        </div>
                                        <div class="hud-item" style="color:var(--color-text-muted);">
                                            <i class="fa-solid fa-gauge"></i> <span id="hud-speed">0.0 m/min</span>
                                        </div>
                                    </div>
                                    <canvas id="lathe-canvas" width="680" height="400"></canvas>
                                </div>
                                <div class="canvas-card">
                                    <div class="hud-overlay">
                                        <div class="hud-item">
                                            <i class="fa-solid fa-chart-line text-magenta"></i>
                                            <span style="letter-spacing:0.5px; font-weight:700;">이론 표면 거칠기 프로파일 (마이크로 조도 200배 확대)</span>
                                        </div>
                                    </div>
                                    <canvas id="roughness-canvas" width="680" height="150"></canvas>
                                </div>
                            <div class="simulation-results-section">
                                <div class="ratio-readout-box">
                                    <div class="ratio-title">원주 절삭 속도 (V_c)</div>
                                    <div>
                                        <span id="val-vc" class="ratio-value">392.7</span>
                                        <span>m/min</span>
                                    </div>
                                    <div class="efficiency-bar-container">
                                        <div id="bar-vc" class="efficiency-bar"></div>
                                    </div>
                                    <div id="hud-speed-desc">적정 절삭 속도 범위 (공구 수명 안정)</div>
                                </div>
                                <div class="results-grid">
                                    <!-- Maximum Roughness Ry -->
                                    <div class="result-card">
                                        <div class="card-icon"><i class="fa-solid fa-mountain text-magenta"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">이론 최대 높이 조도 (R_y)</span>
                                            <span class="card-value"><span id="val-ry">1.56</span><span class="card-unit-text">μm</span></span>
                                        </div>
                                    </div>
                                    <!-- Average Roughness Ra -->
                                    <div class="result-card">
                                        <div class="card-icon"><i class="fa-solid fa-water text-purple"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">중심선 평균 거칠기 (R_a)</span>
                                            <span class="card-value"><span id="val-ra">0.39</span><span class="card-unit-text">μm</span></span>
                                        </div>
                                    </div>
                                    <!-- Material Removal Rate MRR -->
                                    <div class="result-card">
                                        <div class="card-icon"><i class="fa-solid fa-cubes text-success"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">소재 제거율 (MRR)</span>
                                            <span class="card-value"><span id="val-mrr">19,635</span><span class="card-unit-text">mm³/min</span></span>
                                        </div>
                                    </div>
                                </div>
                                <div class="formula-card">
                                    <h4><i class="fa-solid fa-circle-info text-cyan"></i> 표면거칠기 및 소음 조언</h4>
                                    <div id="text-judgment">
                                        정밀 정삭가공면 수준(Ra &lt; 0.8μm)입니다. 높은 치수 정밀도 및 접동부 베어링 하우징 마찰면에 적합합니다.
                                    </div>
                                </div>
                            </div>
                </section>
            </div>
        </main>
        <!-- Disclaimer Footer -->
        <footer class="app-disclaimer" style="margin-top: 20px; padding: 12px 16px; background: rgba(0, 0, 0, 0.015); border: 1px solid var(--color-border); border-radius: 12px; font-size: 11px; color: var(--color-text-muted); line-height: 1.5; text-align: left; display: flex; gap: 10px; align-items: flex-start; clear: both;">
            <i class="fa-solid fa-circle-info" style="color: var(--color-cyan); font-size: 14px; margin-top: 2px; flex-shrink: 0;"></i>
            <span><strong>면책 조항 (Disclaimer):</strong> 본 시뮬레이터의 계산 결과는 교육 및 참고용으로만 제공되며, 실제 제품 설계나 제작 시에는 반드시 최신 공학 규격 및 공식 표준 설계 기준을 재확인하시기 바랍니다. 계산 값의 무결성을 보장하지 않으며, 이로 인해 발생하는 직접적/간접적 손해에 대해 제작자 및 본 블로그는 어떠한 책임을 지지 않습니다.</span>
        </footer>
    </div>
</div>
    </div>
</div>
<script>
(function() {
    "use strict";
    let state = {
        d: 50,
        n: 2500,
        f: 0.08,
        r: 0.8,
        ap: 0.5,
        toolX: 620, // Simulation tool coordinates
        spindleAngle: 0,
        particles: []
    };
    let initialized = false;
    // DOM selectors
    let inputDiameter, sliderDiameter;
    let inputRpm, sliderRpm;
    let inputFeed, sliderFeed;
    let inputNose, sliderNose;
    let inputAp, sliderAp;
    let valVc, valRy, valRa, valMrr, barVc;
    let hudSpeed, hudSpeedDesc, warningOverspeed, textJudgment, judgmentIcon;
    let latheCanvas, latheCtx;
    let roughnessCanvas, roughnessCtx;
    function initSimulator() {
        if (initialized) return;
        // Fetch inputs
        inputDiameter = document.getElementById("input-diameter");
        sliderDiameter = document.getElementById("slider-diameter");
        inputRpm = document.getElementById("input-rpm");
        sliderRpm = document.getElementById("slider-rpm");
        inputFeed = document.getElementById("input-feed");
        sliderFeed = document.getElementById("slider-feed");
        inputNose = document.getElementById("input-nose");
        sliderNose = document.getElementById("slider-nose");
        inputAp = document.getElementById("input-ap");
        sliderAp = document.getElementById("slider-ap");
        if (!inputDiameter) return;
        // Fetch results
        valVc = document.getElementById("val-vc");
        valRy = document.getElementById("val-ry");
        valRa = document.getElementById("val-ra");
        valMrr = document.getElementById("val-mrr");
        barVc = document.getElementById("bar-vc");
        hudSpeed = document.getElementById("hud-speed");
        hudSpeedDesc = document.getElementById("hud-speed-desc");
        warningOverspeed = document.getElementById("warning-overspeed");
        textJudgment = document.getElementById("text-judgment");
        judgmentIcon = document.getElementById("judgment-icon");
        // Fetch canvases
        latheCanvas = document.getElementById("lathe-canvas");
        latheCtx = latheCanvas.getContext("2d");
        roughnessCanvas = document.getElementById("roughness-canvas");
        roughnessCtx = roughnessCanvas.getContext("2d");
        // Event binder helper without logical AND
        function linkInputSlider(inputEl, sliderEl, stateKey, decimalPlaces) {
            // Live update state during slider sliding
            sliderEl.addEventListener("input", function() {
                let val = parseFloat(sliderEl.value);
                inputEl.value = decimalPlaces > 0 ? val.toFixed(decimalPlaces) : val;
                state[stateKey] = val;
                updateCalculations();
            });
            // Validation only on focus-out / blur / enter
            inputEl.addEventListener("change", function() {
                let min = parseFloat(inputEl.min);
                let max = parseFloat(inputEl.max);
                let val = parseFloat(inputEl.value);
                if (isNaN(val)) {
                    val = parseFloat(sliderEl.value);
                }
                if (val < min) {
                    val = min;
                }
                if (val > max) {
                    val = max;
                }
                inputEl.value = decimalPlaces > 0 ? val.toFixed(decimalPlaces) : val;
                sliderEl.value = val;
                state[stateKey] = val;
                updateCalculations();
            });
        }
        linkInputSlider(inputDiameter, sliderDiameter, "d", 0);
        linkInputSlider(inputRpm, sliderRpm, "n", 0);
        linkInputSlider(inputFeed, sliderFeed, "f", 2);
        linkInputSlider(inputNose, sliderNose, "r", 1);
        linkInputSlider(inputAp, sliderAp, "ap", 1);
        // Presets click events
        let presetBtns = document.querySelectorAll(".preset-btn");
        presetBtns.forEach(function(btn) {
            btn.addEventListener("click", function() {
                presetBtns.forEach(b => b.classList.remove("active"));
                btn.classList.add("active");
                applyPreset(btn.dataset.preset);
            });
        });
        // Strict Right Click and Short Key Copyright protection
        document.addEventListener("contextmenu", function(e) {
            e.preventDefault();
            alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
        }, { capture: true });
        document.addEventListener("keydown", function(e) {
            if (e.ctrlKey) {
                if (e.key === 'u' || e.key === 'c' || e.key === 's' || e.key === 'U' || e.key === 'C' || e.key === 'S') {
                    e.preventDefault();
                    alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                    return false;
                }
                if (e.shiftKey) {
                    if (['i','I','j','J','c','C'].includes(e.key)) {
                        e.preventDefault();
                        alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                        return false;
                    }
                }
            }
        }, { capture: true });
        updateCalculations();
        requestAnimationFrame(renderLoop);
        initialized = true;
    }
    function applyPreset(presetType) {
        if (presetType === "al-finish") {
            state.d = 50; state.n = 2500; state.f = 0.08; state.r = 0.8; state.ap = 0.5;
        } else if (presetType === "steel-rough") {
            state.d = 85; state.n = 750; state.f = 0.35; state.r = 1.2; state.ap = 2.0;
        } else if (presetType === "heavy-diameter") {
            state.d = 180; state.n = 350; state.f = 0.50; state.r = 1.6; state.ap = 3.5;
        }
        // Sync visual DOM
        inputDiameter.value = state.d; sliderDiameter.value = state.d;
        inputRpm.value = state.n; sliderRpm.value = state.n;
        inputFeed.value = state.f.toFixed(2); sliderFeed.value = state.f;
        inputNose.value = state.r.toFixed(1); sliderNose.value = state.r;
        inputAp.value = state.ap.toFixed(1); sliderAp.value = state.ap;
        updateCalculations();
    }
    function updateCalculations() {
        // Vc = (pi * d * n) / 1000
        let vc = (Math.PI * state.d * state.n) / 1000;
        // Ry = (f^2 * 1000) / (8 * r)
        let ry = (state.f * state.f * 1000) / (8 * state.r);
        // Ra = (f^2 * 1000) / (32 * r)
        let ra = (state.f * state.f * 1000) / (32 * state.r);
        // MRR = Vc * f * ap * 1000
        let mrr = vc * state.f * state.ap * 1000;
        // Render to DOM
        valVc.innerText = vc.toFixed(1);
        valRy.innerText = ry.toFixed(2);
        valRa.innerText = ra.toFixed(2);
        valMrr.innerText = Math.round(mrr).toLocaleString();
        hudSpeed.innerText = vc.toFixed(1) + " m/min";
        // Feed velocity bar (normalize by max 400 m/min)
        let pct = Math.min(100, (vc / 400) * 100);
        barVc.style.width = pct + "%";
        // Warnings and highlight card description based on cutting speed Vc
        warningOverspeed.style.display = "none";
        if (vc > 280) {
            warningOverspeed.style.display = "flex";
            hudSpeedDesc.innerText = "위험: 과도한 절삭 속도 (공구 마모 극대화)";
            hudSpeedDesc.style.color = "var(--color-danger)";
        } else if (vc < 80) {
            hudSpeedDesc.innerText = "주의: 너무 낮은 절삭 속도 (가공 효율 저하)";
            hudSpeedDesc.style.color = "var(--color-warning)";
        } else {
            hudSpeedDesc.innerText = "적정 절삭 속도 범위 (공구 수명 안정)";
            hudSpeedDesc.style.color = "var(--color-success)";
        }
        // Roughness quality assessment texts
        let classColor = "var(--color-success)";
        if (ra < 0.2) {
            textJudgment.innerHTML = "초정밀 연삭/경면 급 광택 다듬질 조도를 달성합니다.<br>반도체, 광학 미러용 수준입니다.";
            classColor = "var(--color-success)";
        } else if (ra < 0.8) {
            textJudgment.innerHTML = "정밀 정삭가공면 수준(Ra < 0.8μm)입니다.<br>높은 치수 정밀도 및 접동부 베어링 하우징 마찰면에 적합합니다.";
            classColor = "var(--color-success)";
        } else if (ra < 1.6) {
            textJudgment.innerHTML = "일반 정삭가공면 수준(Ra < 1.6μm)입니다.<br>일반 기계 결합면 조도로서 우수합니다.";
            classColor = "var(--color-cyan)";
        } else if (ra < 3.2) {
            textJudgment.innerHTML = "보통 가공면 수준(Ra < 3.2μm)입니다.<br>슬라이딩이 없는 고정 부위 결합면 수준으로 무난합니다.";
            classColor = "var(--color-warning)";
        } else {
            textJudgment.innerHTML = "거친 황삭 가공면(Ra ≥ 3.2μm)입니다.<br>뜯김 현상이나 나선 골 깊이가 뚜렷하므로 후속 정밀 가공이 반드시 요구됩니다.";
            classColor = "var(--color-danger)";
        }
        if (judgmentIcon) {
            judgmentIcon.style.color = classColor;
        }
    }
    // Particle factory for cutting sparks
    function spawnParticles(x, y, count) {
        for (let i = 0; i < count; i++) {
            state.particles.push({
                x: x,
                y: y,
                vx: -Math.random() * 4 - 2, // Fly leftwards
                vy: -Math.random() * 4 - 1, // Fly upwards
                alpha: 1,
                size: Math.random() * 2 + 1.5,
                color: "hsl(" + (Math.random() * 20 + 25) + ", 100%, " + (Math.random() * 20 + 55) + "%)" // Bright orange/yellow
            });
        }
    }
    function renderLoop() {
        renderLathe();
        renderRoughness();
        // Slow tool toolX coordinate cycle to show cutting motion
        state.toolX = state.toolX - 0.45;
        if (state.toolX < 120) {
            state.toolX = 620; // Reset tool to the very beginning (right edge)
        }
        // Spin Spindle Angle based on RPM
        state.spindleAngle = state.spindleAngle + (state.n / 1000) * 0.12;
        requestAnimationFrame(renderLoop);
    }
    function renderLathe() {
        let ctx = latheCtx;
        let w = latheCanvas.width;
        let h = latheCanvas.height;
        ctx.clearRect(0, 0, w, h);
        // 1. Blueprint Grid Background
        ctx.strokeStyle = "rgba(2, 132, 199, 0.04)";
        ctx.lineWidth = 1;
        for (let x = 0; x < w; x += 20) {
            ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x, h); ctx.stroke();
        }
        for (let y = 0; y < h; y += 20) {
            ctx.beginPath(); ctx.moveTo(0, y); ctx.lineTo(w, y); ctx.stroke();
        }
        // Center line
        ctx.strokeStyle = "rgba(2, 132, 199, 0.15)";
        ctx.setLineDash([6, 6]);
        ctx.beginPath(); ctx.moveTo(0, h/2); ctx.lineTo(w, h/2); ctx.stroke();
        ctx.setLineDash([]);
        // 2. Chuck Jaws (Slightly left)
        ctx.fillStyle = "#cbd5e1";
        ctx.strokeStyle = "#475569";
        ctx.lineWidth = 2;
        ctx.fillRect(10, h/2 - 120, 60, 240);
        ctx.strokeRect(10, h/2 - 120, 60, 240);
        // Stepped jaw details
        ctx.fillStyle = "#94a3b8";
        ctx.fillRect(70, h/2 - 110, 25, 60);
        ctx.strokeRect(70, h/2 - 110, 25, 60);
        ctx.fillRect(70, h/2 + 50, 25, 60);
        ctx.strokeRect(70, h/2 + 50, 25, 60);
        // 3. Workpiece (Rotational shaft)
        // Scaled base diameter
        let pixelRadiusMax = 100; // max 250mm
        let currentR = (state.d / 250) * pixelRadiusMax;
        if (currentR < 15) currentR = 15; // Min size visibility
        let cutDepthPixels = (state.ap / 5.0) * 12; // Scaled ap cutting depth visual
        if (cutDepthPixels > currentR - 5) cutDepthPixels = currentR - 5; 
        let toolX = state.toolX;
        // Uncut piece (Left side of the tool, between chuck jaws and the tool tip)
        ctx.fillStyle = "#f1f5f9";
        ctx.strokeStyle = "#94a3b8";
        ctx.lineWidth = 2.5;
        ctx.beginPath();
        ctx.moveTo(95, h/2 - currentR);
        ctx.lineTo(toolX, h/2 - currentR);
        ctx.lineTo(toolX, h/2 + currentR);
        ctx.lineTo(95, h/2 + currentR);
        ctx.closePath();
        ctx.fill();
        ctx.stroke();
        // Render spiral rotating lines on uncut piece to simulate spin motion
        ctx.save();
        ctx.beginPath();
        ctx.rect(95, h/2 - currentR, toolX - 95, currentR * 2);
        ctx.clip();
        ctx.strokeStyle = "rgba(148, 163, 184, 0.25)";
        ctx.lineWidth = 3;
        for (let offset = -200; offset < w; offset += 45) {
            let spiralX = offset + Math.sin(state.spindleAngle) * 12;
            ctx.beginPath();
            ctx.moveTo(spiralX, h/2 - currentR);
            ctx.lineTo(spiralX + 25, h/2 + currentR);
            ctx.stroke();
        }
        ctx.restore();
        // Cut piece (Right side of the tool, already machined part)
        let cutR = currentR - cutDepthPixels;
        ctx.fillStyle = "#e2e8f0";
        ctx.strokeStyle = "#64748b";
        ctx.lineWidth = 2;
        ctx.beginPath();
        ctx.moveTo(toolX, h/2 - cutR);
        ctx.lineTo(w - 60, h/2 - cutR);
        ctx.lineTo(w - 60, h/2 + cutR);
        ctx.lineTo(toolX, h/2 + cutR);
        ctx.closePath();
        ctx.fill();
        ctx.stroke();
        // Fine thread lines on cut piece representing cut profile grooves
        ctx.save();
        ctx.beginPath();
        ctx.rect(toolX, h/2 - cutR, w - 60 - toolX, cutR * 2);
        ctx.clip();
        ctx.strokeStyle = "rgba(100, 116, 139, 0.15)";
        ctx.lineWidth = 1;
        // Density corresponds to state.f (Feed speed)
        let spacing = Math.max(3, state.f * 35);
        for (let gx = toolX; gx < w - 60; gx += spacing) {
            ctx.beginPath();
            ctx.moveTo(gx, h/2 - cutR);
            ctx.lineTo(gx, h/2 + cutR);
            ctx.stroke();
        }
        ctx.restore();
        // 4. Cutting Tool (Turning Bar &#038; Insert tip)
        let toolY = h/2 - cutR;
        // Tool shank (Holder)
        ctx.fillStyle = "#334155";
        ctx.strokeStyle = "#1e293b";
        ctx.lineWidth = 1.5;
        ctx.beginPath();
        ctx.moveTo(toolX - 5, toolY + 120);
        ctx.lineTo(toolX + 30, toolY + 120);
        ctx.lineTo(toolX + 30, toolY + 15);
        ctx.lineTo(toolX - 2, toolY + 10);
        ctx.closePath();
        ctx.fill();
        ctx.stroke();
        // Carbide Insert (Golden Triangle)
        ctx.fillStyle = "#d97706"; // Golden yellow
        ctx.strokeStyle = "#78350f";
        ctx.lineWidth = 2;
        ctx.beginPath();
        ctx.moveTo(toolX, toolY);
        ctx.lineTo(toolX + 25, toolY + 8);
        ctx.lineTo(toolX + 10, toolY + 28);
        ctx.closePath();
        ctx.fill();
        ctx.stroke();
        // Highlight nose radius tip
        ctx.fillStyle = "#ffffff";
        ctx.beginPath();
        ctx.arc(toolX, toolY, state.r * 2.5, 0, Math.PI * 2);
        ctx.fill();
        // 5. Sparks particle effects (Emit when cutting)
        if (state.n > 0) {
            spawnParticles(toolX, toolY, Math.ceil(state.n / 1000));
        }
        // Draw and update particles
        for (let i = state.particles.length - 1; i >= 0; i--) {
            let p = state.particles[i];
            p.x += p.vx;
            p.y += p.vy;
            p.vy += 0.08; // gravity drop
            p.alpha -= 0.025;
            if (p.alpha <= 0) {
                state.particles.splice(i, 1);
            } else {
                ctx.save();
                ctx.globalAlpha = p.alpha;
                ctx.fillStyle = p.color;
                ctx.beginPath();
                ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
                ctx.fill();
                ctx.restore();
            }
        }
    }
    function renderRoughness() {
        let ctx = roughnessCtx;
        let w = roughnessCanvas.width;
        let h = roughnessCanvas.height;
        ctx.clearRect(0, 0, w, h);
        // 1. Grid
        ctx.strokeStyle = "rgba(219, 39, 119, 0.03)";
        ctx.lineWidth = 1;
        for (let x = 0; x < w; x += 20) {
            ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x, h); ctx.stroke();
        }
        for (let y = 0; y < h; y += 20) {
            ctx.beginPath(); ctx.moveTo(0, y); ctx.lineTo(w, y); ctx.stroke();
        }
        // Base line
        let baselineY = h - 45;
        ctx.strokeStyle = "rgba(71, 85, 105, 0.15)";
        ctx.lineWidth = 1.5;
        ctx.beginPath(); ctx.moveTo(20, baselineY); ctx.lineTo(w - 20, baselineY); ctx.stroke();
        // Math calculations
        let ry = (state.f * state.f * 1000) / (8 * state.r);
        // Exaggerated wave rendering representing actual feed spirals
        // Spacing on screen depends on feed
        let waveSpacing = state.f * 110; 
        if (waveSpacing < 10) waveSpacing = 10;
        if (waveSpacing > 130) waveSpacing = 130;
        // Amplitude (Depth) depends on Ry
        let ampScale = 4.5;
        let amp = ry * ampScale;
        if (amp < 1.5) amp = 1.5;
        if (amp > 55) amp = 55; // visual clamping
        // 2. Draw theoretical roughness profile shape
        ctx.strokeStyle = "#db2777";
        ctx.lineWidth = 3.5;
        ctx.lineJoin = "round";
        ctx.beginPath();
        let noseRadPix = state.r * 18; // scaled visual nose rad
        let startX = 30;
        let first = true;
        for (let x = startX; x < w - 30; x += 1) {
            let relativeX = (x - startX) % waveSpacing;
            let peakX = waveSpacing / 2;
            // Formula for round tool scallop heights
            // y = r - sqrt(r^2 - dx^2)
            let dx = relativeX - peakX;
            let dy = 0;
            if (Math.abs(dx) < noseRadPix) {
                dy = noseRadPix - Math.sqrt(noseRadPix * noseRadPix - dx * dx);
            } else {
                dy = noseRadPix - Math.sqrt(noseRadPix * noseRadPix - (noseRadPix * 0.99) * (noseRadPix * 0.99));
            }
            // Scale to match amp
            let visualY = baselineY + dy * (amp / 8);
            if (visualY > h - 10) visualY = h - 10;
            if (first) {
                ctx.moveTo(x, visualY);
                first = false;
            } else {
                ctx.lineTo(x, visualY);
            }
        }
        ctx.stroke();
        // Shade the material below the roughness
        ctx.lineTo(w - 30, h);
        ctx.lineTo(startX, h);
        ctx.closePath();
        ctx.fillStyle = "rgba(219, 39, 119, 0.05)";
        ctx.fill();
        // 3. Annotations (Draw on the right side to prevent overlap with HUD overlay)
        ctx.fillStyle = "#1e293b";
        ctx.font = "bold 11.5px Outfit";
        ctx.fillText("이송 간격 (f) = " + state.f.toFixed(2) + " mm/rev", w - 220, 26);
        ctx.fillText("최대 높이 거칠기 (R_y) = " + ry.toFixed(2) + " μm", w - 220, 42);
        ctx.fillStyle = "#475569";
        ctx.font = "500 10.5px Inter";
        ctx.fillText("공구 반경 (r) = " + state.r.toFixed(1) + " mm", w - 220, 58);
    }
    // Try starting simulation with robust ready checks
    let attempts = 0;
    function tryStart() {
        attempts++;
        initSimulator();
        if (!initialized) {
            if (attempts < 40) {
                setTimeout(tryStart, 100);
            }
        }
    }
    if (document.readyState === "complete" || document.readyState === "interactive") {
        tryStart();
    } else {
        document.addEventListener("DOMContentLoaded", tryStart);
        window.addEventListener("load", tryStart);
    }
})();
</script>


<div style="background: linear-gradient(135deg, rgba(0,242,254,0.03), rgba(138,43,226,0.03)); border: 1px solid rgba(0,242,254,0.15); border-radius: 12px; padding: 18px 24px; margin: 25px auto 35px auto; font-size: 0.95em; color: #4b5563; line-height: 1.7; font-family: sans-serif;">
    <strong style="color: #1f2937; font-size: 1.05em; display: flex; align-items: center; gap: 8px;">
        <span style="font-size: 1.2em;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span> 간편 사용 설명서
    </strong>
    <ol style="margin: 10px 0 0 0; padding-left: 20px;">
        <li style="margin-bottom: 6px;"><strong>공작물 외경 직경(D) 지정: 회전 선삭할 환봉형 소재의 지름(10mm ~ 250mm)을 설정합니다.</strong></li>
<li style="margin-bottom: 6px;">주축 스핀들 회전수(N) 설정: 선반 헤드스톡의 회전 속도(100 ~ 4000 RPM)를 입력합니다.</li>
<li style="margin-bottom: 6px;">바이트 이송속도 및 노즈 반경(R) 정의: 한 회전당 가공 인서트의 축방향 이동 이송속도(mm/rev)와 절삭 팁 모서리부의 코너 둥글기 노즈 알(mm)을 조절합니다.</li>
<li style="margin-bottom: 6px;">가공 진행 및 조도 모니터링: 바이트가 진입해 외경을 깎아내며 나선 칩(Chip)을 배출하는 실시간 연동 과정과 표면 마이크로 조도 프로파일 변화를 분석합니다.</li>
    </ol>
</div>


<details class="premium-seo-accordion" style="border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; background: #fbfbfc; padding: 0; margin: 30px auto; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01); font-family: sans-serif;">
    <summary style="display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; font-size: 1.1em; font-weight: 700; color: #1f2937; cursor: pointer; user-select: none; outline: none; list-style: none;">
        <span><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4da.png" alt="📚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 상세 기계선삭 가공 공식 및 표면 거칠기 수식 확인하기</span>
        <span class="accordion-arrow" style="font-size: 0.9em; color: #9ca3af; transition: transform 0.2s ease;">▼</span>
    </summary>
    <div style="padding: 0 24px 24px 24px; border-top: 1px solid rgba(0,0,0,0.04); background: #ffffff; border-radius: 0 0 12px 12px; font-size: 0.98em; color: #374151; line-height: 1.8;">
        <div style="margin-top: 20px;">
            <h3>1. 원주 절삭 속도(V_c)와 스핀들 회전 속도(N)의 상관 공식</h3>
<p>선삭(Turning) 가공에서 <strong>절삭 속도(Cutting Speed, V_c)</strong>는 절삭 바이트 팁과 닿는 공작물 원주면의 접선 주속도(tangential speed)를 가리킵니다.</p><p style="text-align: center; font-weight: bold; background: #e0f2fe; padding: 16px; border-radius: 8px; font-size: 1.05em; color: #0369a1;">V_c = (&pi; &times; D &times; N) / 1000 &nbsp;[m/min]</p><p>여기서 <code>D</code>는 공작물 외경(mm), <code>N</code>은 주축 속도(RPM)입니다. 수식에서 1000으로 나누는 이유는 직경 단위(mm)를 속도 표준 단위인 미터(m)로 맞추기 위한 단위 환산 계수입니다. 주축 속도 <code>N</code>을 역산하는 공식은 다음과 같습니다.</p><p style="text-align: center; font-weight: bold; background: #f3f4f6; padding: 12px; border-radius: 8px;">N = (1000 &times; V_c) / (&pi; &times; D) &nbsp;[RPM]</p>
<h3>2. 피드량과 공구 노즈알(r)에 따른 이론적 표면 거칠기(Ra, Ry)</h3>
<p>둥근 반경(노즈 반경, <code>r</code>)을 가진 선반 인서트 바이트가 1회전당 이송량 <code>f</code>로 가공면을 쓸고 지나갈 때, 절삭면에는 나선형 골짜기가 남게 됩니다. 기하학적으로 완벽한 이상적인 표면의 거칠기 수식은 다음과 같습니다.</p><p><strong>① 최대 높이 조도 (Peak-to-Valley, R_y / R_max):</strong></p><p style="text-align: center; font-weight: bold; background: #f3f4f6; padding: 12px; border-radius: 8px;">R_y = (f&sup2; &times; 10^3) / (8 &times; r) &nbsp;[&mu;m]</p><p><strong>② 중심선 평균 조도 (Arithmetic Average, R_a):</strong> 이론적으로 최대 조도의 약 1/4배 수준으로 근사됩니다.</p><p style="text-align: center; font-weight: bold; background: #fee2e2; padding: 12px; border-radius: 8px; color: #991b1b;">R_a &approx; (f&sup2; &times; 10^3) / (32 &times; r) &nbsp;[&mu;m]</p><p>이론적 조도는 노즈 반경 <code>r</code>이 클수록, 이송속도 <code>f</code>가 느릴수록 감소하여 극도로 미려한 고광택 정밀 다듬질면(Finish face)을 형성하게 됩니다.</p>
<h3>3. 칩 제거 배출율(MRR)과 가공 생산 효율</h3>
<p>단위 시간당 피삭재의 깎여나가는 체적 가공 효율인 <strong>소재 제거율(Material Removal Rate, MRR)</strong>은 절입 깊이 <code>a_p</code>를 적용하여 다음과 같이 산출됩니다.</p><p style="text-align: center; font-weight: bold; background: #f3f4f6; padding: 12px; border-radius: 8px;">MRR = V_c &times; f &times; a_p &times; 1000 &nbsp;[mm&sup3;/min]</p><p>가공 능률을 향상하기 위해 MRR을 올릴 경우 소요 동력이 상승하고 공구 온도가 급격히 올라가며 마모 수명이 저하되므로 절삭 변수 간의 균형 설계가 대단히 중요합니다.</p>
        </div>
    </div>
</details>
<style>
details.premium-seo-accordion[open] summary .accordion-arrow { transform: rotate(180deg); color: #00f2fe; }
details.premium-seo-accordion summary::-webkit-details-marker { display: none; }
details.premium-seo-accordion:hover { border-color: rgba(0,242,254,0.3); }
</style>


<h2 style="font-size: 1.4em; font-weight: 700; color: #1f2937; margin-top: 40px; margin-bottom: 15px; border-left: 4px solid #3b82f6; padding-left: 10px;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f517.png" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 함께 보면 좋은 공학 글</h2>


<a href="https://myengnote.com/inverter-motor-vfd-calculator-simulator/" style="text-decoration: none; background-color: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); padding: 15px; margin: 12px 0; transition: box-shadow 0.2s; display: table; width: 100%; box-sizing: border-box;">
    <span style="display: table-cell; vertical-align: middle;">
        <span style="font-size: 30px; margin-right: 15px; float: left;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f517.png" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span>
        <span style="display: block; overflow: hidden;">
            <span style="display: block; font-size: 0.9em; color: #6b7280; margin-bottom: 4px;">함께 보면 좋은 글</span>
            <span style="display: block; font-size: 1.1em; font-weight: bold; color: #111827;">인버터 슬립 계산기 &#038; 시뮬레이터</span>
        </span>
    </span>
    <span style="display: table-cell; vertical-align: middle; width: 40px; text-align: right; color: #3b82f6; font-size: 24px; font-weight: bold;">→</span>
</a>


<a href="https://myengnote.com/motor-selection-calculator-simulator/" style="text-decoration: none; background-color: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); padding: 15px; margin: 12px 0; transition: box-shadow 0.2s; display: table; width: 100%; box-sizing: border-box;">
    <span style="display: table-cell; vertical-align: middle;">
        <span style="font-size: 30px; margin-right: 15px; float: left;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f517.png" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span>
        <span style="display: block; overflow: hidden;">
            <span style="display: block; font-size: 0.9em; color: #6b7280; margin-bottom: 4px;">함께 보면 좋은 글</span>
            <span style="display: block; font-size: 1.1em; font-weight: bold; color: #111827;">모터 선정 계산기 &#038; 시뮬레이터</span>
        </span>
    </span>
    <span style="display: table-cell; vertical-align: middle; width: 40px; text-align: right; color: #3b82f6; font-size: 24px; font-weight: bold;">→</span>
</a>
]]></content:encoded>
					
					<wfw:commentRss>https://myengnote.com/machining-cutting-speed-roughness-calculator-simulator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
