A modern web application for uploading STL 3D model files and getting instant pricing quotes for 3D printing services. Features an interactive 3D viewer with drag controls, material selection, and automatic price calculation.
- 3D Model Preview: Interactive Three.js viewer with drag-to-rotate functionality
- Dual Format Support: Handles both ASCII and Binary STL file formats
- 8 Material Options: Choose from PLA, ABS, Nylon, and Flexible TPU in various colors
- Instant Pricing: Automatic weight estimation and price calculation
- Responsive Design: Works on desktop and tablet browsers
- Visual Studio Integration: Launch from Visual Studio with green start button
Follow these step-by-step instructions to get STL Upload Pricer running on your machine.
You need the following installed on your computer:
- Download from: https://nodejs.org/
- Choose the LTS (Long Term Support) version
- This includes npm (Node Package Manager) automatically
- Verify installation:
node --version npm --version
- Download from: https://git-scm.com/
- Useful for version control and cloning repositories
- For launching from Visual Studio with green start button
- Download Community Edition (free): https://visualstudio.microsoft.com/
Choose one method:
git clone <repository-url>
cd stlupload- Download the project ZIP file
- Extract to your desired location
- Open Command Prompt or PowerShell
- Navigate to the folder:
cd C:\path\to\stlupload
In the project directory, run:
npm installWhat this does:
- Downloads all required packages from npm registry
- Creates a
node_modulesfolder with all dependencies - Sets up Three.js, React, Next.js, Tailwind CSS, etc.
Time: 2-5 minutes (depends on internet speed)
Expected output:
added 391 packages, and audited 391 packages in 45s
146 packages are looking for funding
found 0 vulnerabilities
You have two options:
- Open
STLupload.slnin Visual Studio - Click the green Start button (▶) in the toolbar
- The application will automatically:
- Start the development server in a terminal window
- Open the app in a new Chrome browser window at
http://localhost:3000
- When finished, click the red Stop button (⏹) to close everything
- Open Command Prompt or PowerShell
- Navigate to the project folder:
cd C:\repos\stlupload
- Start the development server:
npm run dev
- Open your browser and go to:
http://localhost:3000 - Press
Ctrl+Cin the terminal to stop the server
-
Upload a Test File
- Use the included test file:
public/test-cube.stl - Or upload any of your own STL files
- Use the included test file:
-
Interact with 3D Preview
- Click and drag with your mouse to rotate the model
- Model should auto-fit to screen size
-
Select Material
- Choose from 8 material options
- See different prices per material
-
Calculate Price
- Click "Calculate Price" button
- Get instant quote
The easiest way to run the application:
- Open the solution:
STLupload.slnin Visual Studio - Click Start: Green play button (▶) in the toolbar
- Wait for startup:
- A terminal window opens running the dev server
- A new Chrome browser window opens automatically
- Application loads at
http://localhost:3000
- Stop debugging: Red square button (⏹) when done
- Automatically closes the browser window
- Automatically stops the dev server
- Cleans up all processes
stlupload/
├── app/
│ ├── page.tsx # Main page
│ ├── layout.tsx # Layout template
│ ├── globals.css # Global styles
│ ├── api/
│ │ └── upload/
│ │ └── route.ts # Upload API
│ └── components/
│ ├── UploadForm.tsx # Upload form
│ ├── STLPreview.tsx # 3D viewer
│ └── MaterialSelector.tsx # Material picker
├── lib/
│ └── stl-uploader.ts # Web Component
├── public/
│ └── test-cube.stl # Test file
├── Launcher.cs # Visual Studio launcher
├── STLupload.sln # Visual Studio solution
├── package.json # Dependencies
└── README.md # This file
# Start development server
npm run dev
# Build for production
npm run build
# Run production build
npm start
# Run code linting
npm run lintSolution: Node.js isn't installed. Download from https://nodejs.org/
Solution: The dev server will automatically use ports 3001, 3002, etc.
Solution:
# Windows: Run Command Prompt as Administrator
# macOS/Linux: Use sudo if needed
npm installFixes:
- Check browser console (Press F12)
- Ensure your STL file is valid
- Try the test file:
public/test-cube.stl - Ensure WebGL is enabled in browser
Normal behavior: Files with 50,000+ triangles may take 2-5 seconds to parse
- Watch browser console for "Parsed X facets" message
- Wait for "Camera fitted" message
- Loading indicator will disappear when ready
Recommended: Chrome/Chromium (best performance)
Also works on:
- Firefox
- Safari (macOS/iOS)
- Edge
Requirements:
- WebGL support enabled
- JavaScript enabled
- Modern browser (2020 or newer)
| Material | Price per Gram | Notes |
|---|---|---|
| PLA White | $0.10 | Standard filament |
| PLA Black | $0.10 | Standard filament |
| PLA Red | $0.12 | Vibrant color |
| PLA Blue | $0.12 | Vibrant color |
| ABS White | $0.14 | Strong & durable |
| ABS Black | $0.14 | Strong & durable |
| Nylon | $0.20 | Flexible |
| Flexible TPU | $0.25 | Highly flexible |
Price Calculation: Base $1.50 + (weight in grams × material price)
- Frontend Framework: Next.js 14
- UI Library: React 18
- Language: TypeScript
- 3D Graphics: Three.js
- Styling: Tailwind CSS
- Code Quality: ESLint
- Runtime: Node.js
- Initial page load: ~2-3 seconds
- STL file parsing:
- Small files (< 1MB): < 1 second
- Large files (> 20MB): 2-5 seconds
- 3D rendering: Real-time interaction
If you're estimating file sizes:
- Simple cube: ~1KB
- Small miniature: ~500KB-2MB
- Detailed figure: ~5-20MB
- Complex model: ~20-100MB+
- Check the troubleshooting section above
- Open browser console: Press F12 → Console tab
- Look for error messages in the console
- Verify Node.js is installed: Run
node --version - Reinstall dependencies if needed:
rm -r node_modules npm install
This project is provided for commercial use.
- Current Version: 1.0.0
- Last Updated: October 2025
- Next.js: 14.0.0
- React: 18.2.0
- Three.js: 0.180.0