Oasys.PRIMER.IGAMass class

Constants

IGAMass.EDGE_UVW

EDGE is *IGA_MASS_EDGE_UVW

IGAMass.FACE_XYZ

FACE is *IGA_MASS_FACE_XYZ

IGAMass.POINT_UVW

POINT is *IGA_MASS_POINT_UVW

IGAMass.SET_EDGE_UVW

S_EDGE is *IGA_MASS_SET_EDGE_UVW

IGAMass.SET_FACE_XYZ

S_FACE is *IGA_MASS_SET_FACE_XYZ

IGAMass.SET_POINT_UVW

S_POINT is *IGA_MASS_SET_POINT_UVW

Properties

property IGAMass.dmass: float

Uniformly distributed mass added to IGA entity

property IGAMass.exists(read only): boolean

true if IGA Mass exists, false if referred to but not defined

property IGAMass.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

property IGAMass.include: integer

The Include file number that the IGA Mass is in

property IGAMass.label(read only): integer

IGAMass number. Only used in PRIMER

property IGAMass.model(read only): integer

The Model number that the IGA Mass is in

property IGAMass.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

property IGAMass.tmass: float

Mass added to IGA entity

Constructor

classmethod IGAMass(model, details)

Create a new IGAMass object

Parameters:
Returns:

IGAMass object

Return type:

IGAMass

Example

To create a new IGA mass in model m using option POINT with id 10:

igma = Oasys.PRIMER.IGAMass(m, {'option':Oasys.PRIMER.IGAMass.POINT_UVW, 'id':10})

To create a new IGA mass in model m using option S_EDGE with id 21, tmass 22.5 and dmass 23.5:

igma = Oasys.PRIMER.IGAMass(m, {'option':Oasys.PRIMER.IGAMass.SET_EDGE_UVW, 'id':21, 'tmass': 22.5, 'dmass':23.5})

Static methods

classmethod IGAMass.Create(model, modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel to create a IGA Mass

Parameters:
  • model (Model) – Model that the IGA Mass will be created in

  • modal (boolean) – Optional. 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

Returns:

IGAMass object (or None if not made)

Return type:

IGAMass

Example

To start creating a IGA Mass in model m:

igma = Oasys.PRIMER.IGAMass.Create(m)
classmethod IGAMass.First(model)

Returns the first IGA Mass in the model

Parameters:

model (Model) – Model to get first IGA Mass in

Returns:

IGAMass object (or None if there are no IGA Masss in the model)

Return type:

IGAMass

Example

To get the first IGA Mass in model m:

igma = Oasys.PRIMER.IGAMass.First(m)
classmethod IGAMass.FlagAll(model, flag)

Flags all of the IGA Masss in the model with a defined flag

Parameters:
  • model (Model) – Model that all IGA Masss will be flagged in

  • flag (Flag) – Flag to set on the IGA Masss

Returns:

No return value

Return type:

None

Example

To flag all of the IGA Masss with flag f in model m:

Oasys.PRIMER.IGAMass.FlagAll(m, f)
classmethod IGAMass.GetAll(model, property=Oasys.gRPC.defaultArg)

Returns a list 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 a list of IGAMass objects is returned. If the property argument is given, that property value for each IGA Mass is returned in the list instead of a IGAMass object

Parameters:
  • model (Model) – Model to get IGA Masss from

  • property (string) – Optional. Name for property to get for all IGA Masss in the model

Returns:

List of IGAMass objects or properties

Return type:

list

Example

To make a list of IGAMass objects for all of the IGA Masss in model m:

a = Oasys.PRIMER.IGAMass.GetAll(m)

To return a list containing the value of property ‘foo’ (for example ‘x’ for a node) for each IGA Mass in model m:

a = Oasys.PRIMER.IGAMass.GetAll(m, 'foo')
classmethod IGAMass.GetFlagged(model, flag, property=Oasys.gRPC.defaultArg)

Returns a list of IGAMass objects for all of the flagged IGA Masss in a model in PRIMER If the optional property argument is not given then a list of IGAMass objects is returned. If the property argument is given, then that property value for each IGA Mass is returned in the list instead of a IGAMass object

Parameters:
  • model (Model) – Model to get IGA Masss from

  • flag (Flag) – Flag set on the IGA Masss that you want to retrieve

  • property (string) – Optional. Name for property to get for all flagged IGA Masss in the model

Returns:

List of IGAMass objects or properties

Return type:

list

Example

To make a list of IGAMass objects for all of the IGA Masss in model m flagged with f:

igma = Oasys.PRIMER.IGAMass.GetFlagged(m, f)

To return a list containing the value of property ‘foo’ (for example ‘x’ for a node) for all of the IGA Masss in model m flagged with f:

a = Oasys.PRIMER.IGAMass.GetFlagged(m, f, 'foo')
classmethod IGAMass.GetFromID(model, number)

Returns the IGAMass object for a IGA Mass ID

Parameters:
  • model (Model) – Model to find the IGA Mass in

  • number (integer) – number of the IGA Mass you want the IGAMass object for

Returns:

IGAMass object (or None if IGA Mass does not exist)

Return type:

IGAMass

Example

To get the IGAMass object for IGA Mass 100 in model m

igma = Oasys.PRIMER.IGAMass.GetFromID(m, 100)
classmethod IGAMass.Last(model)

Returns the last IGA Mass in the model

Parameters:

model (Model) – Model to get last IGA Mass in

Returns:

IGAMass object (or None if there are no IGA Masss in the model)

Return type:

IGAMass

Example

To get the last IGA Mass in model m:

igma = Oasys.PRIMER.IGAMass.Last(m)
classmethod IGAMass.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

Allows the user to select IGA Masss using standard PRIMER object menus

Parameters:
  • flag (Flag) – Flag to use when selecting IGA Masss

  • prompt (string) – Text to display as a prompt to the user

  • limit (Model or Flag) – Optional. 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 None, any IGA Masss can be selected. from any model

  • modal (boolean) – Optional. 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

Returns:

Number of IGA Masss selected or None if menu cancelled

Return type:

int

Example

To select IGA Masss from model m, flagging those selected with flag f, giving the prompt ‘Select IGA Masss’:

Oasys.PRIMER.IGAMass.Select(f, 'Select IGA Masss', m)

To select IGA Masss, flagging those selected with flag f but limiting selection to IGA Masss flagged with flag l, giving the prompt ‘Select IGA Masss’:

Oasys.PRIMER.IGAMass.Select(f, 'Select IGA Masss', l)
classmethod IGAMass.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Sketches 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

Parameters:
  • model (Model) – Model that all the flagged IGA Masss will be sketched in

  • flag (Flag) – Flag set on the IGA Masss that you want to sketch

  • redraw (boolean) – Optional. 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()

Returns:

No return value

Return type:

None

Example

To sketch all IGA Masss flagged with flag in model m:

Oasys.PRIMER.IGAMass.SketchFlagged(m, flag)
classmethod IGAMass.Total(model, exists=Oasys.gRPC.defaultArg)

Returns the total number of IGA Masss in the model

Parameters:
  • model (Model) – Model to get total for

  • exists (boolean) – Optional. 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

Returns:

number of IGA Masss

Return type:

int

Example

To get the total number of IGA Masss in model m:

total = Oasys.PRIMER.IGAMass.Total(m)
classmethod IGAMass.UnflagAll(model, flag)

Unsets a defined flag on all of the IGA Masss in the model

Parameters:
  • model (Model) – Model that the defined flag for all IGA Masss will be unset in

  • flag (Flag) – Flag to unset on the IGA Masss

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the IGA Masss in model m:

Oasys.PRIMER.IGAMass.UnflagAll(m, f)
classmethod IGAMass.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)

Unsketches all IGA Masss

Parameters:
  • model (Model) – Model that all IGA Masss will be unblanked in

  • redraw (boolean) – Optional. 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()

Returns:

No return value

Return type:

None

Example

To unsketch all IGA Masss in model m:

Oasys.PRIMER.IGAMass.UnsketchAll(m)
classmethod IGAMass.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Unsketches all flagged IGA Masss in the model

Parameters:
  • model (Model) – Model that all IGA Masss will be unsketched in

  • flag (Flag) – Flag set on the IGA Masss that you want to unsketch

  • redraw (boolean) – Optional. 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()

Returns:

No return value

Return type:

None

Example

To unsketch all IGA Masss flagged with flag in model m:

Oasys.PRIMER.IGAMass.UnsketchAll(m, flag)

Instance methods

IGAMass.AssociateComment(comment)

Associates a comment with a IGA Mass

Parameters:

comment (Comment) – Comment that will be attached to the IGA Mass

Returns:

No return value

Return type:

None

Example

To associate comment c to the IGA Mass igma:

igma.AssociateComment(c)
IGAMass.Browse(modal=Oasys.gRPC.defaultArg)

Starts an edit panel in Browse mode

Parameters:

modal (boolean) – Optional. 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

Returns:

no return value

Return type:

None

Example

To Browse IGA Mass igma:

igma.Browse()
IGAMass.ClearFlag(flag)

Clears a flag on the IGA Mass

Parameters:

