Get Area of trimmed Face


In Python I’m trying to get the Area of the trimmes face of a Brep.
However for now all I cab find is, which gives the area of the untrimmed face.

            Area = Rhino.Geometry.AreaMassProperties
            dblArea = Area.Compute(srf).Area

As Mitch pointed out; the code can be condensed to this:

dblArea = Rhino.Geometry.AreaMassProperties.Compute(srf).Area

How would I get the area of the trimmed surface only?

EDIT: I think I might have solved this myself.
From the Brep I was getting the surface list : Brep.Faces

These are apparently the untimmed versions of the NURBS surfaces.
When passing the Brep.Faces list I did get the Area’s of the trimmed faces.


Hi Willem,

I don’t know if it’s the best way, but I do this:

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino

ID=rs.GetObject("Select Brep",8+16,True)
for i in range(brep.Faces.Count):
    print area

Cheers, --Mitch

Hi Mitch,

Thanks, my coding is still a little convoluted due to many iterations and various attempts to get something to work. Good you just pointed out this can be condensed. As you might know I’m still working on getting Python and Rhino Common basics in my head.