Skip to content

Davinci-Meg/gcode-converter

Repository files navigation

G-code Converter

A web application that converts G-code generated by gcoordinator into a format compatible with Bambu Lab A1 — from file upload to 3D preview, safety checks, and download, all in your browser.

Next.js React TypeScript License

日本語

Live Demo: https://gcode-converter.vercel.app

✨ Features

  • G-code conversion — Automatically converts gcoordinator output to Bambu Lab A1 format with proper header/footer
  • 3D preview — Real-time toolpath visualization with Three.js and a layer slider for per-layer inspection
  • Safety checks — Automatic validation warnings for coordinates, temperatures, speeds, and more
  • Filament presets — Auto-configured temperature and speed settings for PLA / PETG / TPU / ABS and others
  • Speed factor — Scale all feed rates by a percentage (10–100%) to reduce print speed globally
  • Auto-centering — Offset adjustment to fit within the build volume (256 x 256 x 256 mm)
  • Custom G-code — Override start/end G-code templates
  • 7 languages — 日本語 / English / 简体中文 / 한국어 / Español / Deutsch / Français
  • Browser-only — All processing happens client-side; files are never sent to a server

🛠 Tech Stack

Category Technology
Framework Next.js 16 (App Router)
UI React 19, TypeScript 5, Tailwind CSS 4, shadcn/ui
3D Three.js, React Three Fiber, React Three Drei
State Zustand
Testing Vitest, Playwright
Deploy Vercel

📦 Installation

  1. Clone the repository
    git clone https://github.com/Davinci-Meg/gcode-converter.git
    cd gcode-converter
  2. Install dependencies
    pnpm install
  3. Start the dev server
    pnpm dev
  4. Open http://localhost:3000

🚀 Usage

  1. Drag & drop a .gcode / .gc / .g file to upload (max 50 MB)
  2. Set filament type and temperature in the "Material" tab; adjust speed, speed factor, and offset in the "Print" tab
  3. Inspect toolpaths in the 3D preview on the right; use the layer slider to view individual layers
  4. Click "Convert for Bambu A1" and download the converted file
  5. Copy the file to a FAT32-formatted microSD card and insert it into the Bambu Lab A1 to print

🌐 Supported Languages

Language Code
日本語 ja
English en
简体中文 zh-CN
한국어 ko
Español es
Deutsch de
Français fr

Translations other than Japanese are AI-generated.

📁 Project Structure

src/
├── app/                # Next.js App Router pages
├── components/
│   ├── layout/         # Header, Footer, StatusBar, LanguageSwitcher
│   ├── upload/         # File upload (drag & drop)
│   ├── settings/       # Filament / Print / Advanced tabs
│   ├── preview/        # 3D viewer (Three.js)
│   ├── convert/        # Convert & Download buttons
│   ├── warnings/       # Safety warnings display
│   └── ui/             # shadcn/ui components
├── lib/
│   ├── gcode/          # Parser, Converter, Validator
│   ├── i18n/           # Internationalization (7 locales)
│   ├── filament-presets/
│   ├── printer-profiles/
│   └── templates/      # Start/End G-code templates
├── stores/             # Zustand stores
└── hooks/              # Custom React hooks

⚠️ Disclaimer

  • This tool is not an official Bambu Lab product. It has no affiliation with Bambu Lab.
  • Use converted G-code at your own risk. The developer assumes no responsibility for any damage caused by use of this tool.
  • Always supervise the first print with converted G-code. Stop the printer immediately if you observe any abnormal behavior.

📄 License

MIT License

About

Convert gcoordinator G-code for Bambu Lab A1 — Web app with 3D preview, safety validation, auto-centering, and 5-language support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors