Determining Surface Area

General discussion about 3D DCC and other topics
Post Reply
Frank1000
Posts: 349
Joined: 16 Oct 2011, 14:13
Skype: the2he

Determining Surface Area

Post by Frank1000 » 26 Jun 2018, 20:28

Hi,
is there a way in Softimage to see the surface area amount in units of one or multiple polygons ?

Regards,
Frank

Pedrito
Posts: 41
Joined: 21 Feb 2018, 12:46
Location: Zaragoza,Spain
Contact:

Re: Determining Surface Area

Post by Pedrito » 26 Jun 2018, 22:44

Screenshot_2018-06-26-22-41-57-301_com.android.chrome.png
Is a native atributte for polygon meshes, just an ice tree->get data->area for each polygon i think

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Determining Surface Area

Post by myara » 27 Jun 2018, 06:33

You could use that ICE attribute in a script
Object.ActivePrimitive.GetICEAttributeFromName( 'PolygonArea' )

Ex (for polygon faces and polygonmesh objects):

Code: Select all

#Python
from win32com.client import constants as c

xsi = Application
sel = xsi.Selection
total = 0

for obj in sel:
    # For faces
    if obj.Type == 'polySubComponent':
        CompCol = obj.SubComponent.ComponentCollection
        obj = obj.SubComponent.Parent3DObject
        attr = obj.ActivePrimitive.GetICEAttributeFromName( 'PolygonArea' )
        areaData = attr.DataArray
        for i in range(CompCol.Count):
            total += areaData[CompCol(i).index]
    # For polymesh objects
    elif obj.Type == 'polymsh':
        attr = obj.ActivePrimitive.GetICEAttributeFromName( 'PolygonArea' )
        areaData = attr.DataArray
        total += sum(areaData)
    else:
        LogMessage ( 'Not Supported', c.siError )
if total !=0 : LogMessage( total )
M.Yara
Character Modeler | Softimage Generalist (sort of)

Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests