PhysicalProperties Object
Derived from:
Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/PhysicalProperties.h>
Description
The physical properties of a Component, Occurrence or BRepBody
Methods
classType |
Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType(). |
getPrincipalAxes |
Method that returns the principal axes. |
getPrincipalMomentsOfInertia |
Method that returns the moments of inertia about the principal axes. Unit for returned values is kg*cm^2. |
getRadiusOfGyration |
Method that returns the radius of gyration about the principal axes. Unit for returned values is cm. |
getRotationToPrincipal |
Gets the rotation from the world coordinate system of the target to the principal coordinate system. |
getXYZMomentsOfInertia |
Method that gets the moment of inertia about the world coordinate system. Unit for returned values is kg*cm^2. |
Properties
accuracy |
Returns the accuracy that was used for the calculation. |
area |
Gets the area in square centimeters. |
centerOfMass |
Returns the center of mass position |
density |
Gets the density in kilograms per cubic centimeter. |
isValid |
Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference. |
mass |
Gets the mass in kilograms. |
objectType |
This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.
It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType(): |
volume |
Gets the volume in the cubic centimeters. |
Accessed From
BRepBody.getPhysicalProperties,
BRepBody.physicalProperties,
Component.getPhysicalProperties,
Component.physicalProperties,
Design.physicalProperties,
FlatPatternComponent.getPhysicalProperties,
FlatPatternComponent.physicalProperties,
FlatPatternProduct.physicalProperties,
Occurrence.getPhysicalProperties,
Occurrence.physicalProperties,
WorkingModel.physicalProperties
Samples
Get Physical Properties API Sample |
Script that demonstrates getting physical properties using the API. When this script is run it will create a new document, build a simple model, and get the various physical properties from the model. |
Version
Introduced in version September 2015