FigureOfMerit#

class ansys.stk.core.stkobjects.FigureOfMerit#

Bases: ISTKObject, ILifetimeInformation

Figure of Merit properties.

Overview#

set_definition_type

Set the definition type.

is_definition_type_supported

Get a value indicating whether the specified type can be used.

set_access_constraint_definition

Set the access constraint definition.

set_access_constraint_definition_name

Set the access constraint definition by name.

set_scalar_calculation_definition

Set the scalar calculation definition.

definition_type

Definition type for the FOM.

definition_supported_types

Return an array of valid choices.

definition

Definition properties of the FOM.

graphics

2D graphics properties of the FOM.

graphics_3d

3D graphics properties of the FOM.

grid_inspector

Get the Grid inspector tool.

Examples#

Configure the Contours of the figure of merit (FOM) and define a color ramp

# CoverageDefinition coverage: Coverage object
# FigureOfMerit fom: Figure Of Merit object
satisfaction = coverage.graphics.static
satisfaction.show_region = False
Animation = fom.graphics_3d.animation_graphics_3d_settings
Animation.show_graphics = False
VOcontours = fom.graphics_3d.static
VOcontours.show_graphics = True
contours = fom.graphics.static.contours
contours.show_graphics = True
contours.contour_type = FigureOfMeritGraphics2DContourType.SMOOTH_FILL
contours.color_method = FigureOfMeritGraphics2DColorMethod.COLOR_RAMP
contours.level_attributes.remove_all()

contours.level_attributes.add_level_range(590, 660, 10)  # Start, Start, Step
contours.ramp_color.start_color = Colors.Red
contours.ramp_color.end_color = Colors.Blue

Create a new Figure of Merit of type Access Duration

# CoverageDefinition coverage: Coverage object
fom = coverage.children.new(STKObjectType.FIGURE_OF_MERIT, "AccessDuration")
fom.set_definition_type(FigureOfMeritDefinitionType.ACCESS_DURATION)
fom.definition.set_compute_type(FigureOfMeritCompute.MAXIMUM)

Import detail#

from ansys.stk.core.stkobjects import FigureOfMerit

Property detail#

property FigureOfMerit.definition_type: FigureOfMeritDefinitionType#

Definition type for the FOM.

property FigureOfMerit.definition_supported_types: list#

Return an array of valid choices.

property FigureOfMerit.definition: IFigureOfMeritDefinition#

Definition properties of the FOM.

property FigureOfMerit.graphics: FigureOfMeritGraphics#

2D graphics properties of the FOM.

property FigureOfMerit.graphics_3d: FigureOfMeritGraphics3D#

3D graphics properties of the FOM.

property FigureOfMerit.grid_inspector: FigureOfMeritGridInspector#

Get the Grid inspector tool.

Method detail#

FigureOfMerit.set_definition_type(self, defn: FigureOfMeritDefinitionType) None#

Set the definition type.

Parameters:

defn : FigureOfMeritDefinitionType

Returns:

None

FigureOfMerit.is_definition_type_supported(self, defn: FigureOfMeritDefinitionType) bool#

Get a value indicating whether the specified type can be used.

Parameters:

defn : FigureOfMeritDefinitionType

Returns:

bool

FigureOfMerit.set_access_constraint_definition(self, constraint_name: FigureOfMeritConstraintName) FigureOfMeritDefinitionAccessConstraint#

Set the access constraint definition.

Parameters:

constraint_name : FigureOfMeritConstraintName

Returns:

FigureOfMeritDefinitionAccessConstraint

FigureOfMerit.set_access_constraint_definition_name(self, constraint_name: str) FigureOfMeritDefinitionAccessConstraint#

Set the access constraint definition by name.

Parameters:

constraint_name : str

Returns:

FigureOfMeritDefinitionAccessConstraint

FigureOfMerit.set_scalar_calculation_definition(self, calc_scalar: str) FigureOfMeritDefinitionScalarCalculation#

Set the scalar calculation definition.

Parameters:

calc_scalar : str

Returns:

FigureOfMeritDefinitionScalarCalculation