Oasys.D3PLOT.SetNode class¶
Properties¶
- property SetNode.include: integer¶
The include file number in the model that the node set is in
- property SetNode.index: integer¶
The internal index for the node set in D3PLOT
- property SetNode.label: integer¶
The LS-DYNA label for the node set
- property SetNode.title: string¶
The title for the node 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 SetNode.total: integer¶
The total number of node items in the node set
- property SetNode.type: constant¶
The type for the node set (will be
Type.SETNODE
)
Static methods¶
- classmethod SetNode.First(model)¶
Returns the first node set in the model (or None if there are no node sets in the model)
- Parameters:
model (Model) –
Model
to get first node set in- Returns:
SetNode object
- Return type:
SetNode
Example
To get the first node set in model m:
s = Oasys.D3PLOT.SetNode.First(m)
- classmethod SetNode.FlagAll(model, flag)¶
Flags all of the node sets in the model with a defined flag
- Parameters:
model (Model) –
Model
that all the node sets will be flagged inflag (Flag) – Flag (see
AllocateFlag
) to set on the node sets- Returns:
No return value
- Return type:
None
Example
To flag all of the node sets with flag f in model m:
Oasys.D3PLOT.SetNode.FlagAll(m, f)
- classmethod SetNode.GetAll(model)¶
Gets all of the node sets in the model
- Parameters:
model (Model) –
Model
that all the node sets are in- Returns:
List of
SetNode
objects- Return type:
list
Example
To get all of the node sets in model m:
s = Oasys.D3PLOT.SetNode.GetAll(m)
- classmethod SetNode.GetFlagged(model, flag)¶
Gets all of the node sets in the model flagged with a defined flag
- Parameters:
model (Model) –
Model
that the flagged node sets are inflag (Flag) – Flag (see
AllocateFlag
) set on the node sets to get- Returns:
List of
SetNode
objects- Return type:
list
Example
To get all of the node sets flagged with flag f in model m:
Oasys.D3PLOT.SetNode.GetFlagged(m, f)
- classmethod SetNode.GetFromID(model, label)¶
Returns the SetNode object for node set in model with label (or None if it does not exist)
- Parameters:
model (Model) –
Model
to get node set inlabel (integer) – The LS-DYNA label for the node set in the model
- Returns:
SetNode object
- Return type:
SetNode
Example
To get the node set in model m with label 1000:
s = Oasys.D3PLOT.SetNode.GetFromID(m, 1000)
- classmethod SetNode.GetFromIndex(model, index)¶
Returns the SetNode object for node set in model with index (or None if it does not exist)
- Parameters:
model (Model) –
Model
to get node set inindex (integer) – The D3PLOT internal index in the model for node set
- Returns:
SetNode object
- Return type:
SetNode
Example
To get the node set in model m at index 50:
s = Oasys.D3PLOT.SetNode.GetFromIndex(m, 50)
- classmethod SetNode.Last(model)¶
Returns the last node set in the model (or None if there are no node sets in the model)
- Parameters:
model (Model) –
Model
to get last node set in- Returns:
SetNode object
- Return type:
SetNode
Example
To get the last node set in model m:
s = Oasys.D3PLOT.SetNode.Last(m)
- classmethod SetNode.Total(model)¶
Returns the total number of node sets in the model
- Parameters:
model (Model) –
Model
to get total in- Returns:
The number of node sets
- Return type:
integer
Example
To get the number of node sets in model m:
total = Oasys.D3PLOT.SetNode.Total(m)
- classmethod SetNode.UnflagAll(model, flag)¶
Unsets a defined flag on all of the node sets in the model
- Parameters:
model (Model) –
Model
that the defined flag for all node sets will be unset inflag (Flag) – Flag (see
AllocateFlag
) to unset on the node sets- Returns:
No return value
- Return type:
None
Example
To unset flag f on all of the node sets in model m:
Oasys.D3PLOT.SetNode.UnflagAll(m, f)
Instance methods¶
- SetNode.AllItems()¶
Returns all of the node items for the node set in the model
- Returns:
list of Node objects
- Return type:
list
Example
To get the node items in node set s:
items = s.AllItems()
- SetNode.ClearFlag(flag)¶
Clears a flag on a node set
- Parameters:
flag (Flag) – Flag (see
AllocateFlag
) to clear on the node set- Returns:
No return value
- Return type:
None
Example
To clear flag f on node set s:
s.ClearFlag()
- SetNode.Flagged(flag)¶
Checks if the node set is flagged or not
- Parameters:
flag (Flag) – Flag (see
AllocateFlag
) to test on the node set- Returns:
True if flagged, False if not
- Return type:
boolean
Example
To check if node set s has flag f set on it:
if s.Flagged(f): do_something..
- SetNode.Item(index)¶
Returns a node item from the node set in the model
- Parameters:
index (integer) – The index in the node set to get the node from (0 <= index <
total
)- Returns:
Node object
- Return type:
Node
Example
To get the 10th node in node set s:
items = s.Item(9)
- SetNode.Next()¶
Returns the next node set in the model (or None if there is not one)
- Returns:
SetNode object
- Return type:
SetNode
Example
To get the next node set after node set s:
s = s.Next()
- SetNode.Previous()¶
Returns the previous node set in the model (or None if there is not one)
- Returns:
SetNode object
- Return type:
SetNode
Example
To get the previous node set before node set s:
s = s.Previous()
- SetNode.SetFlag(flag)¶
Sets a flag on a node set
- Parameters:
flag (Flag) – Flag (see
AllocateFlag
) to set on the node set- Returns:
No return value
- Return type:
None
Example
To set flag f on node set s:
s.SetFlag(f)