Oasys.PRIMER.IGASolid class

Properties

property IGASolid.exists(read only): boolean

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

property IGASolid.id(read only): integer

ID of the IGA solid. Only used in PRIMER

property IGASolid.include: integer

The Include file number that the IGA Solid is in

property IGASolid.model(read only): integer

The Model number that the IGA Solid is in

property IGASolid.nisr: float

Interpolation elements in the local r-direction

property IGASolid.niss: float

Interpolation elements in the local s-direction

property IGASolid.nist: float

Interpolation elements in the local t-direction

property IGASolid.pid: integer

Part ID

property IGASolid.rid: integer

Solid refinement ID

property IGASolid.sid: integer

Isogeometric Solid (patch) ID

Constructor

classmethod IGASolid(model, details)

Create a new IGASolid object

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

  • details (dict) –

    Details for creating the IGASolid

    nisr (optional):

    (float) Interpolation elements in the local r-direction

    niss (optional):

    (float) Interpolation elements in the local s-direction

    nist (optional):

    (float) Interpolation elements in the local t-direction

    pid:

    (integer) Part ID

    rid (optional):

    (integer) Solid refinement ID

    sid:

    (integer) Isogeometric Solid (patch) ID

Returns:

IGASolid object

Return type:

IGASolid

Example

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

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

To create a new IGA solid in model m using sid 20, part id 200 with nisr as 3.3, niss as 4.4, nist as 5.5 and rid as 6:

