The IGAMass class gives you access to IGA mass 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 |
| dmass | real | Uniformly distributed mass added to IGA entity. |
| exists (read only) | logical | true if IGA Mass exists, false if referred to but not defined. |
| id | integer | ID of IGA entity depending on the choice of keyword option. Can be IGA_POINT_UVW, IGA_EDGE_UVW, IGA_FACE_XYZ, SET_IGA_POINT_UVW, SET_IGA_EDGE_UVW or SET_IGA_FACE_XYZ. |
| include | integer | The Include file number that the IGA Mass is in. |
| label (read only) | integer | IGAMass number. Only used in PRIMER. |
| model (read only) | integer | The Model number that the IGA Mass is in. |
| option | constant | IGA mass option. Can be IGAMass.POINT_UVW, IGAMass.EDGE_UVW, IGAMass.FACE_XYZ, IGAMass.SET_POINT_UVW, IGAMass.SET_EDGE_UVW or IGAMass.SET_FACE_XYZ. |
| tmass | real | Mass added to IGA entity. |
Detailed DescriptionThe IGAMass class allows you to create, modify, edit and manipulate IGA mass cards. See the documentation below for more details. |
Constructornew IGAMass(Model[Model], details[object])DescriptionCreate a new IGAMass object. |
Model that IGA mass will be created in
Details for creating the IGAMass
Object has the following properties:
| Name | Type | Description |
| dmass (optional) | real | Uniformly distributed mass added to IGA entity. |
| id | integer | ID of IGA entity depending on the choice of keyword option. Can be IGA_POINT_UVW, IGA_EDGE_UVW, IGA_FACE_XYZ, SET_IGA_POINT_UVW, SET_IGA_EDGE_UVW or SET_IGA_FACE_XYZ. |
| option | constant | IGA Face XYZ option. Can be IGAMass.POINT_UVW, IGAMass.EDGE_UVW, IGAMass.FACE_XYZ, IGAMass.SET_POINT_UVW, IGAMass.SET_EDGE_UVW or IGAMass.SET_FACE_XYZ. |
| tmass (optional) | real | Mass added to IGA entity. |
ReturnsIGAMass object Return typeIGAMass |
Details of functionsAssociateComment(Comment[Comment])DescriptionAssociates a comment with a IGA Mass. |
Comment that will be attached to the IGA Mass
ReturnsNo return value |
ExampleTo associate comment c to the IGA Mass igma: igma.AssociateComment(c);
|
Browse(modal (optional)[boolean])DescriptionStarts an edit panel in Browse mode. |
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
Returnsno return value |
ExampleTo Browse IGA Mass igma: igma.Browse();
|
ClearFlag(flag[Flag])DescriptionClears a flag on the IGA Mass. |
Flag to clear on the IGA Mass
ReturnsNo return value |
ExampleTo clear flag f for IGA Mass igma: igma.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the IGA Mass. The target include of the copied IGA Mass 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().
ReturnsIGAMass object Return typeIGAMass |
ExampleTo copy IGA Mass igma into IGA Mass z: var z = igma.Copy();
|
Create(Model[Model], modal (optional)[boolean]) [static]DescriptionStarts an interactive editing panel to create a IGA Mass |
Model that the IGA Mass will be created in.
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
ReturnsIGAMass object (or null if not made). Return typeIGAMass |
ExampleTo start creating a IGA Mass in model m: var igma = IGAMass.Create(m);
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a IGA Mass. |
Comment that will be detached from the IGA Mass
ReturnsNo return value |
ExampleTo detach comment c from the IGA Mass igma: igma.DetachComment(c);
|
Edit(modal (optional)[boolean])DescriptionStarts an interactive editing panel. |
If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal.
Returnsno return value |
ExampleTo Edit IGA Mass igma: igma.Edit();
|
Error(message[string], details (optional)[string])DescriptionAdds an error for IGA Mass. 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 IGA Mass igma: igma.Error("My custom error");
|
First(Model[Model]) [static]DescriptionReturns the first IGA Mass in the model. |
Model to get first IGA Mass in
ReturnsIGAMass object (or null if there are no IGA Masss in the model). Return typeIGAMass |
ExampleTo get the first IGA Mass in model m: var igma = IGAMass.First(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the IGA Masss in the model with a defined flag. |
Model that all IGA Masss will be flagged in
Flag to set on the IGA Masss
ReturnsNo return value |
ExampleTo flag all of the IGA Masss with flag f in model m: IGAMass.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the IGA Mass is flagged or not. |
Flag to test on the IGA Mass
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if IGA Mass igma has flag f set on it: if (igma.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each IGA Mass in the model. |
Model that all IGA Masss are in
Function to call for each IGA Mass
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 IGAMass objects or properties for all of the IGA Masss in a model in PRIMER. If the optional property argument is not given then an array of IGAMass objects is returned. If the property argument is given, that property value for each IGA Mass is returned in the array instead of a IGAMass object |
Model to get IGA Masss from
Name for property to get for all IGA Masss in the model
ReturnsArray of IGAMass objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a IGA Mass. |
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 IGA Mass igma: var comm_array = igma.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of IGAMass objects for all of the flagged IGA Masss in a model in PRIMER If the optional property argument is not given then an array of IGAMass objects is returned. If the property argument is given, then that property value for each IGA Mass is returned in the array instead of a IGAMass object |
Model to get IGA Masss from
Flag set on the IGA Masss that you want to retrieve
Name for property to get for all flagged IGA Masss in the model
ReturnsArray of IGAMass objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the IGAMass object for a IGA Mass ID. |
Model to find the IGA Mass in
number of the IGA Mass you want the IGAMass object for
ReturnsIGAMass object (or null if IGA Mass does not exist). Return typeIGAMass |
ExampleTo get the IGAMass object for IGA Mass 100 in model m var igma = IGAMass.GetFromID(m, 100);
|
GetParameter(prop[string])DescriptionChecks if a IGAMass 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 IGAMass.ViewParameters() method and 'method chaining' (see the examples below). |
IGA Mass property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
Keyword()DescriptionReturns the keyword for this IGA mass (*IGA_MASS). Note that a carriage return is not added. See also IGAMass.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for IGA mass igma: var key = igma.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the IGA mass. Note that a carriage return is not added. See also IGAMass.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for IGA mass igma: var cards = igma.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last IGA Mass in the model. |
Model to get last IGA Mass in
ReturnsIGAMass object (or null if there are no IGA Masss in the model). Return typeIGAMass |
ExampleTo get the last IGA Mass in model m: var igma = IGAMass.Last(m);
|
Next()DescriptionReturns the next IGA Mass in the model. |
No arguments
ReturnsIGAMass object (or null if there are no more IGA Masss in the model). Return typeIGAMass |
ExampleTo get the IGA Mass in model m after IGA Mass igma: var igma = igma.Next();
|
Previous()DescriptionReturns the previous IGA Mass in the model. |
No arguments
ReturnsIGAMass object (or null if there are no more IGA Masss in the model). Return typeIGAMass |
ExampleTo get the IGA Mass in model m before IGA Mass igma: var igma = igma.Previous();
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select IGA Masss using standard PRIMER object menus. |
Flag to use when selecting IGA Masss
Text to display as a prompt to the user
If the argument is a Model then only IGA Masss from that model can be selected. If the argument is a Flag then only IGA Masss that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any IGA Masss 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 IGA Masss selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the IGA Mass. |
Flag to set on the IGA Mass
ReturnsNo return value |
ExampleTo set flag f for IGA Mass igma: igma.SetFlag(f);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the IGA Mass. The IGA Mass will be sketched until you either call IGAMass.Unsketch(), IGAMass.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the IGA Mass is sketched. If omitted redraw is true. If you want to sketch several IGA Masss and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch IGA Mass igma: igma.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged IGA Masss in the model. The IGA Masss will be sketched until you either call IGAMass.Unsketch(), IGAMass.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged IGA Masss will be sketched in
Flag set on the IGA Masss that you want to sketch
If model should be redrawn or not after the IGA Masss are sketched. If omitted redraw is true. If you want to sketch flagged IGA Masss several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all IGA Masss flagged with flag in model m: IGAMass.SketchFlagged(m, flag);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of IGA Masss in the model. |
Model to get total for
true if only existing IGA Masss should be counted. If false or omitted referenced but undefined IGA Masss will also be included in the total.
Returnsnumber of IGA Masss Return typeNumber |
ExampleTo get the total number of IGA Masss in model m: var total = IGAMass.Total(m);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the IGA Masss in the model. |
Model that the defined flag for all IGA Masss will be unset in
Flag to unset on the IGA Masss
ReturnsNo return value |
ExampleTo unset the flag f on all the IGA Masss in model m: IGAMass.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the IGA Mass. |
If model should be redrawn or not after the IGA Mass is unsketched. If omitted redraw is true. If you want to unsketch several IGA Masss and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch IGA Mass igma: igma.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all IGA Masss. |
Model that all IGA Masss will be unblanked in
If model should be redrawn or not after the IGA Masss 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 IGA Masss in model m: IGAMass.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged IGA Masss in the model. |
Model that all IGA Masss will be unsketched in
Flag set on the IGA Masss that you want to unsketch
If model should be redrawn or not after the IGA Masss 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 IGA Masss flagged with flag in model m: IGAMass.UnsketchAll(m, flag);
|
No arguments
ReturnsIGAMass object. Return typeIGAMass |
ExampleTo check if IGAMass property igma.example is a parameter by using the IGAMass.GetParameter() method: if (igma.ViewParameters().GetParameter(igma.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for IGA Mass. 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 IGA Mass igma: igma.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this IGA Mass. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for IGA Mass igma: var xrefs = igma.Xrefs();
|
toString()DescriptionCreates a string containing the IGA mass data in keyword format. Note that this contains the keyword header and the keyword cards. See also IGAMass.Keyword() and IGAMass.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for IGA mass igma in keyword format var s = igma.toString();
|