Oasys.PRIMER.Interpolation class¶
Constants¶
Properties¶
- property Interpolation.cidd: integer¶
Coordinate System
ID if LOCAL option is active
- property Interpolation.ddof: integer¶
Dependent Degrees-of-Freedom
- property Interpolation.exists(read only): boolean¶
true if Interpolation exists, false if referred to but not defined
- property Interpolation.fgm: integer¶
Flag for special treatment of this constraint for implicit problems only
- property Interpolation.icid: integer¶
Interpolation
label
- property Interpolation.indsw: integer¶
Switch for controlling the explicit solution when an independent (or dependent) node is deleted
- property Interpolation.ityp: constant¶
The Independent Node type. Can be
Interpolation.NODE
orInterpolation.NODE_SET
- property Interpolation.local: boolean¶
true if _LOCAL is set
- property Interpolation.model(read only): integer¶
The
Model
number that the constrained interpolation is in
- property Interpolation.total(read only): integer¶
Total number of INID fields in the keyword
Constructor¶
- classmethod Interpolation(model, icid, dnid, inid, ddof=Oasys.gRPC.defaultArg, local=Oasys.gRPC.defaultArg, cidd=Oasys.gRPC.defaultArg, ityp=Oasys.gRPC.defaultArg, idof=Oasys.gRPC.defaultArg, twghtx=Oasys.gRPC.defaultArg, twghty=Oasys.gRPC.defaultArg, twghtz=Oasys.gRPC.defaultArg, rwghtx=Oasys.gRPC.defaultArg, rwghty=Oasys.gRPC.defaultArg, rwghtz=Oasys.gRPC.defaultArg, cidi=Oasys.gRPC.defaultArg)¶
Create a new
Interpolation
object
- Parameters:
model (Model) –
Model
that Interpolation will be created inicid (integer) –
Interpolation
labeldnid (integer) – Dependent
Node
idddof (integer) – Optional. Dependent Degrees-of-Freedom. The default value is 123456
local (boolean) – Optional. true if _LOCAL is set
cidd (integer) – Optional.
Coordinate System
ID if LOCAL option is active. The default value is 0ityp (constant) – Optional. The Independent Node type. Can be
Interpolation.NODE
orInterpolation.NODE_SET
. The default value is Interpolation.NODEidof (integer) – Optional. Independent Degrees-of-Freedom. The default value is 123456
twghtx (float) – Optional. Weighting factor for INID. Scales the x-translational component. The default value is 1.0
twghty (float) – Optional. Weighting factor for INID. Scales the y-translational component. The default value is twghtx
twghtz (float) – Optional. Weighting factor for INID. Scales the z-translational component. The default value is twghtx
rwghtx (float) – Optional. Weighting factor for INID. Scales the x-rotational component. The default value is twghtx
rwghty (float) – Optional. Weighting factor for INID. Scales the y-rotational component. The default value is twghtx
rwghtz (float) – Optional. Weighting factor for INID. Scales the z-rotational component. The default value is twghtx
cidi (integer) – Optional.
Coordinate System
ID if LOCAL option is active. The default value is 0- Returns:
Interpolation object
- Return type:
dict
Example
To create a new constrained interpolation in model m, of icid 2, dnid 12, inid 10, ddof 123, local true, cidd 22, ityp NODE_SET, idof 12, and twghtx 2.24
c_i = Oasys.PRIMER.Interpolation(m,2,12,10,123,True,22,Oasys.PRIMER.Interpolation.NODE_SET,12,2.24)
Static methods¶
- classmethod Interpolation.BlankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the constrained interpolations in the model
- Parameters:
model (Model) –
Model
that all constrained interpolations will be blanked inredraw (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 constrained interpolations in model m:
Oasys.PRIMER.Interpolation.BlankAll(m)
- classmethod Interpolation.BlankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the flagged constrained interpolations in the model
- Parameters:
model (Model) –
Model
that all the flagged constrained interpolations will be blanked inflag (Flag) – Flag set on the constrained interpolations 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 constrained interpolations in model m flagged with f:
Oasys.PRIMER.Interpolation.BlankFlagged(m, f)
- classmethod Interpolation.Create(model, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create a Interpolation
- Parameters:
model (Model) –
Model
that the constrainedInterpolation 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:
Interpolation object (or None if not made)
- Return type:
dict
Example
To start creating a constrainedInterpolation in model n:
c_i = Oasys.PRIMER.Interpolation.Create(m)
- classmethod Interpolation.First(model)¶
Returns the first constrained interpolation in the model
- Parameters:
model (Model) –
Model
to get first constrained interpolation in- Returns:
Interpolation object (or None if there are no constrained interpolations in the model)
- Return type:
Interpolation
Example
To get the first constrained interpolation in model m:
c_i = Oasys.PRIMER.Interpolation.First(m)
- classmethod Interpolation.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the first free constrained interpolation label in the model. Also see
Interpolation.LastFreeLabel()
,Interpolation.NextFreeLabel()
andModel.FirstFreeItemLabel()
- Parameters:
model (Model) –
Model
to get first free constrained interpolation 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:
Interpolation label
- Return type:
int
Example
To get the first free constrained interpolation label in model m:
label = Oasys.PRIMER.Interpolation.FirstFreeLabel(m)
- classmethod Interpolation.FlagAll(model, flag)¶
Flags all of the constrained interpolations in the model with a defined flag
- Parameters:
model (Model) –
Model
that all constrained interpolations will be flagged inflag (Flag) – Flag to set on the constrained interpolations
- Returns:
No return value
- Return type:
None
Example
To flag all of the constrained interpolations with flag f in model m:
Oasys.PRIMER.Interpolation.FlagAll(m, f)
- classmethod Interpolation.GetAll(model)¶
Returns a list of Interpolation objects for all of the constrained interpolations in a model in PRIMER
- Parameters:
model (Model) –
Model
to get constrained interpolations from- Returns:
List of Interpolation objects
- Return type:
list
Example
To make a list of Interpolation objects for all of the constrained interpolations in model m
c_i = Oasys.PRIMER.Interpolation.GetAll(m)
- classmethod Interpolation.GetFlagged(model, flag)¶
Returns a list of Interpolation objects for all of the flagged constrained interpolations in a model in PRIMER
- Parameters:
model (Model) –
Model
to get constrained interpolations fromflag (Flag) – Flag set on the constrained interpolations that you want to retrieve
- Returns:
List of Interpolation objects
- Return type:
list
Example
To make a list of Interpolation objects for all of the constrained interpolations in model m flagged with f
c_i = Oasys.PRIMER.Interpolation.GetFlagged(m, f)
- classmethod Interpolation.GetFromID(model, number)¶
Returns the Interpolation object for a constrained interpolation ID
- Parameters:
model (Model) –
Model
to find the constrained interpolation innumber (integer) – number of the constrained interpolation you want the Interpolation object for
- Returns:
Interpolation object (or None if constrained interpolation does not exist)
- Return type:
Interpolation
Example
To get the Interpolation object for constrained interpolation 100 in model m
c_i = Oasys.PRIMER.Interpolation.GetFromID(m, 100)
- classmethod Interpolation.Last(model)¶
Returns the last constrained interpolation in the model
- Parameters:
model (Model) –
Model
to get last constrained interpolation in- Returns:
Interpolation object (or None if there are no constrained interpolations in the model)
- Return type:
Interpolation
Example
To get the last constrained interpolation in model m:
c_i = Oasys.PRIMER.Interpolation.Last(m)
- classmethod Interpolation.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the last free constrained interpolation label in the model. Also see
Interpolation.FirstFreeLabel()
,Interpolation.NextFreeLabel()
and seeModel.LastFreeItemLabel()
- Parameters:
- Returns:
Interpolation label
- Return type:
int
Example
To get the last free constrained interpolation label in model m:
label = Oasys.PRIMER.Interpolation.LastFreeLabel(m)
- classmethod Interpolation.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the next free (highest+1) constrained interpolation label in the model. Also see
Interpolation.FirstFreeLabel()
,Interpolation.LastFreeLabel()
andModel.NextFreeItemLabel()
- Parameters:
model (Model) –
Model
to get next free constrained interpolation 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:
Interpolation label
- Return type:
int
Example
To get the next free constrained interpolation label in model m:
label = Oasys.PRIMER.Interpolation.NextFreeLabel(m)
- classmethod Interpolation.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)¶
Allows the user to pick a constrained interpolation
- 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 constrained interpolations from that model can be picked. If the argument is aFlag
then only constrained interpolations that are flagged with limit can be selected. If omitted, or None, any constrained interpolations 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:
Interpolation object (or None if not picked)
- Return type:
dict
Example
To pick a constrained interpolation from model m giving the prompt ‘Pick constrained interpolation from screen’:
c_i = Oasys.PRIMER.Interpolation.Pick('Pick constrained interpolation from screen', m)
- classmethod Interpolation.RenumberAll(model, start)¶
Renumbers all of the constrained interpolations in the model
- Parameters:
model (Model) –
Model
that all constrained interpolations will be renumbered instart (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the constrained interpolations in model m, from 1000000:
Oasys.PRIMER.Interpolation.RenumberAll(m, 1000000)
- classmethod Interpolation.RenumberFlagged(model, flag, start)¶
Renumbers all of the flagged constrained interpolations in the model
- Parameters:
model (Model) –
Model
that all the flagged constrained interpolations will be renumbered inflag (Flag) – Flag set on the constrained interpolations that you want to renumber
start (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the constrained interpolations in model m flagged with f, from 1000000:
Oasys.PRIMER.Interpolation.RenumberFlagged(m, f, 1000000)
- classmethod Interpolation.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select constrained interpolations using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting constrained interpolations
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only constrained interpolations from that model can be selected. If the argument is aFlag
then only constrained interpolations that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any constrained interpolations 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 constrained interpolations selected or None if menu cancelled
- Return type:
int
Example
To select constrained interpolations from model m, flagging those selected with flag f, giving the prompt ‘Select constrained interpolations’:
Oasys.PRIMER.Interpolation.Select(f, 'Select constrained interpolations', m)To select constrained interpolations, flagging those selected with flag f but limiting selection to constrained interpolations flagged with flag l, giving the prompt ‘Select constrained interpolations’:
Oasys.PRIMER.Interpolation.Select(f, 'Select constrained interpolations', l)
- classmethod Interpolation.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged constrained interpolations in the model. The constrained interpolations will be sketched until you either call
Interpolation.Unsketch()
,Interpolation.UnsketchFlagged()
,Model.UnsketchAll()
, or delete the model
- Parameters:
model (Model) –
Model
that all the flagged constrained interpolations will be sketched inflag (Flag) – Flag set on the constrained interpolations that you want to sketch
redraw (boolean) – Optional. If model should be redrawn or not after the constrained interpolations are sketched. If omitted redraw is true. If you want to sketch flagged constrained interpolations 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 constrained interpolations flagged with flag in model m:
Oasys.PRIMER.Interpolation.SketchFlagged(m, flag)
- classmethod Interpolation.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of constrained interpolations in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing constrained interpolations should be counted. If false or omitted referenced but undefined constrained interpolations will also be included in the total
- Returns:
number of constrained interpolations
- Return type:
int
Example
To get the total number of constrained interpolations in model m:
total = Oasys.PRIMER.Interpolation.Total(m)
- classmethod Interpolation.UnblankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the constrained interpolations in the model
- Parameters:
model (Model) –
Model
that all constrained interpolations will be unblanked inredraw (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 constrained interpolations in model m:
Oasys.PRIMER.Interpolation.UnblankAll(m)
- classmethod Interpolation.UnblankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the flagged constrained interpolations in the model
- Parameters:
model (Model) –
Model
that the flagged constrained interpolations will be unblanked inflag (Flag) – Flag set on the constrained interpolations 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 constrained interpolations in model m flagged with f:
Oasys.PRIMER.Interpolation.UnblankFlagged(m, f)
- classmethod Interpolation.UnflagAll(model, flag)¶
Unsets a defined flag on all of the constrained interpolations in the model
- Parameters:
model (Model) –
Model
that the defined flag for all constrained interpolations will be unset inflag (Flag) – Flag to unset on the constrained interpolations
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the constrained interpolations in model m:
Oasys.PRIMER.Interpolation.UnflagAll(m, f)
- classmethod Interpolation.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all constrained interpolations
- Parameters:
model (Model) –
Model
that all constrained interpolations will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the constrained interpolations 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 constrained interpolations in model m:
Oasys.PRIMER.Interpolation.UnsketchAll(m)
- classmethod Interpolation.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged constrained interpolations in the model
- Parameters:
model (Model) –
Model
that all constrained interpolations will be unsketched inflag (Flag) – Flag set on the constrained interpolations that you want to unsketch
redraw (boolean) – Optional. If model should be redrawn or not after the constrained interpolations 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 constrained interpolations flagged with flag in model m:
Oasys.PRIMER.Interpolation.UnsketchAll(m, flag)
Instance methods¶
- Interpolation.AddRowData(inid, idof=Oasys.gRPC.defaultArg, twghtx=Oasys.gRPC.defaultArg, twghty=Oasys.gRPC.defaultArg, twghtz=Oasys.gRPC.defaultArg, rwghtx=Oasys.gRPC.defaultArg, rwghty=Oasys.gRPC.defaultArg, rwghtz=Oasys.gRPC.defaultArg, cidi=Oasys.gRPC.defaultArg)¶
Used to add additional independent node card and local coordinate card (if ITYP is
Interpolation.NODE_SET
) to the keyword. Adds this data to the end of the selected *CONSTRAINED_INTERPOLATION
- Parameters:
idof (integer) – Optional. Independent Degrees-of-Freedom. The default value is 123456
twghtx (float) – Optional. Weighting factor for INID. Scales the x-translational component. The default value is 1.0
twghty (float) – Optional. Weighting factor for INID. Scales the y-translational component. The default value is twghtx
twghtz (float) – Optional. Weighting factor for INID. Scales the z-translational component. The default value is twghtx
rwghtx (float) – Optional. Weighting factor for INID. Scales the x-rotational component. The default value is twghtx
rwghty (float) – Optional. Weighting factor for INID. Scales the y-rotational component. The default value is twghtx
rwghtz (float) – Optional. Weighting factor for INID. Scales the z-rotational component. The default value is twghtx
cidi (integer) – Optional.
Coordinate System
ID if LOCAL option is active. The default value is 0- Returns:
No return value
- Return type:
None
Example
To add INID 10 to the keyword c_i with idof 123, twghtx 1.2, twghty 2.2:
c_i.AddRowData(10,123,1.2,2.2)
- Interpolation.AssociateComment(comment)¶
Associates a comment with a constrained interpolation
- Parameters:
comment (Comment) –
Comment
that will be attached to the constrained interpolation- Returns:
No return value
- Return type:
None
Example
To associate comment c to the constrained interpolation c_i:
c_i.AssociateComment(c)
- Interpolation.Blank()¶
Blanks the constrained interpolation
- Returns:
No return value
- Return type:
None
Example
To blank constrained interpolation c_i:
c_i.Blank()
- Interpolation.Blanked()¶
Checks if the constrained interpolation is blanked or not
- Returns:
True if blanked, False if not
- Return type:
bool
Example
To check if constrained interpolation c_i is blanked:
if c_i.Blanked(): do_something..
- Interpolation.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 constrained interpolation c_i:
c_i.Browse()
- Interpolation.ClearFlag(flag)¶
Clears a flag on the constrained interpolation
- Parameters:
flag (Flag) – Flag to clear on the constrained interpolation
- Returns:
No return value
- Return type:
None
Example
To clear flag f for constrained interpolation c_i:
c_i.ClearFlag(f)
- Interpolation.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the constrained interpolation. The target include of the copied constrained interpolation 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:
Interpolation object
- Return type:
Interpolation
Example
To copy constrained interpolation c_i into constrained interpolation z:
z = c_i.Copy()
- Interpolation.DetachComment(comment)¶
Detaches a comment from a constrained interpolation
- Parameters:
comment (Comment) –
Comment
that will be detached from the constrained interpolation- Returns:
No return value
- Return type:
None
Example
To detach comment c from the constrained interpolation c_i:
c_i.DetachComment(c)
- Interpolation.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 constrained interpolation c_i:
c_i.Edit()
- Interpolation.Flagged(flag)¶
Checks if the constrained interpolation is flagged or not
- Parameters:
flag (Flag) – Flag to test on the constrained interpolation
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if constrained interpolation c_i has flag f set on it:
if c_i.Flagged(f): do_something..
- Interpolation.GetComments()¶
Extracts the comments associated to a constrained interpolation
- 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 constrained interpolation c_i:
comm_list = c_i.GetComments()
- Interpolation.GetParameter(prop)¶
Checks if a Interpolation 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 theInterpolation.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – constrained interpolation property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if Interpolation property c_i.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if c_i.GetParameter(c_i.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if Interpolation property c_i.example is a parameter by using the GetParameter method:
if c_i.ViewParameters().GetParameter(c_i.example): do_something..
- Interpolation.GetRowData(row_index)¶
Returns independent node cards and local coordinate cards (if ITYP is
Interpolation.NODE_SET
) for the selected row of the *CONSTRAINED_INTERPOLATION
- Parameters:
row_index (Integer) – The row index of the data to return. Note that indices start at 0, not 1.
0 <= row_index < Interpolation.total- Returns:
List containing data
- Return type:
list
Example
To loop over all the lines of the keyword for c_i:
for i in range(c_i.total): data = c_i.GetRowData(i)
- Interpolation.Keyword()¶
Returns the keyword for this Interpolation (*constrained_interpolation). Note that a carriage return is not added. See also
Interpolation.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for Interpolation c_i:
key = c_i.Keyword()
- Interpolation.KeywordCards()¶
Returns the keyword cards for the Interpolation. Note that a carriage return is not added. See also
Interpolation.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for Interpolation c_i:
cards = c_i.KeywordCards()
- Interpolation.Next()¶
Returns the next constrained interpolation in the model
- Returns:
Interpolation object (or None if there are no more constrained interpolations in the model)
- Return type:
Interpolation
Example
To get the constrained interpolation in model m after constrained interpolation c_i:
c_i = c_i.Next()
- Interpolation.Previous()¶
Returns the previous constrained interpolation in the model
- Returns:
Interpolation object (or None if there are no more constrained interpolations in the model)
- Return type:
Interpolation
Example
To get the constrained interpolation in model m before constrained interpolation c_i:
c_i = c_i.Previous()
- Interpolation.RemoveRowData(row_index)¶
Removes an independent node card and a local coordinate card (if ITYP is
Interpolation.NODE_SET
) for the selected row on the *CONSTRAINED_INTERPOLATION
- Parameters:
row_index (Integer) – The row index of the data to return. Note that indices start at 0, not 1.
0 <= row_index < Interpolation.total- Returns:
No return value
- Return type:
None
Example
To remove row 2 for c_i:
c_i.RemoveRowData(1)
- Interpolation.SetFlag(flag)¶
Sets a flag on the constrained interpolation
- Parameters:
flag (Flag) – Flag to set on the constrained interpolation
- Returns:
No return value
- Return type:
None
Example
To set flag f for constrained interpolation c_i:
c_i.SetFlag(f)
- Interpolation.SetRowData(row_index, inid, idof=Oasys.gRPC.defaultArg, twghtx=Oasys.gRPC.defaultArg, twghty=Oasys.gRPC.defaultArg, twghtz=Oasys.gRPC.defaultArg, rwghtx=Oasys.gRPC.defaultArg, rwghty=Oasys.gRPC.defaultArg, rwghtz=Oasys.gRPC.defaultArg, cidi=Oasys.gRPC.defaultArg)¶
Used to reset values in already existing independent node cards and local coordinate cards (if ITYP is
Interpolation.NODE_SET
) in the selected row of *CONSTRAINED_INTERPOLATION
- Parameters:
row_index (Integer) – The row index of the data to return. Note that indices start at 0, not 1.
0 <= row_index < Interpolation.totalidof (integer) – Optional. Independent Degrees-of-Freedom. The default value is 123456
twghtx (float) – Optional. Weighting factor for INID. Scales the x-translational component. The default value is 1.0
twghty (float) – Optional. Weighting factor for INID. Scales the y-translational component. The default value is twghtx
twghtz (float) – Optional. Weighting factor for INID. Scales the z-translational component. The default value is twghtx
rwghtx (float) – Optional. Weighting factor for INID. Scales the x-rotational component. The default value is twghtx
rwghty (float) – Optional. Weighting factor for INID. Scales the y-rotational component. The default value is twghtx
rwghtz (float) – Optional. Weighting factor for INID. Scales the z-rotational component. The default value is twghtx
cidi (integer) – Optional.
Coordinate System
ID if LOCAL option is active. The default value is 0- Returns:
No return value
- Return type:
None
Example
To reset the values of row 3 of the keyword with INID 11, idof 1234, twghtx 2.2, twghty 4.2:
c_i.SetRowData(2,11,1234,2.2,4.2)
- Interpolation.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the constrained interpolation. The constrained interpolation will be sketched until you either call
Interpolation.Unsketch()
,Interpolation.UnsketchAll()
,Model.UnsketchAll()
, or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the constrained interpolation is sketched. If omitted redraw is true. If you want to sketch several constrained interpolations 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 constrained interpolation c_i:
c_i.Sketch()
- Interpolation.Unblank()¶
Unblanks the constrained interpolation
- Returns:
No return value
- Return type:
None
Example
To unblank constrained interpolation c_i:
c_i.Unblank()
- Interpolation.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the constrained interpolation
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the constrained interpolation is unsketched. If omitted redraw is true. If you want to unsketch several constrained interpolations 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 constrained interpolation c_i:
c_i.Unsketch()
- Interpolation.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:
Interpolation object
- Return type:
dict
Example
To check if Interpolation property c_i.example is a parameter by using the
Interpolation.GetParameter()
method:if c_i.ViewParameters().GetParameter(c_i.example): do_something..
- Interpolation.Xrefs()¶
Returns the cross references for this constrained interpolation
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for constrained interpolation c_i:
xrefs = c_i.Xrefs()