Determining Surface Area

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

Determining Surface Area

Post by Frank1000 » 26 Jun 2018, 18: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: 43
Joined: 21 Feb 2018, 11:46
Location: Zaragoza,Spain

Re: Determining Surface Area

Post by Pedrito » 26 Jun 2018, 20: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
You do not have the required permissions to view the files attached to this post.

User avatar
myara
Posts: 406
Joined: 28 Sep 2011, 08:33

Re: Determining Surface Area

Post by myara » 27 Jun 2018, 04: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)