Oasys.PRIMER.IGAShell class

Properties

property IGAShell.exists(read only): boolean

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

property IGAShell.id(read only): integer

ID of the IGA shell. Only used in PRIMER

property IGAShell.idfne: integer

Element ID of the first IGA element

property IGAShell.include: integer

The Include file number that the IGA Shell is in

property IGAShell.model(read only): integer

The Model number that the IGA Shell is in

property IGAShell.nisr: float

Interpolation elements in the local r-direction

property IGAShell.niss: float

Interpolation elements in the local s-direction

property IGAShell.pid: integer

Part ID

property IGAShell.sid: integer

Isogeometric Shell (patch) ID

Constructor

classmethod IGAShell(model, details)

Create a new IGAShell object

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

  • details (dict) –

    Details for creating the IGAShell

    idfne (optional):

    (integer) Element ID of the first IGA element

    nisr (optional):

    (float) Interpolation elements in the local r-direction

    niss (optional):

    (float) Interpolation elements in the local s-direction

    pid:

    (integer) Part ID

    sid:

    (integer) Isogeometric Shell (patch) ID

Returns:

IGAShell object

Return type:

IGAShell

Example

To create a new IGA shell in model m using sid 10, part id 100:

igsh = Oasys.PRIMER.IGAShell((m, {'sid': 10, 'pid': 100})

To create a new IGA shell in model m using sid 20, part id 200 with nisr as 3.3, niss as 4.4 and idfne as 50:

igsh = Oasys.PRIMER.IGAShell((m, {'sid': 20, 'pid': 200, 'nisr': 3.3, 'niss': 4.4, 'idfne': 50})

Static methods

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

Starts an interactive editing panel to create a IGA Shell

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

IGAShell object (or None if not made)

Return type:

IGAShell

Example

To start creating a IGA Shell in model m:

igsh = Oasys.PRIMER.IGAShell.Create(m)
classmethod IGAShell.First(model)

Returns the first IGA Shell in the model

Parameters:

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

Returns:

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

Return type:

IGAShell

Example

To get the first IGA Shell in model m:

igsh = Oasys.PRIMER.IGAShell.First(m)
classmethod IGAShell.FlagAll(model, flag)

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

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

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

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

Returns:

List of IGAShell objects or properties

Return type:

list

Example

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

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

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

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

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

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

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

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

Returns:

List of IGAShell objects or properties

Return type:

list

Example

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

igsh = Oasys.PRIMER.IGAShell.GetFlagged(m, f)

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

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

Returns the IGAShell object for a IGA Shell ID

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

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

Returns:

IGAShell object (or None if IGA Shell does not exist)

Return type:

IGAShell

Example

To get the IGAShell object for IGA Shell 100 in model m

igsh = Oasys.PRIMER.IGAShell.GetFromID(m, 100)
classmethod IGAShell.Last(model)

Returns the last IGA Shell in the model

Parameters:

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

Returns:

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

Return type:

IGAShell

Example

To get the last IGA Shell in model m:

igsh = Oasys.PRIMER.IGAShell.Last(m)
classmethod IGAShell.RedrawAll(model)

Redraws all *IGA_SHELLs whose graphics are out of date in a specified model

Parameters:

model (Model) – Model to redraw IGA SHELLs in

Returns:

No return value

Return type:

None

Example

Redraw all out of date *IGA_SHELLs following a change to an *IGA_SHELL or related IGA entity in model m1:

Oasys.PRIMER.IGAShell.RedrawAll(m1)
classmethod IGAShell.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

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

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

Return type:

int

Example

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

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

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

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

Sketches all of the flagged IGA Shells in the model. The IGA Shells will be sketched until you either call IGAShell.Unsketch(), IGAShell.UnsketchFlagged(), Model.UnsketchAll(), or delete the model

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

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

  • redraw (boolean) – Optional. If model should be redrawn or not after the IGA Shells are sketched. If omitted redraw is true. If you want to sketch flagged IGA Shells 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 Shells flagged with flag in model m:

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

Returns the total number of IGA Shells in the model

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

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

Returns:

number of IGA Shells

Return type:

int

Example

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

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Unsketches all IGA Shells

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

  • redraw (boolean) – Optional. If model should be redrawn or not after the IGA Shells 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 Shells in model m:

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

Unsketches all flagged IGA Shells in the model

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

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

  • redraw (boolean) – Optional. If model should be redrawn or not after the IGA Shells 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 Shells flagged with flag in model m:

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

Instance methods

IGAShell.AssociateComment(comment)

Associates a comment with a IGA Shell

Parameters:

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

Returns:

No return value

Return type:

None

Example

To associate comment c to the IGA Shell igsh:

igsh.AssociateComment(c)
IGAShell.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 Shell igsh:

igsh.Browse()
IGAShell.ClearFlag(flag)

Clears a flag on the IGA Shell

Parameters:

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

Returns:

No return value

Return type:

None

Example

To clear flag f for IGA Shell igsh:

igsh.ClearFlag(f)
IGAShell.Copy(range=Oasys.gRPC.defaultArg)

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

IGAShell object

Return type:

IGAShell

Example

To copy IGA Shell igsh into IGA Shell z:

z = igsh.Copy()
IGAShell.DetachComment(comment)

Detaches a comment from a IGA Shell

Parameters:

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

Returns:

No return value

Return type:

None

Example

To detach comment c from the IGA Shell igsh:

igsh.DetachComment(c)
IGAShell.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 Shell igsh:

igsh.Edit()
IGAShell.Flagged(flag)

Checks if the IGA Shell is flagged or not

Parameters:

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

Returns:

True if flagged, False if not

Return type:

bool

Example

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

if igsh.Flagged(f):
    do_something..
IGAShell.GetComments()

Extracts the comments associated to a IGA 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 Shell igsh:

comm_list = igsh.GetComments()
IGAShell.GetParameter(prop)

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

Parameters:

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

Returns:

Parameter object if property is a parameter, None if not

Return type:

Parameter

Example

To check if IGAShell property igsh.example is a parameter:

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

To check if IGAShell property igsh.example is a parameter by using the GetParameter method:

if igsh.ViewParameters().GetParameter(igsh.example):
    do_something..
IGAShell.Keyword()

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

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for IGA shell igs:

key = igs.Keyword()
IGAShell.KeywordCards()

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

Returns:

string containing the cards

Return type:

str

Example

To get the cards for IGA shell igs:

cards = igs.KeywordCards()
IGAShell.Next()

Returns the next IGA Shell in the model

Returns:

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

Return type:

IGAShell

Example

To get the IGA Shell in model m after IGA Shell igsh:

igsh = igsh.Next()
IGAShell.Previous()

Returns the previous IGA Shell in the model

Returns:

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

Return type:

IGAShell

Example

To get the IGA Shell in model m before IGA Shell igsh:

igsh = igsh.Previous()
IGAShell.SetFlag(flag)

Sets a flag on the IGA Shell

Parameters:

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

Returns:

No return value

Return type:

None

Example

To set flag f for IGA Shell igsh:

igsh.SetFlag(f)
IGAShell.Sketch(redraw=Oasys.gRPC.defaultArg)

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

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the IGA Shell is sketched. If omitted redraw is true. If you want to sketch several IGA Shells 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 Shell igsh:

igsh.Sketch()
IGAShell.Unsketch(redraw=Oasys.gRPC.defaultArg)

Unsketches the IGA Shell

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not after the IGA Shell is unsketched. If omitted redraw is true. If you want to unsketch several IGA Shells 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 Shell igsh:

igsh.Unsketch()
IGAShell.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:

IGAShell object

Return type:

IGAShell

Example

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

if igsh.ViewParameters().GetParameter(igsh.example):
    do_something..
IGAShell.Xrefs()

Returns the cross references for this IGA Shell

Returns:

Xrefs object

Return type:

Xrefs

Example

To get the cross references for IGA Shell igsh:

xrefs = igsh.Xrefs()