Oasys.PRIMER.IGARefineShell class

Properties

property IGARefineShell.exists(read only): boolean

true if IGA Refine Shell exists, false if referred to but not defined

property IGARefineShell.hrtyp: integer

IGA h-refinement type

property IGARefineShell.include: integer

The Include file number that the IGA Refine Shell is in

property IGARefineShell.label: integer

IGARefineShell ID. Also see the rid property which is an alternative name for this

property IGARefineShell.model(read only): integer

The Model number that the IGA Refine Shell is in

property IGARefineShell.rid: integer

IGARefineShell ID. Also see the label property which is an alternative name for this

property IGARefineShell.rr: float

Number of equal parametric segments in the local r-direction

property IGARefineShell.rs: float

Number of equal parametric segments in the local s-direction

property IGARefineShell.rtyp: integer

Refinement type

property IGARefineShell.tr: integer

Target polynomial degree in the local r-direction

property IGARefineShell.ts: integer

Target polynomial degree in the local s-direction

Constructor

classmethod IGARefineShell(model, details)

Create a new IGARefineShell object

Parameters:
  • model (Model) – Model that IGA refine shell will be created in

  • details (dict) –

    Details for creating the IGARefineShell

    hrtyp (optional):

    (integer) IGA h-refinement type

    rid:

    (integer) IGA shell refinement ID

    rr (optional):

    (float) Number of equal parametric segments in the local r-direction

    rs (optional):

    (float) Number of equal parametric segments in the local s-direction

    rtyp:

    (integer) IGA refinement type

    tr (optional):

    (integer) Target polynomial degree in the local r-direction

    ts (optional):

    (integer) Target polynomial degree in the local s-direction

Returns:

IGARefineShell object

Return type:

IGARefineShell

Example

To create a new IGA refine shell in model m with rid 1, h-refinement 1 and rr and rs 2 and 4 respectively:

igrsh = Oasys.PRIMER.IGARefineShell(m, {'rid': 1, 'rtyp': 1, 'hrtyp': 1, 'rr': 2, 'rs': 4})

Static methods

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

Starts an interactive editing panel to create a IGA Refine Shell

Parameters:
  • model (Model) – Model that the IGA Refine Shell 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:

IGARefineShell object (or None if not made)

Return type:

IGARefineShell

Example

To start creating a IGA Refine Shell in model m:

igrsh = Oasys.PRIMER.IGARefineShell.Create(m)
classmethod IGARefineShell.First(model)

Returns the first IGA Refine Shell in the model

Parameters:

model (Model) – Model to get first IGA Refine Shell in

Returns:

IGARefineShell object (or None if there are no IGA Refine Shells in the model)

Return type:

IGARefineShell

Example

To get the first IGA Refine Shell in model m:

igrsh = Oasys.PRIMER.IGARefineShell.First(m)
classmethod IGARefineShell.FlagAll(model, flag)

Flags all of the IGA Refine Shells in the model with a defined flag

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

  • flag (Flag) – Flag to set on the IGA Refine Shells

Returns:

No return value

Return type:

None

Example

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

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

Returns a list of IGARefineShell objects or properties for all of the IGA Refine Shells in a model in PRIMER. If the optional property argument is not given then a list of IGARefineShell objects is returned. If the property argument is given, that property value for each IGA Refine Shell is returned in the list instead of a IGARefineShell object

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

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

Returns:

List of IGARefineShell objects or properties

Return type:

list

Example

To make a list of IGARefineShell objects for all of the IGA Refine Shells in model m:

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

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

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

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

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

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

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

Returns:

List of IGARefineShell objects or properties

Return type:

list

Example

To make a list of IGARefineShell objects for all of the IGA Refine Shells in model m flagged with f:

igrsh = Oasys.PRIMER.IGARefineShell.GetFlagged(m, f)

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

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

Returns the IGARefineShell object for a IGA Refine Shell ID

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

  • number (integer) – number of the IGA Refine Shell you want the IGARefineShell object for

Returns:

IGARefineShell object (or None if IGA Refine Shell does not exist)

Return type:

IGARefineShell

Example

To get the IGARefineShell object for IGA Refine Shell 100 in model m

igrsh = Oasys.PRIMER.IGARefineShell.GetFromID(m, 100)
classmethod IGARefineShell.Last(model)

Returns the last IGA Refine Shell in the model

Parameters:

model (Model) – Model to get last IGA Refine Shell in

Returns:

IGARefineShell object (or None if there are no IGA Refine Shells in the model)

Return type:

IGARefineShell

Example

To get the last IGA Refine Shell in model m:

igrsh = Oasys.PRIMER.IGARefineShell.Last(m)
classmethod IGARefineShell.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)

Allows the user to pick a IGA Refine Shell

Parameters:
  • 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 Refine Shells from that model can be picked. If the argument is a Flag then only IGA Refine Shells that are flagged with limit can be selected. If omitted, or None, any IGA Refine Shells from any model can be selected. from any model

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

  • button_text (string) – Optional. By default the window with the prompt will have a button labelled ‘Cancel’ which if pressed will cancel the pick and return None. If you want to change the text on the button use this argument. If omitted ‘Cancel’ will be used

Returns:

IGARefineShell object (or None if not picked)

Return type:

IGARefineShell

Example

To pick a IGA Refine Shell from model m giving the prompt ‘Pick IGA Refine Shell from screen’:

