This simple plugin counts the area used by the different materials in the model and shows them in a messagebox.
This extension can be seen as a SketchUp Ruby extension example. The original extension was written in June 2016 when I was much less experienced than I am today. Going through the commits and see how the code base has changed may be a helpful reference for your own extension development. The code can be used as a reference to better understand:
- the value of source control,
- the value of writing short, concise and re-usable methods (you may want to copy several methods straight into your own project),
- how the SketchUp model can be iterated over,
- Vector3d cross and dot multiplication,
- Transformations and Transformation multiplication, and
- YARD documentation (though the syntax might be wrong, I'm quite new at this myself).