Oasys.PRIMER.ShellReferenceGeometry class¶
Properties¶
- property ShellReferenceGeometry.aid: integer¶
ShellReferenceGeometry
number. Also see thelabel
property which is an alternative name for this
- property ShellReferenceGeometry.exists(read only): boolean¶
true if airbag shell reference geometry exists, false if referred to but not defined
- property ShellReferenceGeometry.id: boolean¶
Turns _ID on or OFF
- property ShellReferenceGeometry.include: integer¶
The
Include
file number that the airbag shell reference geometry is in
- property ShellReferenceGeometry.label: integer¶
ShellReferenceGeometry
number. Also see theaid
property which is an alternative name for this
- property ShellReferenceGeometry.model(read only): integer¶
The
Model
number that the airbag shell reference geometry is in
- property ShellReferenceGeometry.rdt: boolean¶
Turns _RDT on or OFF
- property ShellReferenceGeometry.sx: float¶
Scale factor in X direction
- property ShellReferenceGeometry.sy: float¶
Scale factor in Y direction
- property ShellReferenceGeometry.sz: float¶
Scale factor in Z direction
Constructor¶
- classmethod ShellReferenceGeometry(model, aid=Oasys.gRPC.defaultArg)¶
Create a new
ShellReferenceGeometry
object
- Parameters:
model (Model) –
Model
that ShellReferenceGeometry will be created inaid (integer) – Optional.
ShellReferenceGeometry
number to set _ID suffix- Returns:
ShellReferenceGeometry object
- Return type:
dict
Example
To create a new ShellReferenceGeometry in model m
a = Oasys.PRIMER.ShellReferenceGeometry(m)
Static methods¶
- classmethod ShellReferenceGeometry.Create(model, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create an asrg
- Parameters:
model (Model) –
Model
that the asrg will be created inmodal (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:
ShellReferenceGeometry object (or None if not made)
- Return type:
dict
Example
To start creating an asrg in model m:
m = Oasys.PRIMER.ShellReferenceGeometry.Create(m)
- classmethod ShellReferenceGeometry.First(model)¶
Returns the first airbag shell reference geometry in the model
- Parameters:
model (Model) –
Model
to get first airbag shell reference geometry in- Returns:
ShellReferenceGeometry object (or None if there are no airbag shell reference geometrys in the model)
- Return type:
ShellReferenceGeometry
Example
To get the first airbag shell reference geometry in model m:
a = Oasys.PRIMER.ShellReferenceGeometry.First(m)
- classmethod ShellReferenceGeometry.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the first free airbag shell reference geometry label in the model. Also see
ShellReferenceGeometry.LastFreeLabel()
,ShellReferenceGeometry.NextFreeLabel()
andModel.FirstFreeItemLabel()
- Parameters:
model (Model) –
Model
to get first free airbag shell reference geometry label inlayer (Include number) – Optional.
Include
file (0 for the main file) to search for labels in (Equivalent to First free in layer in editing panels). If omitted the whole model will be used (Equivalent to First free in editing panels)- Returns:
ShellReferenceGeometry label
- Return type:
int
Example
To get the first free airbag shell reference geometry label in model m:
label = Oasys.PRIMER.ShellReferenceGeometry.FirstFreeLabel(m)
- classmethod ShellReferenceGeometry.FlagAll(model, flag)¶
Flags all of the airbag shell reference geometrys in the model with a defined flag
- Parameters:
model (Model) –
Model
that all airbag shell reference geometrys will be flagged inflag (Flag) – Flag to set on the airbag shell reference geometrys
- Returns:
No return value
- Return type:
None
Example
To flag all of the airbag shell reference geometrys with flag f in model m:
Oasys.PRIMER.ShellReferenceGeometry.FlagAll(m, f)
- classmethod ShellReferenceGeometry.GetAll(model)¶
Returns a list of ShellReferenceGeometry objects for all of the airbag shell reference geometrys in a model in PRIMER
- Parameters:
model (Model) –
Model
to get airbag shell reference geometrys from- Returns:
List of ShellReferenceGeometry objects
- Return type:
list
Example
To make a list of ShellReferenceGeometry objects for all of the airbag shell reference geometrys in model m
a = Oasys.PRIMER.ShellReferenceGeometry.GetAll(m)
- classmethod ShellReferenceGeometry.GetFlagged(model, flag)¶
Returns a list of ShellReferenceGeometry objects for all of the flagged airbag shell reference geometrys in a model in PRIMER
- Parameters:
model (Model) –
Model
to get airbag shell reference geometrys fromflag (Flag) – Flag set on the airbag shell reference geometrys that you want to retrieve
- Returns:
List of ShellReferenceGeometry objects
- Return type:
list
Example
To make a list of ShellReferenceGeometry objects for all of the airbag shell reference geometrys in model m flagged with f
a = Oasys.PRIMER.ShellReferenceGeometry.GetFlagged(m, f)
- classmethod ShellReferenceGeometry.GetFromID(model, number)¶
Returns the ShellReferenceGeometry object for a airbag shell reference geometry ID
- Parameters:
model (Model) –
Model
to find the airbag shell reference geometry innumber (integer) – number of the airbag shell reference geometry you want the ShellReferenceGeometry object for
- Returns:
ShellReferenceGeometry object (or None if airbag shell reference geometry does not exist)
- Return type:
ShellReferenceGeometry
Example
To get the ShellReferenceGeometry object for airbag shell reference geometry 100 in model m
a = Oasys.PRIMER.ShellReferenceGeometry.GetFromID(m, 100)
- classmethod ShellReferenceGeometry.Last(model)¶
Returns the last airbag shell reference geometry in the model
- Parameters:
model (Model) –
Model
to get last airbag shell reference geometry in- Returns:
ShellReferenceGeometry object (or None if there are no airbag shell reference geometrys in the model)
- Return type:
ShellReferenceGeometry
Example
To get the last airbag shell reference geometry in model m:
a = Oasys.PRIMER.ShellReferenceGeometry.Last(m)
- classmethod ShellReferenceGeometry.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the last free airbag shell reference geometry label in the model. Also see
ShellReferenceGeometry.FirstFreeLabel()
,ShellReferenceGeometry.NextFreeLabel()
and seeModel.LastFreeItemLabel()
- Parameters:
- Returns:
ShellReferenceGeometry label
- Return type:
int
Example
To get the last free airbag shell reference geometry label in model m:
label = Oasys.PRIMER.ShellReferenceGeometry.LastFreeLabel(m)
- classmethod ShellReferenceGeometry.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the next free (highest+1) airbag shell reference geometry label in the model. Also see
ShellReferenceGeometry.FirstFreeLabel()
,ShellReferenceGeometry.LastFreeLabel()
andModel.NextFreeItemLabel()
- Parameters:
model (Model) –
Model
to get next free airbag shell reference geometry label inlayer (Include number) – Optional.
Include
file (0 for the main file) to search for labels in (Equivalent to Highest+1 in layer in editing panels). If omitted the whole model will be used (Equivalent to Highest+1 in editing panels)- Returns:
ShellReferenceGeometry label
- Return type:
int
Example
To get the next free airbag shell reference geometry label in model m:
label = Oasys.PRIMER.ShellReferenceGeometry.NextFreeLabel(m)
- classmethod ShellReferenceGeometry.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)¶
Allows the user to pick a airbag shell reference geometry
- 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 airbag shell reference geometrys from that model can be picked. If the argument is aFlag
then only airbag shell reference geometrys that are flagged with limit can be selected. If omitted, or None, any airbag shell reference geometrys from any model can be selected. from any modelmodal (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:
ShellReferenceGeometry object (or None if not picked)
- Return type:
dict
Example
To pick a airbag shell reference geometry from model m giving the prompt ‘Pick airbag shell reference geometry from screen’:
a = Oasys.PRIMER.ShellReferenceGeometry.Pick('Pick airbag shell reference geometry from screen', m)
- classmethod ShellReferenceGeometry.RenumberAll(model, start)¶
Renumbers all of the airbag shell reference geometrys in the model
- Parameters:
model (Model) –
Model
that all airbag shell reference geometrys will be renumbered instart (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the airbag shell reference geometrys in model m, from 1000000:
Oasys.PRIMER.ShellReferenceGeometry.RenumberAll(m, 1000000)
- classmethod ShellReferenceGeometry.RenumberFlagged(model, flag, start)¶
Renumbers all of the flagged airbag shell reference geometrys in the model
- Parameters:
model (Model) –
Model
that all the flagged airbag shell reference geometrys will be renumbered inflag (Flag) – Flag set on the airbag shell reference geometrys that you want to renumber
start (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the airbag shell reference geometrys in model m flagged with f, from 1000000:
Oasys.PRIMER.ShellReferenceGeometry.RenumberFlagged(m, f, 1000000)
- classmethod ShellReferenceGeometry.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select airbag shell reference geometrys using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting airbag shell reference geometrys
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only airbag shell reference geometrys from that model can be selected. If the argument is aFlag
then only airbag shell reference geometrys that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any airbag shell reference geometrys can be selected. from any modelmodal (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 airbag shell reference geometrys selected or None if menu cancelled
- Return type:
int
Example
To select airbag shell reference geometrys from model m, flagging those selected with flag f, giving the prompt ‘Select airbag shell reference geometrys’:
Oasys.PRIMER.ShellReferenceGeometry.Select(f, 'Select airbag shell reference geometrys', m)To select airbag shell reference geometrys, flagging those selected with flag f but limiting selection to airbag shell reference geometrys flagged with flag l, giving the prompt ‘Select airbag shell reference geometrys’:
Oasys.PRIMER.ShellReferenceGeometry.Select(f, 'Select airbag shell reference geometrys', l)
- classmethod ShellReferenceGeometry.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged airbag shell reference geometrys in the model. The airbag shell reference geometrys will be sketched until you either call
ShellReferenceGeometry.Unsketch()
,ShellReferenceGeometry.UnsketchFlagged()
,Model.UnsketchAll()
, or delete the model
- Parameters:
model (Model) –
Model
that all the flagged airbag shell reference geometrys will be sketched inflag (Flag) – Flag set on the airbag shell reference geometrys that you want to sketch
redraw (boolean) – Optional. If model should be redrawn or not after the airbag shell reference geometrys are sketched. If omitted redraw is true. If you want to sketch flagged airbag shell reference geometrys 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 airbag shell reference geometrys flagged with flag in model m:
Oasys.PRIMER.ShellReferenceGeometry.SketchFlagged(m, flag)
- classmethod ShellReferenceGeometry.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of airbag shell reference geometrys in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing airbag shell reference geometrys should be counted. If false or omitted referenced but undefined airbag shell reference geometrys will also be included in the total
- Returns:
number of airbag shell reference geometrys
- Return type:
int
Example
To get the total number of airbag shell reference geometrys in model m:
total = Oasys.PRIMER.ShellReferenceGeometry.Total(m)
- classmethod ShellReferenceGeometry.UnflagAll(model, flag)¶
Unsets a defined flag on all of the airbag shell reference geometrys in the model
- Parameters:
model (Model) –
Model
that the defined flag for all airbag shell reference geometrys will be unset inflag (Flag) – Flag to unset on the airbag shell reference geometrys
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the airbag shell reference geometrys in model m:
Oasys.PRIMER.ShellReferenceGeometry.UnflagAll(m, f)
- classmethod ShellReferenceGeometry.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all airbag shell reference geometrys
- Parameters:
model (Model) –
Model
that all airbag shell reference geometrys will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the airbag shell reference geometrys 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 airbag shell reference geometrys in model m:
Oasys.PRIMER.ShellReferenceGeometry.UnsketchAll(m)
- classmethod ShellReferenceGeometry.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged airbag shell reference geometrys in the model
- Parameters:
model (Model) –
Model
that all airbag shell reference geometrys will be unsketched inflag (Flag) – Flag set on the airbag shell reference geometrys that you want to unsketch
redraw (boolean) – Optional. If model should be redrawn or not after the airbag shell reference geometrys 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 airbag shell reference geometrys flagged with flag in model m:
Oasys.PRIMER.ShellReferenceGeometry.UnsketchAll(m, flag)
Instance methods¶
- ShellReferenceGeometry.AssociateComment(comment)¶
Associates a comment with a airbag shell reference geometry
- Parameters:
comment (Comment) –
Comment
that will be attached to the airbag shell reference geometry- Returns:
No return value
- Return type:
None
Example
To associate comment c to the airbag shell reference geometry a:
a.AssociateComment(c)
- ShellReferenceGeometry.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 airbag shell reference geometry a:
a.Browse()
- ShellReferenceGeometry.ClearFlag(flag)¶
Clears a flag on the airbag shell reference geometry
- Parameters:
flag (Flag) – Flag to clear on the airbag shell reference geometry
- Returns:
No return value
- Return type:
None
Example
To clear flag f for airbag shell reference geometry a:
a.ClearFlag(f)
- ShellReferenceGeometry.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the airbag shell reference geometry. The target include of the copied airbag shell reference geometry 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:
ShellReferenceGeometry object
- Return type:
ShellReferenceGeometry
Example
To copy airbag shell reference geometry a into airbag shell reference geometry z:
z = a.Copy()
- ShellReferenceGeometry.DetachComment(comment)¶
Detaches a comment from a airbag shell reference geometry
- Parameters:
comment (Comment) –
Comment
that will be detached from the airbag shell reference geometry- Returns:
No return value
- Return type:
None
Example
To detach comment c from the airbag shell reference geometry a:
a.DetachComment(c)
- ShellReferenceGeometry.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 airbag shell reference geometry a:
a.Edit()
- ShellReferenceGeometry.Flagged(flag)¶
Checks if the airbag shell reference geometry is flagged or not
- Parameters:
flag (Flag) – Flag to test on the airbag shell reference geometry
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if airbag shell reference geometry a has flag f set on it:
if a.Flagged(f): do_something..
- ShellReferenceGeometry.GetComments()¶
Extracts the comments associated to a airbag shell reference geometry
- 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 airbag shell reference geometry a:
comm_list = a.GetComments()
- ShellReferenceGeometry.GetParameter(prop)¶
Checks if a ShellReferenceGeometry 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 theShellReferenceGeometry.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – airbag shell reference geometry property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if ShellReferenceGeometry property a.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if a.GetParameter(a.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if ShellReferenceGeometry property a.example is a parameter by using the GetParameter method:
if a.ViewParameters().GetParameter(a.example): do_something..
- ShellReferenceGeometry.GetShell(eid)¶
Returns the shell reference geometry nodes and pid for the shell
- Parameters:
eid (integer) – Shell element ID
- Returns:
A list containing the four reference node labels and the part ID (or None if the shell is not on the shell reference geometry)
- Return type:
list
Example
To get the node and part data of shell number eid on shell reference geometry a
data = a.GetShell(eid) n1 = data[0] n2 = data[1] n3 = data[2] n4 = data[3] pid = data[4]
- ShellReferenceGeometry.Keyword()¶
Returns the keyword for this shell_reference_geometry (*AIRBAG_SHELL_REFERENCE_GEOMETRY). Note that a carriage return is not added. See also
ShellReferenceGeometry.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for shell_reference_geometry a:
key = a.Keyword()
- ShellReferenceGeometry.KeywordCards()¶
Returns the keyword cards for the shell_reference_geometry. Note that a carriage return is not added. See also
ShellReferenceGeometry.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for airbag shell reference geometry a:
cards = b.KeywordCards()
- ShellReferenceGeometry.Next()¶
Returns the next airbag shell reference geometry in the model
- Returns:
ShellReferenceGeometry object (or None if there are no more airbag shell reference geometrys in the model)
- Return type:
ShellReferenceGeometry
Example
To get the airbag shell reference geometry in model m after airbag shell reference geometry a:
a = a.Next()
- ShellReferenceGeometry.Previous()¶
Returns the previous airbag shell reference geometry in the model
- Returns:
ShellReferenceGeometry object (or None if there are no more airbag shell reference geometrys in the model)
- Return type:
ShellReferenceGeometry
Example
To get the airbag shell reference geometry in model m before airbag shell reference geometry a:
a = a.Previous()
- ShellReferenceGeometry.RemoveShell(eid)¶
Removes a shell from the shell reference geometry if it is on it
- Parameters:
eid (integer) – Element ID
- Returns:
No return value
- Return type:
None
Example
To remove shell 11 from shell reference geometry a:
a.RemoveShell(11)
- ShellReferenceGeometry.SetFlag(flag)¶
Sets a flag on the airbag shell reference geometry
- Parameters:
flag (Flag) – Flag to set on the airbag shell reference geometry
- Returns:
No return value
- Return type:
None
Example
To set flag f for airbag shell reference geometry a:
a.SetFlag(f)
- ShellReferenceGeometry.SetShell(eid, n1, n2, n3, n4, pid=Oasys.gRPC.defaultArg)¶
Adds a shell to the shell reference geometry if not already there, otherwise just changes the reference nodes
- Parameters:
eid (integer) – Element ID
n1 (integer) – Nodal point 1
n2 (integer) – Nodal point 2
n3 (integer) – Nodal point 3
n4 (integer) – Nodal point 4
pid (integer) – Optional. Part ID (ignored by LS-DYNA). If omitted pid will be zero
- Returns:
No return value
- Return type:
None
Example
To add shell 11 to shell reference geometry a with nodal points 12, 13, 14, 15 (and part ID 0):
a.SetShell(11, 12, 13, 14, 15)To add shell 11 to shell reference geometry a with nodal points 12, 13, 14, 15 and pid 100:
a.SetShell(11, 12, 13, 14, 15, 100)
- ShellReferenceGeometry.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the airbag shell reference geometry. The airbag shell reference geometry will be sketched until you either call
ShellReferenceGeometry.Unsketch()
,ShellReferenceGeometry.UnsketchAll()
,Model.UnsketchAll()
, or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the airbag shell reference geometry is sketched. If omitted redraw is true. If you want to sketch several airbag shell reference geometrys 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 airbag shell reference geometry a:
a.Sketch()
- ShellReferenceGeometry.Spool()¶
Spools a shell reference geometry, entry by entry. See also
ShellReferenceGeometry.StartSpool
- Returns:
Returns a list containing the shell ID and the four nodal point labels. Returns 0 if no more items
- Return type:
list
Example
To spool shell reference geometry a:
a.StartSpool() while mylist := a.Spool(): do something..
- ShellReferenceGeometry.StartSpool()¶
Starts a shell reference geometry spooling operation. See also
ShellReferenceGeometry.Spool
- Returns:
No return value
- Return type:
None
Example
To start spooling shell reference geometry a:
a.StartSpool()
- ShellReferenceGeometry.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the airbag shell reference geometry
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the airbag shell reference geometry is unsketched. If omitted redraw is true. If you want to unsketch several airbag shell reference geometrys 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 airbag shell reference geometry a:
a.Unsketch()
- ShellReferenceGeometry.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:
ShellReferenceGeometry object
- Return type:
dict
Example
To check if ShellReferenceGeometry property a.example is a parameter by using the
ShellReferenceGeometry.GetParameter()
method:if a.ViewParameters().GetParameter(a.example): do_something..
- ShellReferenceGeometry.Xrefs()¶
Returns the cross references for this airbag shell reference geometry
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for airbag shell reference geometry a:
xrefs = a.Xrefs()