AccessConstraintCollection#

class ansys.stk.core.stkobjects.AccessConstraintCollection#

Collection of access constraints.

Overview#

item

Return an AccessConstraint interface using an index.

add_constraint

Add a constraint to the Constraint Collection.

remove_constraint

Remove a constraint from the collection.

get_active_constraint

Retrieve the active constraint.

is_constraint_active

Given an AccessConstraintType enum, informs the user if the constraint is active.

available_constraints

Return a rectangular two-dimensional array of available constraints. A row of the array consists of two elements where the first element is a symbolic name of the constraint and the second is a corresponding enumeration value.

is_constraint_supported

Is the constraint supported for this object.

is_named_constraint_supported

Is the named constraint supported for this object.

add_named_constraint

Add a constraint with the given name to the collection.

remove_named_constraint

Do not use this method, as it is deprecated. Use RemoveNamedConstraintEx instead. Removes a constraint with the given name from the collection.

is_named_constraint_active

Given a constraint name, returns whether the specified constraint is active.

get_active_named_constraint

Retrieve an active constraint with the given name.

remove_named_constraint_ex

Remove a constraint with the given name from the collection.

count

Return the size of the collection.

_new_enum

Enumerate the AccessConstraint items in the collection.

analysis_workbench_constraints

Return a AccessConstraintAnalysisWorkbenchCollection constraint used to access angle, vector and condition constraint.

use_preferred_maximum_time_step

Flag indicating that the preferred max time step should be used in access computations.

preferred_maximum_time_step

Maximum time step to be considered in access computations. New access computations consider this value when determining a suitable maximum step size.

Examples#

Get handle to the object access constraints

# Satellite satellite: Satellite object
accessConstraints = satellite.access_constraints

Import detail#

from ansys.stk.core.stkobjects import AccessConstraintCollection

Property detail#

property AccessConstraintCollection.count: int#

Return the size of the collection.

property AccessConstraintCollection._new_enum: EnumeratorProxy#

Enumerate the AccessConstraint items in the collection.

property AccessConstraintCollection.analysis_workbench_constraints: AccessConstraintAnalysisWorkbenchCollection#

Return a AccessConstraintAnalysisWorkbenchCollection constraint used to access angle, vector and condition constraint.

property AccessConstraintCollection.use_preferred_maximum_time_step: bool#

Flag indicating that the preferred max time step should be used in access computations.

property AccessConstraintCollection.preferred_maximum_time_step: float#

Maximum time step to be considered in access computations. New access computations consider this value when determining a suitable maximum step size.

Method detail#

AccessConstraintCollection.item(self, index: int) IAccessConstraint#

Return an AccessConstraint interface using an index.

Parameters:

index : int

Returns:

IAccessConstraint

AccessConstraintCollection.add_constraint(self, constraint: AccessConstraintType) IAccessConstraint#

Add a constraint to the Constraint Collection.

Parameters:

constraint : AccessConstraintType

Returns:

IAccessConstraint

AccessConstraintCollection.remove_constraint(self, constraint: AccessConstraintType) None#

Remove a constraint from the collection.

Parameters:

constraint : AccessConstraintType

Returns:

None

AccessConstraintCollection.get_active_constraint(self, constraint: AccessConstraintType) IAccessConstraint#

Retrieve the active constraint.

Parameters:

constraint : AccessConstraintType

Returns:

IAccessConstraint

AccessConstraintCollection.is_constraint_active(self, constraint: AccessConstraintType) bool#

Given an AccessConstraintType enum, informs the user if the constraint is active.

Parameters:

constraint : AccessConstraintType

Returns:

bool

AccessConstraintCollection.available_constraints(self) list#

Return a rectangular two-dimensional array of available constraints. A row of the array consists of two elements where the first element is a symbolic name of the constraint and the second is a corresponding enumeration value.

Returns:

list

AccessConstraintCollection.is_constraint_supported(self, constraint: AccessConstraintType) bool#

Is the constraint supported for this object.

Parameters:

constraint : AccessConstraintType

Returns:

bool

AccessConstraintCollection.is_named_constraint_supported(self, cnstr_name: str) bool#

Is the named constraint supported for this object.

Parameters:

cnstr_name : str

Returns:

bool

AccessConstraintCollection.add_named_constraint(self, cnstr_name: str) IAccessConstraint#

Add a constraint with the given name to the collection.

Parameters:

cnstr_name : str

Returns:

IAccessConstraint

AccessConstraintCollection.remove_named_constraint(self, cnstr_name: str) None#

Do not use this method, as it is deprecated. Use RemoveNamedConstraintEx instead. Removes a constraint with the given name from the collection.

Parameters:

cnstr_name : str

Returns:

None

AccessConstraintCollection.is_named_constraint_active(self, cnstr_name: str) bool#

Given a constraint name, returns whether the specified constraint is active.

Parameters:

cnstr_name : str

Returns:

bool

AccessConstraintCollection.get_active_named_constraint(self, cnstr_name: str) IAccessConstraint#

Retrieve an active constraint with the given name.

Parameters:

cnstr_name : str

Returns:

IAccessConstraint

AccessConstraintCollection.remove_named_constraint_ex(self, cnstr_name: str) None#

Remove a constraint with the given name from the collection.

Parameters:

cnstr_name : str

Returns:

None