Planet#

class ansys.stk.core.stkobjects.Planet#

Bases: ISTKObject, ILifetimeInformation

Class defining the Planet object.

Overview#

graphics

Get the planet’s 2D Graphics properties.

access_constraints

Get the constraints imposed on the planet.

graphics_3d

Get the planet’s 3D Graphics properties.

position_source

The criterion for defining the planet. A member of the PlanetPositionSourceType enumeration.

position_source_data

Get definitional data for the planet.

common_tasks

Common Tasks associated with the planet.

Examples#

Modify a Planet’s 2D Properties

# Planet planet: Planet object
planet2D = planet.graphics
planet2D.color = Colors.Red
planet2D.inherit = False
planet2D.show_orbit = True
planet2D.show_sub_planet_point = False
planet2D.show_sub_planet_label = False

Create a New Planet

# Scenario scenario: Scenario object
planet = scenario.children.new(STKObjectType.PLANET, "Mars")
planet.common_tasks.set_position_source_central_body("Mars", EphemSourceType.JPL_DEVELOPMENTAL_EPHEMERIS)

Import detail#

from ansys.stk.core.stkobjects import Planet

Property detail#

property Planet.graphics: PlanetGraphics#

Get the planet’s 2D Graphics properties.

property Planet.access_constraints: AccessConstraintCollection#

Get the constraints imposed on the planet.

property Planet.graphics_3d: PlanetGraphics3D#

Get the planet’s 3D Graphics properties.

property Planet.position_source: PlanetPositionSourceType#

The criterion for defining the planet. A member of the PlanetPositionSourceType enumeration.

property Planet.position_source_data: IPositionSourceData#

Get definitional data for the planet.

property Planet.common_tasks: PlanetCommonTasks#

Common Tasks associated with the planet.