The InterpolationSpotweld class gives you access to constrained Interpolation Spotweld (spr3) cards in PRIMER. More...
The PRIMER 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 |
| alpha1 | real/integer | Scaling factor alpha 1. Function ID if MODEL > 10. |
| alpha2 | real | Plastic initiation displacement scaling factor alpha2. |
| alpha3 | real | Plastic initiation displacement scaling factor alpha3. |
| bdmodel | real | Material behaviour and damage model. Values can be InterpolationSpotweld.SPR3, InterpolationSpotweld.SPR4, InterpolationSpotweld.SPR3_MAT_PARAM, InterpolationSpotweld.SPR4_MAT_PARAM, InterpolationSpotweld.SPR3_MAT_PARAM_MOD or InterpolationSpotweld.SPR4_MAT_PARAM_MOD |
| beta | real | Exponent for plastic potential beta 1. Function ID if bdmodel > 10. |
| beta2 | real | Exponent for plastic initiation displacement beta2. |
| beta3 | real | Exponent for plastic initiation displacement beta3. |
| defc | real | Fading energy for damage. Function ID if bdmodel > 30. |
| dens | real | Spotweld density (necessary for time step calculation). |
| exfc | real | Failure function exponent. Function ID if bdmodel > 30. |
| exists (read only) | logical | true if interpolation spotweld exists, false if referred to but not defined. |
| ffb | real | Resultant bending force at failure. Function ID if bdmodel > 30. |
| ffn | real | Resultant normal force at failure. Function ID if bdmodel > 30. |
| ffs | real | Resultant shear force at failure. Function ID if bdmodel > 30. |
| gamma | real | Scaling factor. Function ID if bdmodel > 30. |
| heading | string | Title |
| include | integer | The Include file number that the interpolation spotweld is in. |
| intp | real | Flag for interpolation. Values can be InterpolationSpotweld.LINEAR, InterpolationSpotweld.UNIFORM or InterpolationSpotweld.INVERSE. |
| lcdexp | integer | Load curve ID for damage exponent vs. mode mixity |
| lcf | integer | Load curve ID describing force versus plastic displacement. |
| lcupf | integer | Load curve ID describing plastic initiation displacement versus mode mixity. Required only for material behaviour and damage models InterpolationSpotweld.SPR3, InterpolationSpotweld.SPR3_MAT_PARAM or InterpolationSpotweld.SPR3_MAT_PARAM_MOD. |
| lcupr | integer | Load curve ID describing plastic rupture displacement versus mode mixity. Required only for material behaviour and damage models InterpolationSpotweld.SPR3, InterpolationSpotweld.SPR3_MAT_PARAM or InterpolationSpotweld.SPR3_MAT_PARAM_MOD. |
| mfsfc | real | Scaling factor for torsion term in resultant shear force. Function ID if bdmodel > 30. |
| model (read only) | integer | The Model number that the interpolation spotweld is in. |
| mrn | real | Proportionality factor for dependency RN. |
| mrs | real | Proportionality factor for dependency RS. |
| npfc | real | Plastic displacement offset for damage initiation. Function ID if bdmodel > 30. |
| nsid | integer | Node Set ID of spotweld location nodes. |
| pid1 | integer | Part ID of first sheet. |
| pid2 | integer | Part ID |
| pidvb | real | Part ID for visualization beams representing SPR3 in post-processing. |
| r | real | Spotweld Radius. |
| rn | real/integer | Tensile strength factor or negative Load curve with ID giving as a function of peel ratio . Function ID if MODEL > 10. |
| rs | real | Shear strength factor. Function ID if bdmodel > 10. |
| scarn | real | Scale factor for tensile strength factor RN |
| scars | real | Scale factor for tensile strength factor RS |
| sropt | real | Shear rotation option. |
| stiff | real/integer | Elastic stiffness OR material ID if less than 0. Function ID if MODEL > 10. |
| stiff2 | real | Elastic shear stiffness. Function ID if bdmodel > 30. |
| stiff3 | real | Elastic bending stiffness. Function ID if bdmodel > 30. |
| stiff4 | real | Elastic torsional stiffness. Function ID if bdmodel > 30. |
| stifp | real | Plastic stiffness. Function ID if bdmodel > 30. |
| thick | real | Total thickness of both sheets. |
| upfn | real | Plastic initiation displacement in normal direction. |
| upfs | real | Plastic initiation displacement in shear direction. |
| uprn | real | Plastic rupture displacement in normal direction. |
| uprs | real | Plastic rupture displacement in shear direction. |
Constructornew InterpolationSpotweld(Model[Model], pid1[integer], pid2[integer], nsid[integer], heading (optional)[string])DescriptionCreate a new InterpolationSpotweld object. |
Model that constrained interpolation spotweld will be created in
Part ID of first sheet.
Part ID of second sheet.
Node Set ID of spotweld location nodes.
Title for the constrained interpolation spotweld
ReturnsInterpolationSpotweld object Return typeInterpolationSpotweld |
ExampleTo create a new constrained interpolation spotweld in model m with first sheet 100, second sheet 200 and spotweld node set 100 var s = new InterpolationSpotweld(m, 100, 200, 100);
|
Details of functionsAssociateComment(Comment[Comment])DescriptionAssociates a comment with a interpolation spotweld. |
Comment that will be attached to the interpolation spotweld
ReturnsNo return value |
ExampleTo associate comment c to the interpolation spotweld s: s.AssociateComment(c);
|
Blank()DescriptionBlanks the interpolation spotweld |
No arguments
ReturnsNo return value |
ExampleTo blank interpolation spotweld s: s.Blank();
|
BlankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionBlanks all of the interpolation spotwelds in the model. |
Model that all interpolation spotwelds will be blanked in
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo blank all of the interpolation spotwelds in model m: InterpolationSpotweld.BlankAll(m);
|
BlankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionBlanks all of the flagged interpolation spotwelds in the model. |
Model that all the flagged interpolation spotwelds will be blanked in
Flag set on the interpolation spotwelds that you want to blank
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo blank all of the interpolation spotwelds in model m flagged with f: InterpolationSpotweld.BlankFlagged(m, f);
|
Blanked()DescriptionChecks if the interpolation spotweld is blanked or not. |
No arguments
Returnstrue if blanked, false if not. Return typeBoolean |
ExampleTo check if interpolation spotweld s is blanked: if (s.Blanked() ) do_something...
|
ClearFlag(flag[Flag])DescriptionClears a flag on the interpolation spotweld. |
Flag to clear on the interpolation spotweld
ReturnsNo return value |
ExampleTo clear flag f for interpolation spotweld s: s.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the interpolation spotweld. The target include of the copied interpolation spotweld can be set using Options.copy_target_include. |
If you want to keep the copied item in the range specified for the current include. Default value is false. To set current include, use Include.MakeCurrentLayer().
ReturnsInterpolationSpotweld object Return typeInterpolationSpotweld |
ExampleTo copy interpolation spotweld s into interpolation spotweld z: var z = s.Copy();
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a interpolation spotweld. |
Comment that will be detached from the interpolation spotweld
ReturnsNo return value |
ExampleTo detach comment c from the interpolation spotweld s: s.DetachComment(c);
|
Error(message[string], details (optional)[string])DescriptionAdds an error for interpolation spotweld. For more details on checking see the Check class. |
The error message to give
An optional detailed error message
ReturnsNo return value |
ExampleTo add an error message "My custom error" for interpolation spotweld s: s.Error("My custom error");
|
First(Model[Model]) [static]DescriptionReturns the first interpolation spotweld in the model. |
Model to get first interpolation spotweld in
ReturnsInterpolationSpotweld object (or null if there are no interpolation spotwelds in the model). Return typeInterpolationSpotweld |
ExampleTo get the first interpolation spotweld in model m: var s = InterpolationSpotweld.First(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the interpolation spotwelds in the model with a defined flag. |
Model that all interpolation spotwelds will be flagged in
Flag to set on the interpolation spotwelds
ReturnsNo return value |
ExampleTo flag all of the interpolation spotwelds with flag f in model m: InterpolationSpotweld.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the interpolation spotweld is flagged or not. |
Flag to test on the interpolation spotweld
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if interpolation spotweld s has flag f set on it: if (s.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each interpolation spotweld in the model. |
Model that all interpolation spotwelds are in
Function to call for each interpolation spotweld
An optional extra object/array/string etc that will appended to arguments when calling the function
ReturnsNo return value |
GetAll(Model[Model], property (optional)[string]) [static]DescriptionReturns an array of InterpolationSpotweld objects or properties for all of the interpolation spotwelds in a model in PRIMER. If the optional property argument is not given then an array of InterpolationSpotweld objects is returned. If the property argument is given, that property value for each interpolation spotweld is returned in the array instead of a InterpolationSpotweld object |
Model to get interpolation spotwelds from
Name for property to get for all interpolation spotwelds in the model
ReturnsArray of InterpolationSpotweld objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a interpolation spotweld. |
No arguments
ReturnsArray of Comment objects (or null if there are no comments associated to the node). Return typeArray |
ExampleTo get the array of comments associated to the interpolation spotweld s: var comm_array = s.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of InterpolationSpotweld objects for all of the flagged interpolation spotwelds in a model in PRIMER If the optional property argument is not given then an array of InterpolationSpotweld objects is returned. If the property argument is given, then that property value for each interpolation spotweld is returned in the array instead of a InterpolationSpotweld object |
Model to get interpolation spotwelds from
Flag set on the interpolation spotwelds that you want to retrieve
Name for property to get for all flagged interpolation spotwelds in the model
ReturnsArray of InterpolationSpotweld objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the InterpolationSpotweld object for a interpolation spotweld ID. |
Model to find the interpolation spotweld in
number of the interpolation spotweld you want the InterpolationSpotweld object for
ReturnsInterpolationSpotweld object (or null if interpolation spotweld does not exist). Return typeInterpolationSpotweld |
ExampleTo get the InterpolationSpotweld object for interpolation spotweld 100 in model m var s = InterpolationSpotweld.GetFromID(m, 100);
|
GetParameter(prop[string])DescriptionChecks if a InterpolationSpotweld property is a parameter or not. Note that object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. For this function to work the JavaScript interpreter must use the parameter name instead of the value. This can be done by setting the Options.property_parameter_names option to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using the InterpolationSpotweld.ViewParameters() method and 'method chaining' (see the examples below). |
interpolation spotweld property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
Keyword()DescriptionReturns the keyword for this interpolation spotweld (*CONSTRAINED_INTERPOLATION_SPOTWELD). Note that a carriage return is not added. See also InterpolationSpotweld.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for interpolation spotweld s: var key = s.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the interpolation spotweld. Note that a carriage return is not added. See also InterpolationSpotweld.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for interpolation spotweld s: var cards = s.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last interpolation spotweld in the model. |
Model to get last interpolation spotweld in
ReturnsInterpolationSpotweld object (or null if there are no interpolation spotwelds in the model). Return typeInterpolationSpotweld |
ExampleTo get the last interpolation spotweld in model m: var s = InterpolationSpotweld.Last(m);
|
Next()DescriptionReturns the next interpolation spotweld in the model. |
No arguments
ReturnsInterpolationSpotweld object (or null if there are no more interpolation spotwelds in the model). Return typeInterpolationSpotweld |
ExampleTo get the interpolation spotweld in model m after interpolation spotweld s: var s = s.Next();
|
Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]DescriptionAllows the user to pick a interpolation spotweld. |
Text to display as a prompt to the user
If the argument is a Model then only interpolation spotwelds from that model can be picked. If the argument is a Flag then only interpolation spotwelds that are flagged with limit can be selected. If omitted, or null, any interpolation spotwelds from any model can be selected. from any model.
If picking is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the pick will be modal.
By default the window with the prompt will have a button labelled 'Cancel' which if pressed will cancel the pick and return null. If you want to change the text on the button use this argument. If omitted 'Cancel' will be used.
ReturnsInterpolationSpotweld object (or null if not picked) Return typeInterpolationSpotweld |
ExampleTo pick a interpolation spotweld from model m giving the prompt 'Pick interpolation spotweld from screen': var s = InterpolationSpotweld.Pick('Pick interpolation spotweld from screen', m);
|
Previous()DescriptionReturns the previous interpolation spotweld in the model. |
No arguments
ReturnsInterpolationSpotweld object (or null if there are no more interpolation spotwelds in the model). Return typeInterpolationSpotweld |
ExampleTo get the interpolation spotweld in model m before interpolation spotweld s: var s = s.Previous();
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select interpolation spotwelds using standard PRIMER object menus. |
Flag to use when selecting interpolation spotwelds
Text to display as a prompt to the user
If the argument is a Model then only interpolation spotwelds from that model can be selected. If the argument is a Flag then only interpolation spotwelds that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any interpolation spotwelds can be selected. from any model.
If selection is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the selection will be modal.
ReturnsNumber of interpolation spotwelds selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the interpolation spotweld. |
Flag to set on the interpolation spotweld
ReturnsNo return value |
ExampleTo set flag f for interpolation spotweld s: s.SetFlag(f);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the interpolation spotweld. The interpolation spotweld will be sketched until you either call InterpolationSpotweld.Unsketch(), InterpolationSpotweld.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the interpolation spotweld is sketched. If omitted redraw is true. If you want to sketch several interpolation spotwelds and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch interpolation spotweld s: s.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged interpolation spotwelds in the model. The interpolation spotwelds will be sketched until you either call InterpolationSpotweld.Unsketch(), InterpolationSpotweld.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged interpolation spotwelds will be sketched in
Flag set on the interpolation spotwelds that you want to sketch
If model should be redrawn or not after the interpolation spotwelds are sketched. If omitted redraw is true. If you want to sketch flagged interpolation spotwelds several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all interpolation spotwelds flagged with flag in model m: InterpolationSpotweld.SketchFlagged(m, flag);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of interpolation spotwelds in the model. |
Model to get total for
true if only existing interpolation spotwelds should be counted. If false or omitted referenced but undefined interpolation spotwelds will also be included in the total.
Returnsnumber of interpolation spotwelds Return typeNumber |
ExampleTo get the total number of interpolation spotwelds in model m: var total = InterpolationSpotweld.Total(m);
|
Unblank()DescriptionUnblanks the interpolation spotweld |
No arguments
ReturnsNo return value |
ExampleTo unblank interpolation spotweld s: s.Unblank();
|
UnblankAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the interpolation spotwelds in the model. |
Model that all interpolation spotwelds will be unblanked in
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo unblank all of the interpolation spotwelds in model m: InterpolationSpotweld.UnblankAll(m);
|
UnblankFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnblanks all of the flagged interpolation spotwelds in the model. |
Model that the flagged interpolation spotwelds will be unblanked in
Flag set on the interpolation spotwelds that you want to unblank
If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw().
ReturnsNo return value |
ExampleTo unblank all of the interpolation spotwelds in model m flagged with f: InterpolationSpotweld.UnblankFlagged(m, f);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the interpolation spotwelds in the model. |
Model that the defined flag for all interpolation spotwelds will be unset in
Flag to unset on the interpolation spotwelds
ReturnsNo return value |
ExampleTo unset the flag f on all the interpolation spotwelds in model m: InterpolationSpotweld.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the interpolation spotweld. |
If model should be redrawn or not after the interpolation spotweld is unsketched. If omitted redraw is true. If you want to unsketch several interpolation spotwelds and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch interpolation spotweld s: s.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all interpolation spotwelds. |
Model that all interpolation spotwelds will be unblanked in
If model should be redrawn or not after the interpolation spotwelds are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch all interpolation spotwelds in model m: InterpolationSpotweld.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged interpolation spotwelds in the model. |
Model that all interpolation spotwelds will be unsketched in
Flag set on the interpolation spotwelds that you want to unsketch
If model should be redrawn or not after the interpolation spotwelds are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch all interpolation spotwelds flagged with flag in model m: InterpolationSpotweld.UnsketchAll(m, flag);
|
No arguments
ReturnsInterpolationSpotweld object. Return typeInterpolationSpotweld |
ExampleTo check if InterpolationSpotweld property s.example is a parameter by using the InterpolationSpotweld.GetParameter() method: if (s.ViewParameters().GetParameter(s.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for interpolation spotweld. For more details on checking see the Check class. |
The warning message to give
An optional detailed warning message
ReturnsNo return value |
ExampleTo add a warning message "My custom warning" for interpolation spotweld s: s.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this interpolation spotweld. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for interpolation spotweld s: var xrefs = s.Xrefs();
|
toString()DescriptionCreates a string containing the interpolation spotweld data in keyword format. Note that this contains the keyword header and the keyword cards. See also InterpolationSpotweld.Keyword() and InterpolationSpotweld.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for interpolation spotweld s in keyword format var str = s.toString();
|