Gets various Component output data for panel Components.
Important
This data is only available after the panel has been analyzed.
def ExtractMargins(component):
"""Extract margins and analysis result data from a component."""
pcrUnitWeight = 2
pcrMOS = 10
unit_weight = component.ResultPanel(pcrUnitWeight)
margin = component.ResultPanel(pcrMOS)
Analysis results are available per Zone. Several different types of Analysis results exist, depending on whether the Analysis was run on a concept (e.g. blade stiffened panel) or an object (e.g. web of a blade stiffened panel).
import hyperx as hx
def ExtractMargins(zone: hx.Zone):
"""Extract margins and analysis result data from a zone."""
analysisResults = zone.GetAllResults()
for result in analysisResults:
margin = result.Margin
analysisDefinition = result.AnalysisDefinition
loadCaseId = result.LoadCaseId
limitUltimate = result.LimitUltimate
if isinstance(result, hx.ZoneAnalysisObjectResult):
objectId = result.ObjectId
elif isinstance(result, hx.ZoneAnalysisConceptResult):
conceptId = result.ConceptId
else:
pass # Result is not for a particular object or concept