flag (Flag) – Flag to clear on the IGA Mass

Returns:

No return value

Return type:

None

Example

To clear flag f for IGA Mass igma:

igma.ClearFlag(f)
IGAMass.Copy(range=Oasys.gRPC.defaultArg)

Copies the IGA Mass. The target include of the copied IGA Mass can be set using Options.copy_target_include

Parameters:

range (boolean) – Optional. 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()

Returns:

IGAMass object

Return type:

IGAMass

Example

To copy IGA Mass igma into IGA Mass z:

z = igma.Copy()
IGAMass.DetachComment(comment)

Detaches a comment from a IGA Mass

Parameters:

comment (Comment) – Comment that will be detached from the IGA Mass

Returns:

No return value

Return type:

None

Example

To detach comment c from the IGA Mass igma:

igma.DetachComment(c)
IGAMass.Edit(modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel

Parameters:

modal (boolean) – Optional. 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

Returns:

no return value

Return type:

None

Example

To Edit IGA Mass igma:

igma.Edit()
IGAMass.Flagged(flag)

Checks if the IGA Mass is flagged or not

Parameters:

flag (Flag) – Flag to test on the IGA Mass

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if IGA Mass igma has flag f set on it:

if igma.Flagged(f):
    do_something..
IGAMass.GetComments()

Extracts the comments associated to a IGA Mass

Returns:

List of Comment objects (or None if there are no comments associated to the node)

Return type:

list

Example

To get the list of comments associated to the IGA Mass igma:

comm_list = igma.GetComments()
IGAMass.GetParameter(prop)

Checks 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)

Parameters:

prop (string) – IGA Mass property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

Parameter

Example

To check if IGAMass property igma.example is a parameter:

Oasys.PRIMER.Options.property_parameter_names = True
if igma.GetParameter(igma.example):
    do_something...
Oasys.PRIMER.Options.property_parameter_names = False

To check if IGAMass property igma.example is a parameter by using the GetParameter method:

if igma.ViewParameters().GetParameter(igma.example):
    do_something..
IGAMass.Keyword()

Returns the keyword for this IGA mass (*IGA_MASS). Note that a carriage return is not added. See also IGAMass.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for IGA mass igma:

key = igma.Keyword()
IGAMass.KeywordCards()

Returns the keyword cards for the IGA mass. Note that a carriage return is not added. See also IGAMass.Keyword()

Returns:

string containing the cards

Return type:

str

Example

To get the cards for IGA mass igma:

cards = igma.KeywordCards()
IGAMass.Next()

Returns the next IGA Mass in the model

Returns:

IGAMass object (or None if there are no more IGA Masss in the model)

Return type:

IGAMass

Example

To get the IGA Mass in model m after IGA Mass igma:

igma = igma.Next()
IGAMass.Previous()

Returns the previous IGA Mass in the model

Returns:

IGAMass object (or None if there are no more IGA Masss in the model)

Return type:

IGAMass

Example

To get the IGA Mass in model m before IGA Mass igma:

igma = igma.Previous()
IGAMass.SetFlag(flag)

Sets a flag on the IGA Mass

Parameters:

flag (Flag) – Flag to set on the IGA Mass

Returns:

No return value

Return type:

None

Example

To set flag f for IGA Mass igma:

igma.SetFlag(f)
IGAMass.Sketch(redraw=Oasys.gRPC.defaultArg)

Sketches the IGA Mass. The IGA Mass will be sketched until you either call IGAMass.Unsketch(), IGAMass.UnsketchAll(), Model.UnsketchAll(), or delete the model

Parameters:

redraw (boolean) – Optional. 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()

Returns:

No return value

Return type:

None

Example

To sketch IGA Mass igma:

igma.Sketch()
IGAMass.Unsketch(redraw=Oasys.gRPC.defaultArg)

Unsketches the IGA Mass

Parameters:

redraw (boolean) – Optional. 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()

Returns:

No return value

Return type:

None

Example

To unsketch IGA Mass igma:

igma.Unsketch()
IGAMass.ViewParameters()

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. This function temporarily changes the behaviour so that if a property is a parameter the parameter name is returned instead. This can be used with ‘method chaining’ (see the example below) to make sure a property argument is correct

Returns:

IGAMass object

Return type:

IGAMass

Example

To check if IGAMass property igma.example is a parameter by using the IGAMass.GetParameter() method:

if igma.ViewParameters().GetParameter(igma.example):
    do_something..
IGAMass.Xrefs()

Returns the cross references for this IGA Mass

Returns:

Xrefs object

Return type:

Xrefs

Example

To get the cross references for IGA Mass igma:

xrefs = igma.Xrefs()