- Is pyrech/gcode-estimator a Laravel package?
- No. It is a framework-agnostic PHP library that parses G-code and estimates filament length, weight, and cost. In Laravel you install it with Composer and wrap it in your own service provider, config, and FilamentProfile/Estimate DTO. The package does not ship a Laravel service provider, config file, facade, or Artisan commands.
- How do I install pyrech/gcode-estimator in a Laravel app?
- Install it as a normal Composer dependency with composer require pyrech/gcode-estimator and verify the resolved PHP constraint against your app. Then bind your own PrintEstimator service in a small provider and keep vendor classes behind an interface. There is no config publishing or migration step because the library is headless.
- Does it support Laravel 10 or 11 and PHP 8.2 or 8.3?
- There is no official Laravel version support matrix because it is not Laravel-specific. The package's last release was in 2020, so its composer.json PHP constraint and syntax compatibility with PHP 8.2 and 8.3 must be tested before adoption. Run composer install and the package tests on your target PHP and Laravel stack, and be prepared to fork or patch if deprecated syntax fails.
- Can it estimate 3D print time, filament weight, and cost?
- The library parses G-code toolpaths, feed rates, and extrusion data to estimate filament length and weight, and it can derive cost from that usage. The overview also positions it for duration estimates, but you should validate time accuracy against your slicer and firmware. Business rules such as waste factor, currency, and price per kg belong in your Laravel application, not the vendor package.
- How accurate is G-code filament estimation?
- Accuracy is unbounded because G-code has no single specification. Relative extrusion M82/M83, firmware retraction G10/G11, volumetric extrusion M200, G92 resets, and multi-tool changes can all change the result if a parser ignores them. Treat any estimate as suspect unless you test known files and add a coverage signal for unparsed commands.
- Does pyrech/gcode-estimator handle relative extrusion and multi-extruder G-code?
- That is not guaranteed by the package description and must be verified against the source and your slicer output. You need to test M82/M83 absolute and relative extrusion, G10/G11 retraction, M200 volumetric flow, G92 resets, and T0/T1 tool changes. If a construct is silently ignored, the library can return a plausible but wrong cost, so add fixtures for each case.
- Can it parse a 200 MB or 500 MB G-code file without running out of memory?
- The available context does not confirm whether it streams the file or loads it fully into memory. Real print files are often 50 to 500 MB, and gzipped input, BOM or CRLF variance, and truncated uploads are common. Benchmark peak memory and wall-clock time on a representative 200 MB file before putting it in a queued Laravel job.
- How do I configure filament diameter, density, and price per kg in Laravel?
- Keep those values in your own Laravel config or database-backed FilamentProfile value object, not in the package. Pass diameter, density, price per kg, currency, and waste factor into your PrintEstimator service, then return a typed Estimate DTO. This keeps pricing logic and currency formatting out of vendor code and makes it testable.
- What are maintained alternatives to pyrech/gcode-estimator?
- Benchmark CuraEngine CLI, gcodestat, and Python gcode-parser against your real files if you need a maintained or more battle-tested option. The PHP package is small and framework-agnostic, but its last release in 2020 and low star count make it better treated as a reference implementation. Compare accuracy, memory use, dialect support, and licensing before choosing.
- Is pyrech/gcode-estimator maintained, licensed, and safe for production?
- It is MIT-licensed per the evaluation, which is permissive for commercial use, but confirm license headers are preserved. Maintenance risk is high: last release 2020-02-23, around 15 stars, no security advisory channel, and no known roadmap. Fork it, pin the version, add tests for your G-code dialects, and decide who owns patches for future PHP versions.