| .. | |||
| .gemini | 23 days ago | ||
| backend | 23 days ago | ||
| frontend | 23 days ago | ||
| Dockerfile | 24 days ago | ||
| README.md | 25 days ago | ||
| deploy.sh | 24 days ago | ||
| docker-compose.yml | 24 days ago | ||
| start_local_dev.sh | 23 days ago | ||
This project provides a modern, web-based interface for the mesh simplification tool. Users can upload a 3D model file (.obj, .stl, .3mf), and the application will generate a .dxf file containing a series of simplified, layered 2D profiles suitable for use in CAD/CAM software.
The application features a modern UI with real-time progress updates, configurable processing parameters, and persistent job management. It is designed with an asynchronous worker architecture for robust background processing.
This project is a single-container application built with a multi-stage Dockerfile and consists of:
create-react-app. It provides the user interface for uploading files, monitoring progress, and managing jobs. It communicates with the backend via HTTP requests and WebSockets.worker.py) that runs alongside the FastAPI app. It monitors the job queue, picks up jobs, processes the mesh, and updates job status and progress (which the frontend fetches via APIs/WebSockets).From the root of the project, run the following command to build the application image:
docker build -t mesh-app .
This may take a few minutes the first time as it downloads base images and installs all frontend and backend dependencies.
Once the image is built, run it with this command, making sure to use an absolute path to your data directory:
docker run --rm -p 8000:8000 -v "/path/to/your/data/directory:/app/data" mesh-app
--rm: Automatically removes the container when it is stopped.-p 8000:8000: Maps port 8000 on your local machine to port 8000 inside the container.-v "/path/to/your/data/directory:/app/data": Mounts a local directory (e.g., $(pwd)/data) into the container at /app/data. This is where uploaded files, processed outputs, and job metadata will be stored. Ensure this path exists and is absolute.Once the container is running, open your web browser and navigate to:
.obj, .stl, .3mf). Optionally, adjust the Number of Layers and Points per Layer for processing.COMPLETE jobs, you can download the generated DXF file. For any job, you can delete it.To stop the application, press Ctrl+C in the terminal where the container is running.
For active development, it's often easier to run the frontend, backend API, and worker processes directly on your local machine. This allows for live reloading of code changes.
A helper script is provided to automate the entire setup process. From the root of the project, run:
# Make the script executable (only needed once) chmod +x start_local_dev.sh # Run the script ./start_local_dev.sh
This script will:
npm dependencies for both services.http://localhost:8000.http://localhost:3000 (which proxies API requests to port 8000).Your browser should automatically open to http://localhost:3000. You can now edit the code in frontend/src or backend/app to see live updates.
To stop all servers, press Ctrl+C in the terminal where the script is running.
. ├── backend/ │ ├── app/ │ │ ├── __init__.py │ │ ├── main.py # FastAPI app (API endpoints) │ │ ├── models.py # Pydantic models for job management │ │ ├── processing.py # Core mesh logic (generator for progress) │ │ └── worker.py # Asynchronous job processing worker │ ├── tests/ # Unit tests for backend logic │ ├── start.sh # Script to start backend/worker in Docker │ └── requirements.txt ├── data/ │ └── (contains original model, and will store uploads/outputs/job_metadata/job_queue) ├── frontend/ │ ├── public/ # React public assets │ ├── src/ # React source code (App.js, JobItem, JobWatcher etc.) │ └── package.json ├── Dockerfile # Production Docker build (single image) └── start_local_dev.sh # Local development setup and start script