Oasys.PRIMER.IGARefineSolid class

Properties

property IGARefineSolid.exists(read only): boolean

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

property IGARefineSolid.hrtyp: integer

IGA h-refinement type

property IGARefineSolid.include: integer

The Include file number that the IGA Refine Solid is in

property IGARefineSolid.label: integer

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

property IGARefineSolid.model(read only): integer

The Model number that the IGA Refine Solid is in

property IGARefineSolid.rid: integer

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

property IGARefineSolid.rr: float

Number of equal parametric segments in the local r-direction or the physical length of knot spans in the local r-direction

property IGARefineSolid.rs: float

Number of equal parametric segments in the local s-direction or the physical length of knot spans in the local s-direction

property IGARefineSolid.rt: float

Number of equal parametric segments in the local t-direction or the physical length of knot spans in the local t-direction

property IGARefineSolid.rtyp: integer

Refinement type

property IGARefineSolid.tr: integer

Target polynomial degree in the local r-direction

property IGARefineSolid.ts: integer

Target polynomial degree in the local s-direction

property IGARefineSolid.tt: integer

Target polynomial degree in the local t-direction

Constructor

classmethod IGARefineSolid(model, details)

Create a new IGARefineSolid object

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

  • details (dict) –

    Details for creating the IGARefineSolid

    hrtyp (optional):

    (integer) IGA h-refinement type

    rid:

    (integer) IGA solid refinement ID

    rr (optional):

    (float) Number of equal parametric segments in the local r-direction or the physical length of knot spans in the local r-direction

    rs (optional):

    (float) Number of equal parametric segments in the local s-direction or the physical length of knot spans in the local s-direction

    rt (optional):

    (float) Number of equal parametric segments in the local t-direction or the physical length of knot spans in the local t-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

    tt (optional):

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

Returns:

IGARefineSolid object

Return type:

IGARefineSolid

Example

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

igrso = Oasys.PRIMER.IGARefineSolid(m, {'rid': 1, 'rtyp': 1, 'hrtyp': 1, 'rr': 2, 'rs': 4, 'rt': 6})

Static methods

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

Starts an interactive editing panel to create a IGA Refine Solid

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

IGARefineSolid object (or None if not made)

Return type:

IGARefineSolid

Example

To start creating a IGA Refine Solid in model m:

igrso = Oasys.PRIMER.IGARefineSolid.Create(m)
classmethod IGARefineSolid.First(model)

Returns the first IGA Refine Solid in the model

Parameters:

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

Returns:

IGARefineSolid object (or None if there are no IGA Refine Solids in the model)

Return type:

IGARefineSolid

Example

To get the first IGA Refine Solid in model m:

igrso = Oasys.PRIMER.IGARefineSolid.First(m)
classmethod IGARefineSolid.FlagAll(model, flag)

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

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

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

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

Returns:

List of IGARefineSolid objects or properties

Return type:

list

Example

To make a list of IGARefineSolid objects for all of the IGA Refine Solids in model m:

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

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

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

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

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

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

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

Returns:

List of IGARefineSolid objects or properties

Return type:

list

Example

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

igrso = Oasys.PRIMER.IGARefineSolid.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 Solids in model m flagged with f:

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

Returns the IGARefineSolid object for a IGA Refine Solid ID

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

  • number (integer) – number of the IGA Refine Solid you want the IGARefineSolid object for

Returns:

IGARefineSolid object (or None if IGA Refine Solid does not exist)

Return type:

IGARefineSolid

Example

To get the IGARefineSolid object for IGA Refine Solid 100 in model m

igrso = Oasys.PRIMER.IGARefineSolid.GetFromID(m, 100)
classmethod IGARefineSolid.Last(model)

Returns the last IGA Refine Solid in the model

Parameters:

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

Returns:

IGARefineSolid object (or None if there are no IGA Refine Solids in the model)

Return type:

IGARefineSolid

Example

To get the last IGA Refine Solid in model m:

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

Allows the user to pick a IGA Refine Solid

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

IGARefineSolid object (or None if not picked)

Return type:

IGARefineSolid

Example

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

