Oasys.D3PLOT.SetShell class

Properties

property SetShell.include(read only): integer

The include file number in the model that the shell set is in

property SetShell.index(read only): integer

The internal index for the shell set in D3PLOT (starting at 0)

property SetShell.label(read only): integer

The Ansys LS-DYNA label for the shell set

property SetShell.model(read only): Model

The Model that the shell set is in

property SetShell.title(read only): string

The title for the shell set (or None if no title). This is only available if there is a ztf file for the model. If not None will be returned

property SetShell.total(read only): integer

The total number of shell items in the shell set

property SetShell.type(read only): constant

The type for the shell set (will be Type.SET_SHELL)

Static methods

classmethod SetShell.First(model)

Returns the first shell set in the model (or None if there are no shell sets in the model)

Parameters:

model (Model) – Model to get first shell set in

Returns:

SetShell object

Return type:

SetShell

Example

To get the first shell set in model m:

s = Oasys.D3PLOT.SetShell.First(m)
classmethod SetShell.FlagAll(model, flag)

Flags all of the shell sets in the model with a defined flag

Parameters:
  • model (Model) – Model that all the shell sets will be flagged in

  • flag (Flag) – Flag (see AllocateFlag) to set on the shell sets

Returns:

No return value

Return type:

None

Example

To flag all of the shell sets with flag f in model m:

Oasys.D3PLOT.SetShell.FlagAll(m, f)
classmethod SetShell.GetAll(model, property=Oasys.gRPC.defaultArg)

Returns a list of SetShell objects or properties for all of the shell sets in the model. If the optional property argument is not given then a list of SetShell objects is returned. If the property argument is given, that property value for each shell set is returned in the list instead of a SetShell object

Parameters:
  • model (Model) – Model that all the shell sets are in

  • property (string) – Optional. Name for property to get for all shell sets in the model

Returns:

List of SetShell objects or properties

Return type:

list

Example

To get all of the shell sets in model m:

s = Oasys.D3PLOT.SetShell.GetAll(m)

To return a list containing the value of property ‘foo’ (for example ‘label’ for a shell set) for each shell set in model m:

a = Oasys.D3PLOT.SetShell.GetAll(m, 'foo');
classmethod SetShell.GetFlagged(model, flag, property=Oasys.gRPC.defaultArg)

Gets all of the shell sets in the model flagged with a defined flag. If the optional property argument is not given then a list of SetShell objects is returned. If the property argument is given, that property value for each shell set is returned in the list instead of a SetShell object

Parameters:
  • model (Model) – Model that the flagged shell sets are in

  • flag (Flag) – Flag (see AllocateFlag) set on the shell sets to get

  • property (string) – Optional. Name for property to get for all flagged shell sets in the model

Returns:

List of SetShell objects or properties

Return type:

list

Example

To get all of the shell sets flagged with flag f in model m:

Oasys.D3PLOT.SetShell.GetFlagged(m, f)

To return a list containing the value of property ‘foo’ (for example ‘label’ for a node) for all shell sets flagged with flag f in model m:

a = Oasys.D3PLOT.SetShell.GetFlagged(m, f, 'foo');
classmethod SetShell.GetFromID(model, label)

Returns the SetShell object for shell set in model with label (or None if it does not exist)

Parameters:
  • model (Model) – Model to get shell set in

  • label (integer) – The Ansys LS-DYNA label for the shell set in the model

Returns:

SetShell object

Return type:

SetShell

Example

To get the shell set in model m with label 1000:

s = Oasys.D3PLOT.SetShell.GetFromID(m, 1000)
classmethod SetShell.GetFromIndex(model, index)

Returns the SetShell object for shell set in model with index (or None if it does not exist)

Parameters:
  • model (Model) – Model to get shell set in

  • index (integer) – The D3PLOT internal index in the model for shell set, starting at 0

Returns:

SetShell object

Return type:

SetShell

Example

To get the 51st shell set in model m:

s = Oasys.D3PLOT.SetShell.GetFromIndex(m, 50)
classmethod SetShell.Last(model)

Returns the last shell set in the model (or None if there are no shell sets in the model)

Parameters:

model (Model) – Model to get last shell set in

Returns:

SetShell object

Return type:

SetShell

Example

To get the last shell set in model m:

s = Oasys.D3PLOT.SetShell.Last(m)
classmethod SetShell.Total(model)

Returns the total number of shell sets in the model

Parameters:

model (Model) – Model to get total in

Returns:

The number of shell sets

Return type:

integer

Example

To get the number of shell sets in model m:

total = Oasys.D3PLOT.SetShell.Total(m)
classmethod SetShell.UnflagAll(model, flag)

Unsets a defined flag on all of the shell sets in the model

Parameters:
  • model (Model) – Model that the defined flag for all shell sets will be unset in

  • flag (Flag) – Flag (see AllocateFlag) to unset on the shell sets

Returns:

No return value

Return type:

None

Example

To unset flag f on all of the shell sets in model m:

Oasys.D3PLOT.SetShell.UnflagAll(m, f)

Instance methods

SetShell.AllItems()

Returns all of the shell items for the shell set in the model

Returns:

list of Shell objects

Return type:

list

Example

To get the shell items in shell set s:

items = s.AllItems()
SetShell.ClearFlag(flag)

Clears a flag on a shell set

Parameters:

flag (Flag) – Flag (see AllocateFlag) to clear on the shell set

Returns:

No return value

Return type:

None

Example

To clear flag f on shell set s:

s.ClearFlag()
SetShell.Flagged(flag)

Checks if the shell set is flagged or not

Parameters:

flag (Flag) – Flag (see AllocateFlag) to test on the shell set

Returns:

True if flagged, False if not

Return type:

boolean

Example

To check if shell set s has flag f set on it:

if s.Flagged(f):
    do_something..
SetShell.Item(index)

Returns a shell item from the shell set in the model

Parameters:

index (integer) – The index in the shell set to get the shell from (0 <= index < total)

Returns:

Shell object

Return type:

Shell

Example

To get the 10th shell in shell set s:

items = s.Item(9)
SetShell.Next()

Returns the next shell set in the model (or None if there is not one)

Returns:

SetShell object

Return type:

SetShell

Example

To get the next shell set after shell set s:

s = s.Next()
SetShell.Previous()

Returns the previous shell set in the model (or None if there is not one)

Returns:

SetShell object

Return type:

SetShell

Example

To get the previous shell set before shell set s:

s = s.Previous()
SetShell.SetFlag(flag)

Sets a flag on a shell set

Parameters:

flag (Flag) – Flag (see AllocateFlag) to set on the shell set

Returns:

No return value

Return type:

None

Example

To set flag f on shell set s:

s.SetFlag(f)