Delivering the best Add-Ons in more than 37 languages.

中文(简体), English, हिन्दी/हिंदी, Español/Castellano, العربية, Русский язык, Français, 中文 (台灣), বাংলা, Bahasa Indonesia, اردو, Português, Deutsch, Bahasa Melayu (بهاس ملايو‎), 日本語 (にほんご), فارسی, Italiano, తెలుగు, Türkçe, ગુજરાતી, Język polski/polszczyzna, Tiếng Việt, ಕನ್ನಡ, Українська мова, ไทย
PHP Scripts / Miscellaneous

STL Volume Weight Calculator

— Add-On to

Subscribe to our feed to stay up to date!

New! Follow us as you want it!

STL Volume Weight Calculator - CodeCanyon Item for Sale


Ad: Bluehost hosting

Surely, you want to quote the price of that Thing ;)!

STL Volume Weight Calculator

In two lines:
Vital stats for 3D printing objects. Quickly estimate the cost of printing your 3D object!

Why buy with us?

  • Get Free Updates forever
  • Accurate calculations
  • So easy to implement, if only grannys knew some PHP…
  • Developers love it – see our ratings/reviews!

What is STL?

STL is a file format that is popularly used for representing 3D object information for 3D printing applications.

class STLStats

STL file format specifies geometry of the 3D object to be printed. STLStats class does the hard work of detecting the format, parsing the data and crunching numbers to give you – volume of the 3D object.

Price Quoting in a Nutshell

From the 3D volume and material density value the class can calculate the weight of the to-be-printed object.

All the math is wrapped inside this easy to use PHP class. It exposes getter functions (i.e. getVolume, getWeight, etc) to calculate common statistics of a 3D object.

Simply include this class in your PHP project (example demo scripts are provided)

Via AJAX requests, upload your STL file to your server and feed that to STLStats to get 3D volume/weight information beamed to your browser asynchronously.

Multiply the weight by your printing rate ($/gm) to come up with a basic price quote!

Watch that heap of green grow as you quote and fulfil 3D printing jobs ;)

The PHP code has been commented extensively. Example usage has been given at the end of the class (please comment it out during production use :P ). Documentation is also provided along with example snippets of intended usage.

Happy coding!

You might also like B-)

STL3 nacing this one. Its the Stanford Univ. dragon,iaiii. 1hing27666. Material ABS PLA NYLON View Quantity Addto Cart codecanyon Box 200 100 Volume for shipping outside USA. Interact
  • Updates:
  • v1.2
  • Minor re-factoring.
  • Updates:
  • v1.1
  • Auto-detect ASCII / Binary STL file
  • Extract ASCII & Binary data
  • Calculate volume from ASCII & Binary STL files

Other components in this categoryAll components of this author
CommentsFrequently asked questions and answers


25 September 12

Last Update:
15 November 13

High Resolution:

Files Included:

Software Framework:

Software Version:
PHP 5.x


eCommerce, eCommerce, All Items, 3d, calculate, calculator, cc, cost, estimate, inch, mass, printing, quote, statistics, stats, stl, volume, weight