Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show only
|
Search instead for
Did you mean:
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.Translate
Submitted byAnonymouson06-12-201611:35 AM
Status:
Implemented
Center of Gravity, Center of Moments
Please add the ability to show the Center of Gravity and Moments of Inertal for an object and components. These basic values are critical for moving parts and designs!
If you want it to be displayed on the model, eg: something like a dot to represent CoM & CoG, you'll have to wait a little longer, I read somewhere that it's coming but right now we have to settle for the text version as roambotics_scott mentioned
Thank you for your idea, the work to implement the ability to show and measure to the center of gravity will be soon be started. Once completed the idea will be changed to implemented.
I'd add that it's in there.. but only in the sense that it gives you coordinates. Without a script, you don't get a graphical point for the CM (and with a script, you don't get one that dynamically updates with the model) so it's 90% there but still kinda useless @promm
Also / closely related: we get the moments of inertia in properties, but really need zero to three axes of non-degenerate moments (or an axis plus a plane for the case with 1-dimensional non-degenerate and 2-dimensional degenerate moments; or just the CM point without any axes or planes for the 3-dimensionally degenerate case)
The way this should work is that along with the origin, there should be an automatically updated point representation for the CM and appropriate combination of 3 axes, 1 axis + 1 plane, or nothing, for the cases of 3 non-degenerate moments, 2 degenerate moments, or 3 degenerate moments, respectively. Those should always be there for every body and component without requiring the user to explicitly do anything, and they should automatically update with any changes and be timeline aware. When degeneracy changes, the user should be notified and appropriate constraints broken or modified as necessary
#Mike Aubry (w/ true credit going to Sebastian Morales and Brian Ekins)
#Description - This Fusion 360 Script allows you to create a construction point where the center of mass is for
# the top level component. This is especially useful for balancing applications.
import adsk.core, adsk.fusion, adsk.cam, traceback
app = adsk.core.Application.get()
if app:
ui = app.userInterface
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
# Get all components in the active design.
product = app.activeProduct
design = adsk.fusion.Design.cast(product)
title = 'Create Center of Mass Point'
if not design:
ui.messageBox('No active Fusion design', title)
return
# Get the root component of the active design
rootComp = design.rootComponent
# Get physical properties from component (high accuracy)
physicalProperties = rootComp.getPhysicalProperties(adsk.fusion.CalculationAccuracy.HighCalculationAccuracy)
# Get center of mass from physical properties
cog = physicalProperties.centerOfMass
# Check to see if a base feature named "Center of Gravities" exists.
baseFeature = rootComp.features.itemByName('Center of Gravities')
if not baseFeature:
# Create a new base feature.
baseFeature = rootComp.features.baseFeatures.add()
baseFeature.name = 'Center of Gravities'
# Begin editing the base feature.
baseFeature.startEdit()
# Create a construction point at the COG position.
constructionPoints = rootComp.constructionPoints
pointInput = constructionPoints.createInput()
pointInput.setByPoint(cog)
pointInput.targetBaseOrFormFeature = baseFeature
constPoint = constructionPoints.add(pointInput)
constPoint.name = 'Center of Gravity'
# End the base feature edit.
baseFeature.finishEdit()
else:
# Check that the "Center of Gravity construction point exists.
cogPoint = rootComp.constructionPoints.itemByName('Center of Gravity')
# Because of a problem with updating an existing point, this current deletes
# the existing point so the code in the "else" is never executed.
if cogPoint:
cogPoint.deleteMe()
cogPoint = None
if not cogPoint:
# Create the construction point.
# Begin editing the base feature.
baseFeature.startEdit()
# Create a construction point at the COG position.
constructionPoints = rootComp.constructionPoints
pointInput = constructionPoints.createInput()
pointInput.setByPoint(cog)
pointInput.targetBaseOrFormFeature = baseFeature
constPoint = constructionPoints.add(pointInput)
constPoint.name = 'Center of Gravity'
# End the base feature edit.
baseFeature.finishEdit()
else:
# Edit the existing construction point.
pointDef = adsk.fusion.ConstructionPointPointDefinition.cast(cogPoint.definition)
baseFeature.startEdit()
pointDef.pointEntity = cog
baseFeature.finishEdit()
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
need to balance my model like ...yesterday!
I found this code but it doesn't seem to do anything in the current nov 9 version of fusion... can anyone tell me why?
I just copied and pasted the program above and with one small change it ran as expected. The last line needs to be indented. The last three lines should look like this:
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))