This Java CLI-based application helps estimate 3D printing costs by considering material usage, energy consumption, and optional commission. It allows users to set printing parameters, manage printers, calculate total costs, and export/import settings.
The web-based GUI of the project is available at https://rh45-one.github.io/3DPrintCostCalc/.
- Simplify cost estimation for 3D printing tasks.
- Provide a quick, interactive console/web interface to manage printers and printing parameters.
- Enable more accurate planning and budgeting for 3D printing projects.
3DPrintCostCalc/
├── .github/
│ └── workflows/
│ ├── makefile.yml
│ └── static.yml
├── bin/
│ └── ...
├── src/
│ ├── application/
│ │ ├── PrintCostCalculator.java
│ │ └── Printer.java
│ ├── calculations/
│ │ ├── CostCalculator.java
│ │ └── Optimizer.java
│ └── main/
│ └── Application.java
├── web/
│ ├── css/
│ │ └── styles.css
│ ├── img/
│ │ └── ...
│ ├── js/
│ │ └── scripts.js
│ ├── docs/
│ │ ├── ...
│ │ └── index.html
│ └── index.html
├── 3DPrintCostCalc.jar
├── Makefile
- User Input: Prompts for material/energy cost, number of units, and printer settings.
- Printer Management: Allows adding, listing, and removing printers.
- Calculation Core: Uses classes in
calculationsto compute total material cost, energy cost, and commissions. - Distribution Optimization: Optimally allocates units to printers for minimal cost.
- Export/Import: Saves or loads current settings from a file.
- Start: Run the CLI and display a menu.
- Configuration Menu: Set overall printing parameters (discounts, material cost, etc.).
- Printer Menu: Add or remove printers.
- Calculation: Trigger calculations for total cost, including commission.
- Data Persistence: Optionally export or import configurations.
This application is divided into three main packages, each serving a specific role:
- main – Contains the entry point and overall program launch.
- application – Houses the CLI-based interface for user interactions (e.g., adding printers, importing/exporting settings).
- calculations – Provides cost computations, energy usage calculations, and distribution optimization.
- Compile:
make compile
- Generate Javadoc:
make doc
- Create a JAR:
make jar
- Run the CLI:
java -jar 3DPrintCostCalc.jar
A GitHub Actions workflow (located in .github/workflows/makefile.yml) runs automatically on each push or pull request to the main branch. It checks out the code, installs Java, and executes the Make targets (compile, doc, jar) to verify everything builds successfully.
Additionally, another GitHub Actions workflow (located in .github/workflows/static.yml) is set up to build and deploy the web-based GUI of the project. This workflow ensures that the web version is always up-to-date and available.
Web Version: Creation of a web-based GUI of the project.✔️Import/Export Settings: Allows saving/loading configurations to/from a file.✔️- Improve Mobile Interface: Enhance the web version for better mobile compatibility.
- Additional Cost Factors: Integrate advanced maintenance or labor costs as needed.