igrso = Oasys.PRIMER.IGARefineSolid.Pick('Pick IGA Refine Solid from screen', m)
classmethod IGARefineSolid.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

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

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

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

Return type:

int

Example

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

Oasys.PRIMER.IGARefineSolid.Select(f, 'Select IGA Refine Solids', m)

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

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

Returns the total number of IGA Refine Solids in the model

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

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

Returns:

number of IGA Refine Solids

Return type:

int

Example

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

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Instance methods

IGARefineSolid.AssociateComment(comment)

Associates a comment with a IGA Refine Solid

Parameters:

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

Returns:

No return value

Return type:

None

Example

To associate comment c to the IGA Refine Solid igrso:

igrso.AssociateComment(c)
IGARefineSolid.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 Solid igrso:

igrso.Browse()
IGARefineSolid.ClearFlag(flag)

Clears a flag on the IGA Refine Solid

Parameters:

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

Returns:

No return value

Return type:

None

Example

To clear flag f for IGA Refine Solid igrso:

igrso.ClearFlag(f)
IGARefineSolid.Copy(range=Oasys.gRPC.defaultArg)

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

IGARefineSolid object

Return type:

IGARefineSolid

Example

To copy IGA Refine Solid igrso into IGA Refine Solid z:

z = igrso.Copy()
IGARefineSolid.DetachComment(comment)

Detaches a comment from a IGA Refine Solid

Parameters:

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

Returns:

No return value

Return type:

None

Example

To detach comment c from the IGA Refine Solid igrso:

igrso.DetachComment(c)
IGARefineSolid.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 Solid igrso:

igrso.Edit()
IGARefineSolid.Flagged(flag)

Checks if the IGA Refine Solid is flagged or not

Parameters:

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

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if IGA Refine Solid igrso has flag f set on it:

if igrso.Flagged(f):
    do_something..
IGARefineSolid.GetComments()

Extracts the comments associated to a IGA Refine Solid

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 Solid igrso:

comm_list = igrso.GetComments()
IGARefineSolid.GetParameter(prop)

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

Parameters:

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

Returns:

Parameter object if property is a parameter, None if not

Return type:

Parameter

Example

To check if IGARefineSolid property igrso.example is a parameter:

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

To check if IGARefineSolid property igrso.example is a parameter by using the GetParameter method:

if igrso.ViewParameters().GetParameter(igrso.example):
    do_something..
IGARefineSolid.Keyword()

Returns the keyword for this IGA refine solid (*IGA_REFINE_SOLID). Note that a carriage return is not added See also IGARefineSolid.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for IGA refine solid igrso:

key = igrso.Keyword()
IGARefineSolid.KeywordCards()

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

Returns:

string containing the cards

Return type:

str

Example

To get the cards for IGA refine solid igrso:

cards = igrso.KeywordCards()
IGARefineSolid.Next()

Returns the next IGA Refine Solid in the model

Returns:

IGARefineSolid object (or None if there are no more IGA Refine Solids in the model)

Return type:

IGARefineSolid

Example

To get the IGA Refine Solid in model m after IGA Refine Solid igrso:

igrso = igrso.Next()
IGARefineSolid.Previous()

Returns the previous IGA Refine Solid in the model

Returns:

IGARefineSolid object (or None if there are no more IGA Refine Solids in the model)

Return type:

IGARefineSolid

Example

To get the IGA Refine Solid in model m before IGA Refine Solid igrso:

igrso = igrso.Previous()
IGARefineSolid.SetFlag(flag)

Sets a flag on the IGA Refine Solid

Parameters:

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

Returns:

No return value

Return type:

None

Example

To set flag f for IGA Refine Solid igrso:

igrso.SetFlag(f)
IGARefineSolid.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:

IGARefineSolid object

Return type:

IGARefineSolid

Example

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

if igrso.ViewParameters().GetParameter(igrso.example):
    do_something..
IGARefineSolid.Xrefs()

Returns the cross references for this IGA Refine Solid

Returns:

Xrefs object

Return type:

Xrefs

Example

To get the cross references for IGA Refine Solid igrso:

xrefs = igrso.Xrefs()