CompositeDisplayCondition#

class ansys.stk.core.graphics.CompositeDisplayCondition#

Bases: IDisplayCondition

A composite of display conditions combined using a binary logic operation. For example, several time interval display condition objects can be added to a composite…

Overview#

item

Return the condition at the given zero-based index.

reserve

Request enough memory for the composite to contain at least count display conditions. count will not be affected but capacity may be.

add_with_negate

Add a display condition to the end of the composite.

add

Add a display condition to the end of the composite.

insert_with_negate

Insert a display condition at the given zero-based index, shifting existing display conditions.

insert

Insert a display condition at the given zero-based index, shifting existing display conditions.

remove

Remove a display condition from the composite.

remove_at

Remove the display condition at the given zero-based index, shifting existing display conditions.

clear

Remove all display conditions from the composite.

get_negate

Determine if a logical not operation is applied to a display condition in the composite.

set_negate

Set if a logical not operation is applied to a display condition in the composite when the composite is evaluated.

get_negate_at

Determine if a logical not operation is applied to a display condition in the composite.

set_negate_at

Set if a logical not operation is applied to a display condition in the composite when the composite is evaluated.

count

Get the number of display conditions in the composite.

capacity

Get the number of display conditions for which memory has been allocated. This will always be greater or equal to count.

logic_operation

Get or set the binary logic operation applied to all display conditions in the composite when the composite is evaluated. To combine logical and and or operations in the same expression, create composites containing composites.

_new_enum

Return an enumerator that iterates through the collection.

Examples#

Display a Primitive During an Interval

# Scenario scenario: Scenario object
# ModelPrimitive model: Graphics Primitive
manager = scenario.scene_manager
composite = manager.initializers.composite_display_condition.initialize()
root.units_preferences.item("DateFormat").set_current_unit("EpSec")
start = root.conversion_utility.new_date("EpSec", str(scenario.start_time))
stop = root.conversion_utility.new_date("EpSec", str(scenario.start_time + 600))
timeInterval = manager.initializers.time_interval_display_condition.initialize_with_times(start, stop)
composite.add(timeInterval)
model.display_condition = composite

Import detail#

from ansys.stk.core.graphics import CompositeDisplayCondition

Property detail#

property CompositeDisplayCondition.count: int#

Get the number of display conditions in the composite.

property CompositeDisplayCondition.capacity: int#

Get the number of display conditions for which memory has been allocated. This will always be greater or equal to count.

property CompositeDisplayCondition.logic_operation: BinaryLogicOperation#

Get or set the binary logic operation applied to all display conditions in the composite when the composite is evaluated. To combine logical and and or operations in the same expression, create composites containing composites.

property CompositeDisplayCondition._new_enum: EnumeratorProxy#

Return an enumerator that iterates through the collection.

Method detail#

CompositeDisplayCondition.item(self, index: int) IDisplayCondition#

Return the condition at the given zero-based index.

Parameters:

index : int

Returns:

IDisplayCondition

CompositeDisplayCondition.reserve(self, count: int) None#

Request enough memory for the composite to contain at least count display conditions. count will not be affected but capacity may be.

Parameters:

count : int

Returns:

None

CompositeDisplayCondition.add_with_negate(self, display_condition: IDisplayCondition, negate: bool) None#

Add a display condition to the end of the composite.

Parameters:

display_condition : IDisplayCondition

negate : bool

Returns:

None

CompositeDisplayCondition.add(self, display_condition: IDisplayCondition) None#

Add a display condition to the end of the composite.

Parameters:

display_condition : IDisplayCondition

Returns:

None

CompositeDisplayCondition.insert_with_negate(self, index: int, display_condition: IDisplayCondition, negate: bool) None#

Insert a display condition at the given zero-based index, shifting existing display conditions.

Parameters:

index : int

display_condition : IDisplayCondition

negate : bool

Returns:

None

CompositeDisplayCondition.insert(self, index: int, display_condition: IDisplayCondition) None#

Insert a display condition at the given zero-based index, shifting existing display conditions.

Parameters:

index : int

display_condition : IDisplayCondition

Returns:

None

CompositeDisplayCondition.remove(self, display_condition: IDisplayCondition) None#

Remove a display condition from the composite.

Parameters:

display_condition : IDisplayCondition

Returns:

None

CompositeDisplayCondition.remove_at(self, index: int) None#

Remove the display condition at the given zero-based index, shifting existing display conditions.

Parameters:

index : int

Returns:

None

CompositeDisplayCondition.clear(self) None#

Remove all display conditions from the composite.

Returns:

None

CompositeDisplayCondition.get_negate(self, display_condition: IDisplayCondition) bool#

Determine if a logical not operation is applied to a display condition in the composite.

Parameters:

display_condition : IDisplayCondition

Returns:

bool

CompositeDisplayCondition.set_negate(self, display_condition: IDisplayCondition, negate: bool) None#

Set if a logical not operation is applied to a display condition in the composite when the composite is evaluated.

Parameters:

display_condition : IDisplayCondition

negate : bool

Returns:

None

CompositeDisplayCondition.get_negate_at(self, index: int) bool#

Determine if a logical not operation is applied to a display condition in the composite.

Parameters:

index : int

Returns:

bool

CompositeDisplayCondition.set_negate_at(self, index: int, negate: bool) None#

Set if a logical not operation is applied to a display condition in the composite when the composite is evaluated.

Parameters:

index : int

negate : bool

Returns:

None