I want to measure the area of a model as if it was in 2d, for example if I had a 3d model of a car how could I measure the frontal area? In this measurement things like the length of the bonnet would not matter, it is literally as if counting the black pixels in this image assuming I could know how much area a pixel was and that the windscreen and lights were included in the count.
Here's a Geometry Nodes solution. It lets you select the direction you wanna flatten the object in to get an outline of it, and displays the face area in the spreadsheet under the Viewer Node > Face section.
It scales the geometry to
0 in the preferred direction, and creates a circle around the now flattened geometry. Then, it extrudes the flattened geometry to make sure raycasting will work reliably and moves all points of the circle inwards until they hit something, resulting in a clean, single-face outline of the mesh.
It is not perfect: it depends on the resolution of the circle (which is exposed as a setting in the modifier window), and it also assumes the object is one continuous mesh, but these might not be too big of a deal for most use cases like yours.
As Gorgious points out, concave parts of the geometries can stay hidden from the rays as well. In the case of a car, that seems to cause problem with the wheels, for instance:
another one, this is using raycast on a grid...
blend but with a monkey