The Node class gives you access to nodes 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:
| Name | Type | Description |
| data (read only) | real|array | Component data for a node passed as an argument to GetMultipleData. Note that data will only exist for the instance of the node passed to GetMultipleData. i.e. it is a local property stored on the specific instance. It is not stored in the D3PLOT database |
| include (read only) | integer | The include file number in the model that the node is in |
| index (read only) | integer | The internal index for the node in D3PLOT (starting at 0) |
| label (read only) | integer | The Ansys LS-DYNA label for the node |
| model (read only) | Model | The Model that the node is in |
| type (read only) | constant | The type for the node (will be Type.NODE) |
Detailed DescriptionThe Node class allows you to inspect nodes in a model. See the documentation below for more details. |
Details of functionsAcceleration()DescriptionReturns the acceleration for the node |
No arguments
ReturnsArray containing the nodal acceleration [Ax, Ay, Az] (or null if the value cannot be calculated) Return typearray |
ExampleTo return the acceleration of node n: var acc = n.Acceleration(); if (acc !== null) do_something...
|
Blank(window[GraphicsWindow])DescriptionBlanks the node in a graphics window |
GraphicsWindow) to blank the node in
ReturnsNo return value |
ExampleTo blank node n in graphics window g: n.Blank(g);
|
BlankAll(window[GraphicsWindow], model[Model]) [static]DescriptionBlanks all of the nodes in the model |
GraphicsWindow) to blank the nodes in
Model that all the nodes will be blanked in
ReturnsNo return value |
ExampleTo blank all of the nodes in model m, in graphics window gw: Node.BlankAll(gw, m);
|
BlankFlagged(window[GraphicsWindow], model[Model], flag[Flag]) [static]DescriptionBlanks all of the nodes in the model flagged with a defined flag |
GraphicsWindow) to blank the nodes in
Model that the flagged nodes will be blanked in
Flag (see AllocateFlag) set on the nodes to blank
ReturnsNo return value |
ExampleTo blank all of the nodes flagged with flag f in model m, in graphics window gw: Node.BlankFlagged(gw, m, f);
|
Blanked(window[GraphicsWindow])DescriptionChecks if the node is blanked in a graphics window or not |
GraphicsWindow) in which to check if the node is blanked
Returnstrue if blanked, false if not Return typeboolean |
ExampleTo check if node n is blanked in graphics window g: if (n.Blanked(g) ) do_something...
|
ClearFlag(flag[Flag])DescriptionClears a flag on a node |
Flag (see AllocateFlag) to clear on the node
ReturnsNo return value |
ExampleTo clear flag f on node n: n.ClearFlag();
|
Coordinates()DescriptionReturns the coordinates for the node |
No arguments
ReturnsArray containing the nodal coordinates [Cx, Cy, Cz] (or null if the value cannot be calculated) Return typearray |
ExampleTo return the coordinates of node n: var coords = n.Coordinates(); if (coords !== null) do_something...
|
Displacement()DescriptionReturns the displacement for the node |
No arguments
ReturnsArray containing the nodal displacement [Dx, Dy, Dz] (or null if the value cannot be calculated) Return typearray |
ExampleTo return the displacement of node n: var disp = n.Displacement(); if (disp !== null) do_something...
|
Elements(type[constant])DescriptionReturns the elements using this node |
The type of elements. Either Type.BEAM, Type.SHELL, Type.SOLID or Type.TSHELL
ReturnsArray containing the elements or null if there are no elements Return typearray |
ExampleTo return the shell elements using node n: var shells = n.Elements(Type.SHELL);
|
First(model[Model]) [static]DescriptionReturns the first node in the model (or null if there are no nodes in the model) |
Model to get first node in
ReturnsNode object Return typeNode |
ExampleTo get the first node in model m: var n = Node.First(m);
|
FlagAll(model[Model], flag[Flag]) [static]DescriptionFlags all of the nodes in the model with a defined flag |
Model that all the nodes will be flagged in
Flag (see AllocateFlag) to set on the nodes
ReturnsNo return value |
ExampleTo flag all of the nodes with flag f in model m: Node.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the node is flagged or not |
Flag (see AllocateFlag) to test on the node
Returnstrue if flagged, false if not Return typeboolean |
ExampleTo check if node n has flag f set on it: if (n.Flagged(f) ) do_something...
|
GetAll(model[Model], property (optional)[string]) [static]DescriptionReturns an array of Node objects or properties for all of the nodes in the model. If the optional property argument is not given then an array of Node objects is returned. If the property argument is given, that property value for each node is returned in the array instead of a Node object |
Model that all the nodes are in
Name for property to get for all nodes in the model
ReturnsArray of Node objects or properties Return typeArray |
GetData(component[constant], options (optional)[object])DescriptionReturns the value for a data component. |
Component constant to get data for
Object containing options for getting data. Can be any of:
Object has the following properties:
| Name | Type | Description |
| extra | integer | The extra data component number if component Component.SOX for solids, Component.BMX for beams or Component.SHX for shells and thick shells |
| ip | integer | Integration point number to get the data at (ip >= 1 or one of the constants Constant.TOP, Constant.MIDDLE or Constant.BOTTOM). If the integration point is not defined it will use the integration point defined on the current GUI "data" panel, which defaults to the middle surface for shells, thick shells, and solids, and Mag All for beams, but may vary if changed by an interactive user. If consistent output from a script is required, independent of any prior interactive activity, an explicit integration point or surface should be defined |
| op | integer | On plane integration point number for shells and thick shells (op >= 1 [default]) |
| referenceFrame | constant | The frame of reference to return values in. Either Constant.GLOBAL (default), Constant.LOCAL, Constant.CYLINDRICAL, Constant.USER_DEFINED or Constant.MATERIAL. This is only necessary for directional components (eg X stress) and then only when something other than the default Constant.GLOBAL coordinate system is to be used |
| user | integer | The user-defined component number if component Component.UNOS, Component.UNOV, Component.USSS, Component.USST, Component.UBMS or Component.UBMV |
GetFlagged(model[Model], flag[Flag], property (optional)[string]) [static]DescriptionGets all of the nodes in the model flagged with a defined flag. If the optional property argument is not given then an array of Node objects is returned. If the property argument is given, that property value for each node is returned in the array instead of a Node object |
Model that the flagged nodes are in
Flag (see AllocateFlag) set on the nodes to get
Name for property to get for all flagged nodes in the model
ReturnsArray of Node objects or properties Return typeArray |
GetFromID(model[Model], label[integer]) [static]DescriptionReturns the Node object for node in model with label (or null if it does not exist) |
Model to get node in
The Ansys LS-DYNA label for the node in the model
ReturnsNode object Return typeNode |
ExampleTo get the node in model m with label 1000: var n = Node.GetFromID(m, 1000);
|
GetFromIndex(model[Model], index[integer]) [static]DescriptionReturns the Node object for node in model with index (or null if it does not exist) |
Model to get node in
The D3PLOT internal index in the model for node, starting at 0.
ReturnsNode object Return typeNode |
ExampleTo get the 51st node in model m: var n = Node.GetFromIndex(m, 50);
|
GetMultipleData(component[constant], items[array], options (optional)[object]) [static]DescriptionReturns the value for a data component for multiple nodes. For each node a local property called data will be created
containing a number if a scalar component, or an array if a vector or tensor component (or null if the value cannot be calculated).
The data is also returned as an object. |
Component constant to get data for
Array of Node objects to get the data for. All of the nodes must be in the same model.
Object containing options for getting data. Can be any of:
Object has the following properties:
| Name | Type | Description |
| extra | integer | The extra data component number if component Component.SOX for solids, Component.BMX for beams or Component.SHX for shells and thick shells |
| ip | integer | Integration point number to get the data at (ip >= 1 or one of the constants Constant.TOP, Constant.MIDDLE or Constant.BOTTOM) |
| op | integer | On plane integration point number for shells and thick shells (op >= 1 [default]) |
| referenceFrame | constant | The frame of reference to return values in. Either Constant.GLOBAL (default), Constant.LOCAL, Constant.CYLINDRICAL, Constant.USER_DEFINED or Constant.MATERIAL. This is only necessary for directional components (eg X stress) and then only when something other than the default Constant.GLOBAL coordinate system is to be used |
| user | integer | The user-defined component number if component Component.UNOS, Component.UNOV, Component.USSS, Component.USST, Component.UBMS or Component.UBMV |
Last(model[Model]) [static]DescriptionReturns the last node in the model (or null if there are no nodes in the model) |
Model to get last node in
ReturnsNode object Return typeNode |
ExampleTo get the last node in model m: var n = Node.Last(m);
|
Next()DescriptionReturns the next node in the model (or null if there is not one) |
No arguments
ReturnsNode object Return typeNode |
ExampleTo get the next node after node n: n = n.Next();
|
Pick() [static]DescriptionAllows the user to pick a node from the screen |
No arguments
ReturnsNode object or null if cancelled Return typeNode |
ExampleTo pick a node: var n = Node.Pick();
|
Previous()DescriptionReturns the previous node in the model (or null if there is not one) |
No arguments
ReturnsNode object Return typeNode |
ExampleTo get the previous node before node n: n = n.Previous();
|
Select(flag[Flag]) [static]DescriptionSelects nodes using an object menu |
Flag (see AllocateFlag) to use when selecting nodes
ReturnsThe number of nodes selected or null if menu cancelled Return typeinteger |
ExampleTo select nodes, flagging those selected with flag f: var total = Node.Select(f);
|
SetFlag(flag[Flag])DescriptionSets a flag on a node |
Flag (see AllocateFlag) to set on the node
ReturnsNo return value |
ExampleTo set flag f on node n: n.SetFlag(f);
|
Total(model[Model]) [static]DescriptionReturns the total number of nodes in the model |
Model to get total in
ReturnsThe number of nodes Return typeinteger |
ExampleTo get the number of nodes in model m: var total = Node.Total(m);
|
Unblank(window[GraphicsWindow])DescriptionUnblanks the node in a graphics window |
GraphicsWindow) to unblank the node in
ReturnsNo return value |
ExampleTo unblank node n in graphics window g: n.Unblank(g);
|
UnblankAll(window[GraphicsWindow], model[Model]) [static]DescriptionUnblanks all of the nodes in the model |
GraphicsWindow) to unblank the nodes in
Model that all the nodes will be unblanked in
ReturnsNo return value |
ExampleTo unblank all of the nodes in model m, in graphics window gw: Node.UnblankAll(gw, m);
|
UnblankFlagged(window[GraphicsWindow], model[Model], flag[Flag]) [static]DescriptionUnblanks all of the nodes in the model flagged with a defined flag |
GraphicsWindow) to unblank the nodes in
Model that the flagged nodes will be unblanked in
Flag (see AllocateFlag) set on the nodes to unblank
ReturnsNo return value |
ExampleTo unblank all of the nodes flagged with flag f in model m, in graphics window gw: Node.UnblankFlagged(gw, m, f);
|
UnflagAll(model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the nodes in the model |
Model that the defined flag for all nodes will be unset in
Flag (see AllocateFlag) to unset on the nodes
ReturnsNo return value |
ExampleTo unset flag f on all of the nodes in model m: Node.UnflagAll(m, f);
|
Velocity()DescriptionReturns the velocity for the node |
No arguments
ReturnsArray containing the nodal velocity [Vx, Vy, Vz] (or null if the value cannot be calculated) Return typearray |
ExampleTo return the velocity of node n: var vel = n.Velocity(); if (disp !== null) do_something...
|