igrsh = Oasys.PRIMER.IGARefineShell.Pick('Pick IGA Refine Shell from screen', m)
classmethod IGARefineShell.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

Allows the user to select IGA Refine Shells using standard PRIMER object menus

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

  • 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 Refine Shells from that model can be selected. If the argument is a Flag then only IGA Refine Shells that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any IGA Refine Shells 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 Refine Shells selected or None if menu cancelled

Return type:

int

Example

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

Oasys.PRIMER.IGARefineShell.Select(f, 'Select IGA Refine Shells', m)

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

Oasys.PRIMER.IGARefineShell.Select(f, 'Select IGA Refine Shells', l)
classmethod IGARefineShell.Total(model, exists=Oasys.gRPC.defaultArg)

Returns the total number of IGA Refine Shells in the model

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

  • exists (boolean) – Optional. true if only existing IGA Refine Shells should be counted. If false or omitted referenced but undefined IGA Refine Shells will also be included in the total

Returns:

number of IGA Refine Shells

Return type:

int

Example

To get the total number of IGA Refine Shells in model m:

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

Unsets a defined flag on all of the IGA Refine Shells in the model

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

  • flag (Flag) – Flag to unset on the IGA Refine Shells

Returns:

No return value

Return type:

None

Example

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

Oasys.PRIMER.IGARefineShell.UnflagAll(m, f)

Instance methods

IGARefineShell.AssociateComment(comment)

Associates a comment with a IGA Refine Shell

Parameters:

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

Returns:

No return value

Return type:

None

Example

To associate comment c to the IGA Refine Shell igrsh:

igrsh.AssociateComment(c)
IGARefineShell.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 Refine Shell igrsh:

igrsh.Browse()
IGARefineShell.ClearFlag(flag)

Clears a flag on the IGA Refine Shell

Parameters:

flag (Flag) – Flag to clear on the IGA Refine Shell

Returns:

No return value

Return type:

None

Example

To clear flag f for IGA Refine Shell igrsh:

igrsh.ClearFlag(f)
IGARefineShell.Copy(range=Oasys.gRPC.defaultArg)

Copies the IGA Refine Shell. The target include of the copied IGA Refine Shell 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:

IGARefineShell object

Return type:

IGARefineShell

Example

To copy IGA Refine Shell igrsh into IGA Refine Shell z:

z = igrsh.Copy()
IGARefineShell.DetachComment(comment)

Detaches a comment from a IGA Refine Shell

Parameters:

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

Returns:

No return value

Return type:

None

Example

To detach comment c from the IGA Refine Shell igrsh:

igrsh.DetachComment(c)
IGARefineShell.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 Refine Shell igrsh:

igrsh.Edit()
IGARefineShell.Flagged(flag)

Checks if the IGA Refine Shell is flagged or not

Parameters:

flag (Flag) – Flag to test on the IGA Refine Shell

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if IGA Refine Shell igrsh has flag f set on it:

if igrsh.Flagged(f):
    do_something..
IGARefineShell.GetComments()

Extracts the comments associated to a IGA Refine Shell

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 Refine Shell igrsh:

comm_list = igrsh.GetComments()
IGARefineShell.GetParameter(prop)

Checks if a IGARefineShell 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 IGARefineShell.ViewParameters() method and ‘method chaining’ (see the examples below)

Parameters:

prop (string) – IGA Refine Shell property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

Parameter

Example

To check if IGARefineShell property igrsh.example is a parameter:

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

To check if IGARefineShell property igrsh.example is a parameter by using the GetParameter method:

if igrsh.ViewParameters().GetParameter(igrsh.example):
    do_something..
IGARefineShell.Keyword()

Returns the keyword for this IGA refine shell (*IGA_REFINE_SHELL). Note that a carriage return is not added See also IGARefineShell.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for IGA refine shell igs:

key = igrsh.Keyword()
IGARefineShell.KeywordCards()

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

Returns:

string containing the cards

Return type:

str

Example

To get the cards for IGA refine shell igrsh:

cards = igrsh.KeywordCards()
IGARefineShell.Next()

Returns the next IGA Refine Shell in the model

Returns:

IGARefineShell object (or None if there are no more IGA Refine Shells in the model)

Return type:

IGARefineShell

Example

To get the IGA Refine Shell in model m after IGA Refine Shell igrsh:

igrsh = igrsh.Next()
IGARefineShell.Previous()

Returns the previous IGA Refine Shell in the model

Returns:

IGARefineShell object (or None if there are no more IGA Refine Shells in the model)

Return type:

IGARefineShell

Example

To get the IGA Refine Shell in model m before IGA Refine Shell igrsh:

igrsh = igrsh.Previous()
IGARefineShell.SetFlag(flag)

Sets a flag on the IGA Refine Shell

Parameters:

flag (Flag) – Flag to set on the IGA Refine Shell

Returns:

No return value

Return type:

None

Example

To set flag f for IGA Refine Shell igrsh:

igrsh.SetFlag(f)
IGARefineShell.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:

IGARefineShell object

Return type:

IGARefineShell

Example

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

if igrsh.ViewParameters().GetParameter(igrsh.example):
    do_something..
IGARefineShell.Xrefs()

Returns the cross references for this IGA Refine Shell

Returns:

Xrefs object

Return type:

Xrefs

Example

To get the cross references for IGA Refine Shell igrsh:

xrefs = igrsh.Xrefs()