FACEAREA function has me pulling my hair out! All I get is errors!

  1. Facearea() returns the area of both inner and outer faces of raw geometry (not groups or components) within the tested group or component
    2, need to divide by two to get outer (or outer) surface
  2. it returns square inches even if the attribute dialog is cm

the first file shows a group of a 1m square, the attributes show the return and how to manipulate them to suit your need
facearea_one meter square.skp (16.0 KB)

Next we consider a material, so divide the group’s raw geometry with a diagonal, paint one side, top 0020_Red

facearea_one meter square _top half red.skp (17.6 KB)

okay so for a group or component, Facearea returns area in square inches painted with the given material within that group or component

What if I go into the group or component and move the raw geometry? the attributes don’t update unless we do a redraw command on the closed object
Lets say we expose the Size attributes and change say lenX to 300cm? again the attributes don’t update, even with an external redraw. in this case one need to scale definition and redraw

facearea_one meter square _changing the shape.skp (42.7 KB)

you can make short cuts to these operations via windows / preferences /shortcuts

other data worth looking at…
the material from the material broswer must be in the model. However color made up from some of sketchups known colors Class: Sketchup::Color — SketchUp Ruby API Documentation.
or RGB values, or hexidemical values can be directly placed in the material attribute, this will paint all faces of the component or group, but as per the above reference to 44688/32 such can be exploded to make facearea give a result

1 Like