Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5860

Get Volume Centroid without creating the point

$
0
0

@eric.bunn wrote:

Hi,

I’m trying to pull the volume centroid of polysurface using the code below and I get the following error: “Message: getset_descriptor is not callable”. Can anyone explain what I am doing wrong. I only want the coordinates and not the physical point (the Rhino Command creates a physical point). Yes I know I can get the bounding box and calculate it myself. If I can do it in less code that would be better for me.

Thanks,

Eric

import Rhino
import rhinoscriptsyntax as rs

obj = rs.GetObject(“Select”,0)
pt = Rhino.Geometry.VolumeMassProperties.Centroid(obj)
print(pt)

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 5860

Latest Images

Trending Articles



Latest Images