SetTshell class

The SetTshell class gives you access to thick shell sets in D3PLOT. More...

The D3PLOT JavaScript API provides many class constants, properties and methods. For Arup to be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:

Class functions

Member functions

SetTshell properties

Name Type Description
include (read only) integer The include file number in the model that the thick shell set is in
index (read only) integer The internal index for the thick shell set in D3PLOT (starting at 0)
label (read only) integer The Ansys LS-DYNA label for the thick shell set
model (read only) Model The Model that the thick shell set is in
title (read only) string The title for the thick shell set (or null if no title). This is only available if there is a ztf file for the model. If not null will be returned.
total (read only) integer The total number of thick shell items in the thick shell set
type (read only) constant The type for the thick shell set (will be Type.SET_TSHELL)

Detailed Description

The SetTshell class allows you to view sets in D3PLOT. There are various methods and properties available. This class requires a ztf file to be present for the model. See the documentation below for more details.

Details of functions

AllItems()

Description

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

Arguments

No arguments

Returns

array of Tshell objects

Return type

Array

Example

To get the thick shell items in thick shell set s:

var items = s.AllItems();


ClearFlag(flag[Flag])

Description

Clears a flag on a thick shell set

Arguments

  • flag (Flag)

    Flag (see AllocateFlag) to clear on the thick shell set

    Returns

    No return value

    Example

    To clear flag f on thick shell set s:

    s.ClearFlag();


    First(model[Model]) [static]

    Description

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

    Arguments

  • model (Model)

    Model to get first thick shell set in

    Returns

    SetTshell object

    Return type

    SetTshell

    Example

    To get the first thick shell set in model m:

    var s = SetTshell.First(m);


    FlagAll(model[Model], flag[Flag]) [static]

    Description

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

    Arguments

  • model (Model)

    Model that all the thick shell sets will be flagged in

  • flag (Flag)

    Flag (see AllocateFlag) to set on the thick shell sets

    Returns

    No return value

    Example

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

    SetTshell.FlagAll(m, f);


    Flagged(flag[Flag])

    Description

    Checks if the thick shell set is flagged or not

    Arguments

  • flag (Flag)

    Flag (see AllocateFlag) to test on the thick shell set

    Returns

    true if flagged, false if not

    Return type

    boolean

    Example

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

    if (s.Flagged(f) ) do_something...


    GetAll(model[Model], property (optional)[string]) [static]

    Description

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

    Arguments

  • model (Model)

    Model that all the thick shell sets are in

  • property (optional) (string)

    Name for property to get for all thick shell sets in the model

    Returns

    Array of SetTshell objects or properties

    Return type

    Array

    Example

    To get all of the thick shell sets in model m:

    var s = SetTshell.GetAll(m);

    To return an array containing the value of property 'foo' (for example 'label' for a thick shell set) for each thick shell set in model m:

    var a = SetTshell.GetAll(m, 'foo');


    GetFlagged(model[Model], flag[Flag], property (optional)[string]) [static]

    Description

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

    Arguments

  • model (Model)

    Model that the flagged thick shell sets are in

  • flag (Flag)

    Flag (see AllocateFlag) set on the thick shell sets to get

  • property (optional) (string)

    Name for property to get for all flagged thick shell sets in the model

    Returns

    Array of SetTshell objects or properties

    Return type

    Array

    Example

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

    SetTshell.GetFlagged(m, f);

    To return an array containing the value of property 'foo' (for example 'label' for a node) for all thick shell sets flagged with flag f in model m:

    var a = SetTshell.GetFlagged(m, f, 'foo');


    GetFromID(model[Model], label[integer]) [static]

    Description

    Returns the SetTshell object for thick shell set in model with label (or null if it does not exist)

    Arguments

  • model (Model)

    Model to get thick shell set in

  • label (integer)

    The Ansys LS-DYNA label for the thick shell set in the model

    Returns

    SetTshell object

    Return type

    SetTshell

    Example

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

    var s = SetTshell.GetFromID(m, 1000);


    GetFromIndex(model[Model], index[integer]) [static]

    Description

    Returns the SetTshell object for thick shell set in model with index (or null if it does not exist)

    Arguments

  • model (Model)

    Model to get thick shell set in

  • index (integer)

    The D3PLOT internal index in the model for thick shell set, starting at 0.

    Returns

    SetTshell object

    Return type

    SetTshell

    Example

    To get the 51st thick shell set in model m:

    var s = SetTshell.GetFromIndex(m, 50);


    Item(index[integer])

    Description

    Returns a thick shell item from the thick shell set in the model

    Arguments

  • index (integer)

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

    Returns

    Tshell object

    Return type

    Tshell

    Example

    To get the 10th thick shell in thick shell set s:

    var items = s.Item(9);


    Last(model[Model]) [static]

    Description

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

    Arguments

  • model (Model)

    Model to get last thick shell set in

    Returns

    SetTshell object

    Return type

    SetTshell

    Example

    To get the last thick shell set in model m:

    var s = SetTshell.Last(m);


    Next()

    Description

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

    Arguments

    No arguments

    Returns

    SetTshell object

    Return type

    SetTshell

    Example

    To get the next thick shell set after thick shell set s:

    s = s.Next();


    Previous()

    Description

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

    Arguments

    No arguments

    Returns

    SetTshell object

    Return type

    SetTshell

    Example

    To get the previous thick shell set before thick shell set s:

    s = s.Previous();


    SetFlag(flag[Flag])

    Description

    Sets a flag on a thick shell set

    Arguments

  • flag (Flag)

    Flag (see AllocateFlag) to set on the thick shell set

    Returns

    No return value

    Example

    To set flag f on thick shell set s:

    s.SetFlag(f);


    Total(model[Model]) [static]

    Description

    Returns the total number of thick shell sets in the model

    Arguments

  • model (Model)

    Model to get total in

    Returns

    The number of thick shell sets

    Return type

    integer

    Example

    To get the number of thick shell sets in model m:

    var total = SetTshell.Total(m);


    UnflagAll(model[Model], flag[Flag]) [static]

    Description

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

    Arguments

  • model (Model)

    Model that the defined flag for all thick shell sets will be unset in

  • flag (Flag)

    Flag (see AllocateFlag) to unset on the thick shell sets

    Returns

    No return value

    Example

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

    SetTshell.UnflagAll(m, f);