Skip to content

saschb2b/tubecraft

Repository files navigation

TubeCraft

A powerful 3D tube generator for makers and engineers
Design custom tubes, pipes, adapters, and connectors for 3D printing with real-time preview

GitHub Stars License Buy Me A Coffee


Features

Tube Generator

Multiple Tube Shapes

  • Round/Circular - Standard pipe profiles
  • Square - Perfect for downspouts and ducts
  • Rectangular - Custom aspect ratios for any application

Advanced End Operations

Control top and bottom ends independently:

  • Flat - Standard straight cut
  • Miter - Angled cuts (0-60°) for corner joints
  • Chamfer - Beveled edges for easier insertion
  • Saddle - Curved fish-mouth cuts for T-joints and branch connections

Professional Press-Fit System

  • Fit Type Presets - Loose (0.3mm) / Snug (0.15mm) / Interference (-0.05mm)
  • Custom Clearance - Fine-tune tolerances for your printer
  • Lead-in Chamfer - Auto-generated tapers for easier assembly
  • Stop Shoulder - Internal step for consistent seating depth
  • Anti-Rotation - Add flats or keys to prevent spinning

Adapter Generator

Build custom connectors like LEGO pieces to join any tubes together.

Shape Transitions

  • Round to Round - Reducers and expanders
  • Round to Square - Gutter to downspout connections
  • Square to Rectangular - Downspout transitions
  • Any combination - Mix and match as needed

Bend Angles

  • Straight adapters (0°) - Simple transitions
  • Elbows (up to 90°) - Corners and offsets
  • Real-time bend preview

Press-Fit Ends

  • Male fitting - Inserts into another tube
  • Female fitting - Receives another tube
  • Configurable clearance - Adjust for your printer
  • Independent settings for each end

Real-Time 3D Preview

  • Professional CAD-style metallic rendering
  • Interactive dimension indicators
  • Grid floor with axis visualization
  • Orbit controls (drag to rotate, scroll to zoom)

STL Export

  • Watertight mesh generation (no open edges)
  • Compatible with all major slicers
  • Optimized for 3D printing

Use Cases

  • Downspout Extensions - Square/rectangular tubes for rain gutters
  • Pipe Adapters - Connect different diameters with press-fit flares
  • T-Joint Connections - Saddle cuts for branch fittings on half-round gutters
  • Custom Ducting - Air flow, cable management, vacuum systems
  • Modular Assemblies - Print multiple pieces that snap together
  • Shape Transitions - Round to square, different sizes, angled connections

Getting Started

Installation

# Clone the repository
git clone https://github.com/saschb2b/tubecraft.git
cd tubecraft

# Install dependencies
npm install

# Run development server
npm run dev

Open http://localhost:3000 in your browser.

Usage

Tube Generator

  1. Select Shape - Choose round, square, or rectangular
  2. Set Dimensions - Configure inner/outer sizes, wall thickness, length
  3. Configure Ends - Add miters, chamfers, or saddle cuts as needed
  4. Enable Press-Fit - Toggle flare and adjust fit tolerance
  5. Preview - Rotate and inspect your design in 3D
  6. Download STL - Export for immediate 3D printing

Adapter Generator

  1. Switch to Adapters tab
  2. Configure End A - Set shape and dimensions for the bottom end
  3. Configure End B - Set shape and dimensions for the top end
  4. Set Transition - Adjust length and bend angle
  5. Add Press-Fit - Optional male/female fittings on either end
  6. Download STL - Export for printing

Tech Stack

  • Next.js 15 - React framework with App Router
  • React Three Fiber - 3D rendering with Three.js
  • TypeScript - Type-safe development
  • Tailwind CSS v4 - Utility-first styling
  • shadcn/ui - Beautiful UI components

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support

If you find TubeCraft useful, consider supporting the project:

Buy Me A Coffee

License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with care by the open source community

About

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors