Oasys.D3PLOT.SetSolid class

Properties

property SetSolid.include(read only): integer

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

property SetSolid.index(read only): integer

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

property SetSolid.label(read only): integer

The Ansys LS-DYNA label for the solid set

property SetSolid.model(read only): Model

The Model that the solid set is in

property SetSolid.title(read only): string

The title for the solid 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 SetSolid.total(read only): integer

The total number of solid items in the solid set

property SetSolid.type(read only): constant

The type for the solid set (will be Type.SET_SOLID)

Static methods

classmethod SetSolid.First(model)

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

Parameters:

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

Returns:

SetSolid object

Return type:

SetSolid

Example

To get the first solid set in model m:

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

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

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

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

Returns:

List of SetSolid objects or properties

Return type:

list

Example

To get all of the solid sets in model m:

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

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

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

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

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

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

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

Returns:

List of SetSolid objects or properties

Return type:

list

Example

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

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

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

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

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

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

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

Returns:

SetSolid object

Return type:

SetSolid

Example

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

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

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

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

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

Returns:

SetSolid object

Return type:

SetSolid

Example

To get the 51st solid set in model m:

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

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

Parameters:

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

Returns:

SetSolid object

Return type:

SetSolid

Example

To get the last solid set in model m:

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

Returns the total number of solid sets in the model

Parameters:

model (Model) – Model to get total in

Returns:

The number of solid sets

Return type:

integer

Example

To get the number of solid sets in model m:

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Instance methods

SetSolid.AllItems()

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

Returns:

list of Solid objects

Return type:

list

Example

To get the solid items in solid set s:

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

Clears a flag on a solid set

Parameters:

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

Returns:

No return value

Return type:

None

Example

To clear flag f on solid set s:

s.ClearFlag()
SetSolid.Flagged(flag)

Checks if the solid set is flagged or not

Parameters:

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

Returns:

True if flagged, False if not

Return type:

boolean

Example

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

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

Returns a solid item from the solid set in the model

Parameters:

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

Returns:

Solid object

Return type:

Solid

Example

To get the 10th solid in solid set s:

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

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

Returns:

SetSolid object

Return type:

SetSolid

Example

To get the next solid set after solid set s:

s = s.Next()
SetSolid.Previous()

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

Returns:

SetSolid object

Return type:

SetSolid

Example

To get the previous solid set before solid set s:

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

Sets a flag on a solid set

Parameters:

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

Returns:

No return value

Return type:

None

Example

To set flag f on solid set s:

s.SetFlag(f)