igso = Oasys.PRIMER.IGASolid((m, {'sid': 20, 'pid': 200, 'nisr': 3.3, 'niss': 4.4, 'nist': 5.5, 'rid': 6})

Static methods

classmethod IGASolid.BlankAll(model, redraw=Oasys.gRPC.defaultArg)

Blanks all of the IGA Solids in the model

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

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To blank all of the IGA Solids in model m:

Oasys.PRIMER.IGASolid.BlankAll(m)
classmethod IGASolid.BlankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Blanks all of the flagged IGA Solids in the model

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

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

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To blank all of the IGA Solids in model m flagged with f:

Oasys.PRIMER.IGASolid.BlankFlagged(m, f)
classmethod IGASolid.Create(model, modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel to create a IGA Solid

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

IGASolid object (or None if not made)

Return type:

IGASolid

Example

To start creating a IGA Solid in model m:

igso = Oasys.PRIMER.IGASolid.Create(m)
classmethod IGASolid.First(model)

Returns the first IGA Solid in the model

Parameters:

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

Returns:

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

Return type:

IGASolid

Example

To get the first IGA Solid in model m:

igso = Oasys.PRIMER.IGASolid.First(m)
classmethod IGASolid.FlagAll(model, flag)

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

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

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

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

Returns:

List of IGASolid objects or properties

Return type:

list

Example

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

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

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

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

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

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

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

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

Returns:

List of IGASolid objects or properties

Return type:

list

Example

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

igso = Oasys.PRIMER.IGASolid.GetFlagged(m, f)

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

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

Returns the IGASolid object for a IGA Solid ID

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

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

Returns:

IGASolid object (or None if IGA Solid does not exist)

Return type:

IGASolid

Example

To get the IGASolid object for IGA Solid 100 in model m

igso = Oasys.PRIMER.IGASolid.GetFromID(m, 100)
classmethod IGASolid.Last(model)

Returns the last IGA Solid in the model

Parameters:

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

Returns:

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

Return type:

IGASolid

Example

To get the last IGA Solid in model m:

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

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

IGASolid object (or None if not picked)

Return type:

IGASolid

Example

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

igso = Oasys.PRIMER.IGASolid.Pick('Pick IGA Solid from screen', m)
classmethod IGASolid.RedrawAll(model)

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

Parameters:

model (Model) – Model to redraw IGA SOLIDs in

Returns:

No return value

Return type:

None

Example

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

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

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

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

Return type:

int

Example

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

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

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

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

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

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

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

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

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

Returns the total number of IGA Solids in the model

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

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

Returns:

number of IGA Solids

Return type:

int

Example

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

total = Oasys.PRIMER.IGASolid.Total(m)
classmethod IGASolid.UnblankAll(model, redraw=Oasys.gRPC.defaultArg)

Unblanks all of the IGA Solids in the model

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

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To unblank all of the IGA Solids in model m:

Oasys.PRIMER.IGASolid.UnblankAll(m)
classmethod IGASolid.UnblankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

Unblanks all of the flagged IGA Solids in the model

Parameters:
  • model (Model) – Model that the flagged IGA Solids will be unblanked in

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

  • redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using View.Redraw()

Returns:

No return value

Return type:

None

Example

To unblank all of the IGA Solids in model m flagged with f:

Oasys.PRIMER.IGASolid.UnblankFlagged(m, f)
classmethod IGASolid.UnflagAll(model, flag)

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Unsketches all IGA Solids

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

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

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

Unsketches all flagged IGA Solids in the model

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

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

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

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

Instance methods

IGASolid.AssociateComment(comment)

Associates a comment with a IGA Solid

Parameters:

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

Returns:

No return value

Return type:

None

Example

To associate comment c to the IGA Solid igso:

igso.AssociateComment(c)
IGASolid.Blank()

Blanks the IGA Solid

Returns:

No return value

Return type:

None

Example

To blank IGA Solid igso:

igso.Blank()
IGASolid.Blanked()

Checks if the IGA Solid is blanked or not

Returns:

True if blanked, False if not

Return type:

bool

Example

To check if IGA Solid igso is blanked:

if igso.Blanked():
    do_something..
IGASolid.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 Solid igso:

igso.Browse()
IGASolid.ClearFlag(flag)

Clears a flag on the IGA Solid

Parameters:

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

Returns:

No return value

Return type:

None

Example

To clear flag f for IGA Solid igso:

igso.ClearFlag(f)
IGASolid.Copy(range=Oasys.gRPC.defaultArg)

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

IGASolid object

Return type:

IGASolid

Example

To copy IGA Solid igso into IGA Solid z:

z = igso.Copy()
IGASolid.DetachComment(comment)

Detaches a comment from a IGA Solid

Parameters:

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

Returns:

No return value

Return type:

None

Example

To detach comment c from the IGA Solid igso:

igso.DetachComment(c)
IGASolid.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 Solid igso:

igso.Edit()
IGASolid.Flagged(flag)

Checks if the IGA Solid is flagged or not

Parameters:

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

Returns:

True if flagged, False if not

Return type:

bool

Example

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

if igso.Flagged(f):
    do_something..
IGASolid.GetComments()

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

comm_list = igso.GetComments()
IGASolid.GetParameter(prop)

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

Parameters:

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

Returns:

Parameter object if property is a parameter, None if not

Return type:

Parameter

Example

To check if IGASolid property igso.example is a parameter:

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

To check if IGASolid property igso.example is a parameter by using the GetParameter method:

if igso.ViewParameters().GetParameter(igso.example):
    do_something..
IGASolid.Keyword()

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

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for IGA solid igs:

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

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

Returns:

string containing the cards

Return type:

str

Example

To get the cards for IGA solid igs:

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

Returns the next IGA Solid in the model

Returns:

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

Return type:

IGASolid

Example

To get the IGA Solid in model m after IGA Solid igso:

igso = igso.Next()
IGASolid.Previous()

Returns the previous IGA Solid in the model

Returns:

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

Return type:

IGASolid

Example

To get the IGA Solid in model m before IGA Solid igso:

igso = igso.Previous()
IGASolid.SetFlag(flag)

Sets a flag on the IGA Solid

Parameters:

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

Returns:

No return value

Return type:

None

Example

To set flag f for IGA Solid igso:

igso.SetFlag(f)
IGASolid.Sketch(redraw=Oasys.gRPC.defaultArg)

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

Parameters:

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

igso.Sketch()
IGASolid.Unblank()

Unblanks the IGA Solid

Returns:

No return value

Return type:

None

Example

To unblank IGA Solid igso:

igso.Unblank()
IGASolid.Unsketch(redraw=Oasys.gRPC.defaultArg)

Unsketches the IGA Solid

Parameters:

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

igso.Unsketch()
IGASolid.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:

IGASolid object

Return type:

IGASolid

Example

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

if igso.ViewParameters().GetParameter(igso.example):
    do_something..
IGASolid.Xrefs()

Returns the cross references for this IGA Solid

Returns:

Xrefs object

Return type:

Xrefs

Example

To get the cross references for IGA Solid igso:

xrefs = igso.Xrefs()