What causes AreaMassProperties to not compute for some surfaces even though it can be computed for the breps that they derive from and breps that are derived from them? The red and cyan breps were _ExtendSrf _Type=Line of the green, but only the AreaMassProperties of the underlying surface of the red one cannot be computed.
This also occurs in Rhino 5.
Thank you,
Steve
import Rhino
import rhinoscriptsyntax as rs
def main():
idBrep = rs.GetObject("Select surface", rs.filter.surface, preselect=True)
if idBrep is None: return
rgBrep0 = rs.coercebrep(idBrep)
s = 'Rhino.Geometry.AreaMassProperties.Compute(rgBrep0)'; print s+':',eval(s)
rgSrf = rgBrep0.Faces[0].UnderlyingSurface()
s = 'rgSrf.IsValid'; print s+':',eval(s)
s = 'Rhino.Geometry.AreaMassProperties.Compute(rgSrf)'; print s+':',eval(s)
rgBrep1 = rgSrf.ToBrep()
s = 'Rhino.Geometry.AreaMassProperties.Compute(rgBrep1)'; print s+':',eval(s)
if __name__ == '__main__': main()
Rhino.Geometry.AreaMassProperties.Compute(rgBrep0): <Rhino.Geometry.AreaMassProperties object at 0x000000000000013F [Rhino.Geometry.AreaMassProperties]>
rgSrf.IsValid: True
Rhino.Geometry.AreaMassProperties.Compute(rgSrf): None
Rhino.Geometry.AreaMassProperties.Compute(rgBrep1): <Rhino.Geometry.AreaMassProperties object at 0x0000000000000140 [Rhino.Geometry.AreaMassProperties]>
AreaMassProperties.3dm (44.9 KB)