Oasys.PRIMER.DeformableToRigid class¶
Constants¶
DEFORMABLE_TO_RIGID type¶
PID field type¶
- DeformableToRigid.PART¶
Identifies the PID type as
Part
. Used for fieldptype
. Used only forDeformableToRigid.SIMPLE
orDeformableToRigid.INERTIA
- DeformableToRigid.PSET¶
Identifies the PID type as
Part Set
. Used for fieldptype
. Used only forDeformableToRigid.SIMPLE
orDeformableToRigid.INERTIA
automatic types¶
- DeformableToRigid.D2R¶
Identifies that card is being written/retreived/removed as D2R card.
Used in methodsGetDefToRegAutoCard
,SetDefToRegAutoCard
andRemoveDefToRegAutoCard
.
Used only forDeformableToRigid.AUTOMATIC
- DeformableToRigid.R2D¶
Identifies that card is being written/retreived/removed as R2D card.
Used in methodsGetDefToRegAutoCard
,SetDefToRegAutoCard
andRemoveDefToRegAutoCard
.
Used only forDeformableToRigid.AUTOMATIC
Properties¶
- property DeformableToRigid.code: integer¶
Activation switch code. (Valid values: 0-5). Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.d2r: integer¶
Number of deformable parts to be switched to rigid plus number of rigid parts for which new lead/constrained rigid body combinations will be defined. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.dtmax: float¶
Maximum permitted time step size after switch. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.entno: integer¶
Rigid wall/contact surface number for switch codes 1, 2, 3, 4. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.exists(read only): boolean¶
true if deformable to rigid exists, false if referred to but not defined
- property DeformableToRigid.include: integer¶
The
Include
file number that the deformable to rigid is in
- property DeformableToRigid.ixx: float¶
The xx component of inertia tensor. Used only for
DeformableToRigid.INERTIA
- property DeformableToRigid.ixx_1: float¶
The xx component of inertia tensor. Used only for
DeformableToRigid.INERTIA
- property DeformableToRigid.ixy: float¶
The xy component of inertia tensor. Used only for
DeformableToRigid.INERTIA
- property DeformableToRigid.ixz: float¶
The xz component of inertia tensor. Used only for
DeformableToRigid.INERTIA
- property DeformableToRigid.iyz: float¶
The yz component of inertia tensor. Used only for
DeformableToRigid.INERTIA
- property DeformableToRigid.izz: float¶
The zz component of inertia tensor. Used only for
DeformableToRigid.INERTIA
- property DeformableToRigid.lrb: integer¶
Part
ID of the lead rigid body to which the part is merged. Used only forDeformableToRigid.SIMPLE
- property DeformableToRigid.model(read only): integer¶
The
Model
number that the deformable to rigid is in
- property DeformableToRigid.ncsf: integer¶
Nodal constraint body flag. (Valid values : 0, 1, 2). Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.nrbf: integer¶
Nodal rigid body flag. (Valid values : 0, 1, 2). Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.offset: float¶
Optional contact thickness for switch to deformable. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.paired: integer¶
Define a pair of related switches. (Valid values : -1, 0, 1). Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.pid: integer¶
Part
orPart set
ID which is switched to a rigid material. Depends on value ofptype
. Used only forDeformableToRigid.SIMPLE
orDeformableToRigid.INERTIA
- property DeformableToRigid.ptype: integer¶
Type of PID. Valid values are:
DeformableToRigid.PART
orDeformableToRigid.PSET
. Used only forDeformableToRigid.SIMPLE
- property DeformableToRigid.r2d: integer¶
Number of rigid parts to be switched to deformable. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.relsw: integer¶
Related switch set. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.rwf: integer¶
Flag to delete or activate rigid walls. (Valid values : 0, 1, 2). Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.swset(read only): integer¶
Set number for this automatic switch set. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.time1: float¶
Switch will not take place before this time. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.time2: float¶
Switch will not take place after this time. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.time3: float¶
After this part switch has taken place, another automatic switch will not take place for the duration of the delay period. Used only for
DeformableToRigid.AUTOMATIC
- property DeformableToRigid.tm: float¶
Translational mass. Used only for
DeformableToRigid.INERTIA
- property DeformableToRigid.type(read only): integer¶
Gives the type of DeformableToRigid Object
- property DeformableToRigid.xc: float¶
x-coordinate of center of mass. Used only for
DeformableToRigid.INERTIA
- property DeformableToRigid.yc: float¶
y-coordinate of center of mass. Used only for
DeformableToRigid.INERTIA
- property DeformableToRigid.zc: float¶
z-coordinate of center of mass. Used only for
DeformableToRigid.INERTIA
Constructor¶
- classmethod DeformableToRigid(model, type, pid=Oasys.gRPC.defaultArg, lrb=Oasys.gRPC.defaultArg, ptype=Oasys.gRPC.defaultArg)¶
Create a new
DeformableToRigid
object
- Parameters:
model (Model) –
Model
that deformable to rigid will be created intype (constant) – Specify the type of DeformableToRigid (Can be
DeformableToRigid.SIMPLE
orDeformableToRigid.AUTOMATIC
orDeformableToRigid.INERTIA
)pid (integer) – Optional.
Part
orPart set
ID which is switched to a rigid material. Depends on value ofptype
. Used only forDeformableToRigid.SIMPLE
orDeformableToRigid.INERTIA
lrb (integer) – Optional.
Part
ID of the lead rigid body to which the part is merged. Used only forDeformableToRigid.SIMPLE
ptype (integer) – Optional. Type of PID. Valid values are:
DeformableToRigid.PART
orDeformableToRigid.PSET
. Used only forDeformableToRigid.SIMPLE
- Returns:
DeformableToRigid object
- Return type:
dict
Example
To create a new deformable to rigid in model m, type SIMPLE, part id 100:
dtor = Oasys.PRIMER.DeformableToRigid(m, Oasys.PRIMER.DeformableToRigid.SIMPLE, 100)
Static methods¶
- classmethod DeformableToRigid.BlankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the deformable to rigids in the model
- Parameters:
model (Model) –
Model
that all deformable to rigids 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 deformable to rigids in model m:
Oasys.PRIMER.DeformableToRigid.BlankAll(m)
- classmethod DeformableToRigid.BlankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the flagged deformable to rigids in the model
- Parameters:
model (Model) –
Model
that all the flagged deformable to rigids will be blanked inflag (Flag) – Flag set on the deformable to rigids 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 deformable to rigids in model m flagged with f:
Oasys.PRIMER.DeformableToRigid.BlankFlagged(m, f)
- classmethod DeformableToRigid.Create(model, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create an DeformableToRigid definition
- Parameters:
model (Model) –
Model
that the DeformableToRigid 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:
DeformableToRigid object (or None if not made)
- Return type:
dict
Example
To start creating an dtor in model m:
dtor = Oasys.PRIMER.DeformableToRigid.Create(m)
- classmethod DeformableToRigid.First(model)¶
Returns the first deformable to rigid in the model
- Parameters:
model (Model) –
Model
to get first deformable to rigid in- Returns:
DeformableToRigid object (or None if there are no deformable to rigids in the model)
- Return type:
DeformableToRigid
Example
To get the first deformable to rigid in model m:
dtor = Oasys.PRIMER.DeformableToRigid.First(m)
- classmethod DeformableToRigid.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the first free deformable to rigid label in the model. Also see
DeformableToRigid.LastFreeLabel()
,DeformableToRigid.NextFreeLabel()
andModel.FirstFreeItemLabel()
- Parameters:
model (Model) –
Model
to get first free deformable to rigid 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:
DeformableToRigid label
- Return type:
int
Example
To get the first free deformable to rigid label in model m:
label = Oasys.PRIMER.DeformableToRigid.FirstFreeLabel(m)
- classmethod DeformableToRigid.FlagAll(model, flag)¶
Flags all of the deformable to rigids in the model with a defined flag
- Parameters:
model (Model) –
Model
that all deformable to rigids will be flagged inflag (Flag) – Flag to set on the deformable to rigids
- Returns:
No return value
- Return type:
None
Example
To flag all of the deformable to rigids with flag f in model m:
Oasys.PRIMER.DeformableToRigid.FlagAll(m, f)
- classmethod DeformableToRigid.GetAll(model)¶
Returns a list of DeformableToRigid objects for all of the deformable to rigids in a model in PRIMER
- Parameters:
model (Model) –
Model
to get deformable to rigids from- Returns:
List of DeformableToRigid objects
- Return type:
list
Example
To make a list of DeformableToRigid objects for all of the deformable to rigids in model m
dtor = Oasys.PRIMER.DeformableToRigid.GetAll(m)
- classmethod DeformableToRigid.GetFlagged(model, flag)¶
Returns a list of DeformableToRigid objects for all of the flagged deformable to rigids in a model in PRIMER
- Parameters:
model (Model) –
Model
to get deformable to rigids fromflag (Flag) – Flag set on the deformable to rigids that you want to retrieve
- Returns:
List of DeformableToRigid objects
- Return type:
list
Example
To make a list of DeformableToRigid objects for all of the deformable to rigids in model m flagged with f
dtor = Oasys.PRIMER.DeformableToRigid.GetFlagged(m, f)
- classmethod DeformableToRigid.GetFromID(model, number)¶
Returns the DeformableToRigid object for a deformable to rigid ID
- Parameters:
model (Model) –
Model
to find the deformable to rigid innumber (integer) – number of the deformable to rigid you want the DeformableToRigid object for
- Returns:
DeformableToRigid object (or None if deformable to rigid does not exist)
- Return type:
DeformableToRigid
Example
To get the DeformableToRigid object for deformable to rigid 100 in model m
dtor = Oasys.PRIMER.DeformableToRigid.GetFromID(m, 100)
- classmethod DeformableToRigid.Last(model)¶
Returns the last deformable to rigid in the model
- Parameters:
model (Model) –
Model
to get last deformable to rigid in- Returns:
DeformableToRigid object (or None if there are no deformable to rigids in the model)
- Return type:
DeformableToRigid
Example
To get the last deformable to rigid in model m:
dtor = Oasys.PRIMER.DeformableToRigid.Last(m)
- classmethod DeformableToRigid.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the last free deformable to rigid label in the model. Also see
DeformableToRigid.FirstFreeLabel()
,DeformableToRigid.NextFreeLabel()
and seeModel.LastFreeItemLabel()
- Parameters:
- Returns:
DeformableToRigid label
- Return type:
int
Example
To get the last free deformable to rigid label in model m:
label = Oasys.PRIMER.DeformableToRigid.LastFreeLabel(m)
- classmethod DeformableToRigid.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the next free (highest+1) deformable to rigid label in the model. Also see
DeformableToRigid.FirstFreeLabel()
,DeformableToRigid.LastFreeLabel()
andModel.NextFreeItemLabel()
- Parameters:
- Returns:
DeformableToRigid label
- Return type:
int
Example
To get the next free deformable to rigid label in model m:
label = Oasys.PRIMER.DeformableToRigid.NextFreeLabel(m)
- classmethod DeformableToRigid.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)¶
Allows the user to pick a deformable to rigid
- 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 deformable to rigids from that model can be picked. If the argument is aFlag
then only deformable to rigids that are flagged with limit can be selected. If omitted, or None, any deformable to rigids 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:
DeformableToRigid object (or None if not picked)
- Return type:
dict
Example
To pick a deformable to rigid from model m giving the prompt ‘Pick deformable to rigid from screen’:
dtor = Oasys.PRIMER.DeformableToRigid.Pick('Pick deformable to rigid from screen', m)
- classmethod DeformableToRigid.RenumberAll(model, start)¶
Renumbers all of the deformable to rigids in the model
- Parameters:
model (Model) –
Model
that all deformable to rigids will be renumbered instart (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the deformable to rigids in model m, from 1000000:
Oasys.PRIMER.DeformableToRigid.RenumberAll(m, 1000000)
- classmethod DeformableToRigid.RenumberFlagged(model, flag, start)¶
Renumbers all of the flagged deformable to rigids in the model
- Parameters:
model (Model) –
Model
that all the flagged deformable to rigids will be renumbered inflag (Flag) – Flag set on the deformable to rigids that you want to renumber
start (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the deformable to rigids in model m flagged with f, from 1000000:
Oasys.PRIMER.DeformableToRigid.RenumberFlagged(m, f, 1000000)
- classmethod DeformableToRigid.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select deformable to rigids using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting deformable to rigids
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only deformable to rigids from that model can be selected. If the argument is aFlag
then only deformable to rigids that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any deformable to rigids 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 deformable to rigids selected or None if menu cancelled
- Return type:
int
Example
To select deformable to rigids from model m, flagging those selected with flag f, giving the prompt ‘Select deformable to rigids’:
Oasys.PRIMER.DeformableToRigid.Select(f, 'Select deformable to rigids', m)To select deformable to rigids, flagging those selected with flag f but limiting selection to deformable to rigids flagged with flag l, giving the prompt ‘Select deformable to rigids’:
Oasys.PRIMER.DeformableToRigid.Select(f, 'Select deformable to rigids', l)
- classmethod DeformableToRigid.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged deformable to rigids in the model. The deformable to rigids will be sketched until you either call
DeformableToRigid.Unsketch()
,DeformableToRigid.UnsketchFlagged()
,Model.UnsketchAll()
, or delete the model
- Parameters:
model (Model) –
Model
that all the flagged deformable to rigids will be sketched inflag (Flag) – Flag set on the deformable to rigids that you want to sketch
redraw (boolean) – Optional. If model should be redrawn or not after the deformable to rigids are sketched. If omitted redraw is true. If you want to sketch flagged deformable to rigids 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 deformable to rigids flagged with flag in model m:
Oasys.PRIMER.DeformableToRigid.SketchFlagged(m, flag)
- classmethod DeformableToRigid.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of deformable to rigids in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing deformable to rigids should be counted. If false or omitted referenced but undefined deformable to rigids will also be included in the total
- Returns:
number of deformable to rigids
- Return type:
int
Example
To get the total number of deformable to rigids in model m:
total = Oasys.PRIMER.DeformableToRigid.Total(m)
- classmethod DeformableToRigid.UnblankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the deformable to rigids in the model
- Parameters:
model (Model) –
Model
that all deformable to rigids 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 deformable to rigids in model m:
Oasys.PRIMER.DeformableToRigid.UnblankAll(m)
- classmethod DeformableToRigid.UnblankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the flagged deformable to rigids in the model
- Parameters:
model (Model) –
Model
that the flagged deformable to rigids will be unblanked inflag (Flag) – Flag set on the deformable to rigids 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 deformable to rigids in model m flagged with f:
Oasys.PRIMER.DeformableToRigid.UnblankFlagged(m, f)
- classmethod DeformableToRigid.UnflagAll(model, flag)¶
Unsets a defined flag on all of the deformable to rigids in the model
- Parameters:
model (Model) –
Model
that the defined flag for all deformable to rigids will be unset inflag (Flag) – Flag to unset on the deformable to rigids
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the deformable to rigids in model m:
Oasys.PRIMER.DeformableToRigid.UnflagAll(m, f)
- classmethod DeformableToRigid.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all deformable to rigids
- Parameters:
model (Model) –
Model
that all deformable to rigids will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the deformable to rigids 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 deformable to rigids in model m:
Oasys.PRIMER.DeformableToRigid.UnsketchAll(m)
- classmethod DeformableToRigid.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged deformable to rigids in the model
- Parameters:
model (Model) –
Model
that all deformable to rigids will be unsketched inflag (Flag) – Flag set on the deformable to rigids that you want to unsketch
redraw (boolean) – Optional. If model should be redrawn or not after the deformable to rigids 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 deformable to rigids flagged with flag in model m:
Oasys.PRIMER.DeformableToRigid.UnsketchAll(m, flag)
Instance methods¶
- DeformableToRigid.AssociateComment(comment)¶
Associates a comment with a deformable to rigid
- Parameters:
comment (Comment) –
Comment
that will be attached to the deformable to rigid- Returns:
No return value
- Return type:
None
Example
To associate comment c to the deformable to rigid dtor:
dtor.AssociateComment(c)
- DeformableToRigid.Blank()¶
Blanks the deformable to rigid
- Returns:
No return value
- Return type:
None
Example
To blank deformable to rigid dtor:
dtor.Blank()
- DeformableToRigid.Blanked()¶
Checks if the deformable to rigid is blanked or not
- Returns:
True if blanked, False if not
- Return type:
bool
Example
To check if deformable to rigid dtor is blanked:
if dtor.Blanked(): do_something..
- DeformableToRigid.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 deformable to rigid dtor:
dtor.Browse()
- DeformableToRigid.ClearFlag(flag)¶
Clears a flag on the deformable to rigid
- Parameters:
flag (Flag) – Flag to clear on the deformable to rigid
- Returns:
No return value
- Return type:
None
Example
To clear flag f for deformable to rigid dtor:
dtor.ClearFlag(f)
- DeformableToRigid.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the deformable to rigid. The target include of the copied deformable to rigid 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:
DeformableToRigid object
- Return type:
DeformableToRigid
Example
To copy deformable to rigid dtor into deformable to rigid z:
z = dtor.Copy()
- DeformableToRigid.DetachComment(comment)¶
Detaches a comment from a deformable to rigid
- Parameters:
comment (Comment) –
Comment
that will be detached from the deformable to rigid- Returns:
No return value
- Return type:
None
Example
To detach comment c from the deformable to rigid dtor:
dtor.DetachComment(c)
- DeformableToRigid.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 deformable to rigid dtor:
dtor.Edit()
- DeformableToRigid.Flagged(flag)¶
Checks if the deformable to rigid is flagged or not
- Parameters:
flag (Flag) – Flag to test on the deformable to rigid
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if deformable to rigid dtor has flag f set on it:
if dtor.Flagged(f): do_something..
- DeformableToRigid.GetComments()¶
Extracts the comments associated to a deformable to rigid
- 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 deformable to rigid dtor:
comm_list = dtor.GetComments()
- DeformableToRigid.GetDefToRegAutoCard(ctype, index)¶
Returns the D2R or R2D cards for *DEFORMABLE_TO_RIGID_AUTOMATC
- Parameters:
- Returns:
A list of numbers containing the 2 or 3 member (depending on Card type): Part or Part Set ID, LRB Part ID (only for card type D2R), and part type (PTYPE - Can be DeformableToRigid.PART or DeformableToRigid.PSET)
- Return type:
list
Example
To get the D2R card data for the 3rd D2R card for Deformable to Rigid dtor:
if dtor.d2r >= 3: dtor_data = dtor.GetDefToRegAutoCard(Oasys.PRIMER.DeformableToRigid.D2R, 2)
- DeformableToRigid.GetParameter(prop)¶
Checks if a DeformableToRigid 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 theDeformableToRigid.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – deformable to rigid property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if DeformableToRigid property dtor.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if dtor.GetParameter(dtor.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if DeformableToRigid property dtor.example is a parameter by using the GetParameter method:
if dtor.ViewParameters().GetParameter(dtor.example): do_something..
- DeformableToRigid.Keyword()¶
Returns the keyword for this DeformableToRigid (*DEFORMABLE_TO_RIGID_xxxx) Note that a carriage return is not added. See also
DeformableToRigid.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for DeformableToRigid dtor:
key = dtor.Keyword()
- DeformableToRigid.KeywordCards()¶
Returns the keyword cards for the DeformableToRigid. Note that a carriage return is not added. See also
DeformableToRigid.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for DeformableToRigid dtor:
cards = dtor.KeywordCards()
- DeformableToRigid.Next()¶
Returns the next deformable to rigid in the model
- Returns:
DeformableToRigid object (or None if there are no more deformable to rigids in the model)
- Return type:
DeformableToRigid
Example
To get the deformable to rigid in model m after deformable to rigid dtor:
dtor = dtor.Next()
- DeformableToRigid.Previous()¶
Returns the previous deformable to rigid in the model
- Returns:
DeformableToRigid object (or None if there are no more deformable to rigids in the model)
- Return type:
DeformableToRigid
Example
To get the deformable to rigid in model m before deformable to rigid dtor:
dtor = dtor.Previous()
- DeformableToRigid.RemoveDefToRegAutoCard(ctype, index)¶
Removes the D2R or R2D cards for *DEFORMABLE_TO_RIGID_AUTOMATC
- Parameters:
- Returns:
No return value
- Return type:
None
Example
To remove the D2R card data for the 3rd D2R card from Deformable to Rigid dtor:
if dtor.d2r >= 3: dtor_data = dtor.RemoveDefToRegAutoCard(Oasys.PRIMER.DeformableToRigid.D2R, 2)
- DeformableToRigid.SetDefToRegAutoCard(ctype, index, ptype, pid, lrb=Oasys.gRPC.defaultArg)¶
Sets the D2r or R2D card data f*DEFORMABLE_TO_RIGID_AUTOMATIC
- Parameters:
ctype (integer) – The card type you want to set. Can be
D2R
orR2D
index (integer) – The D2R or R2D card index you want to set. Note that cards start at 0, not 1
ptype (integer) – Part type (PTYPE). Can be
DeformableToRigid.PART
orDeformableToRigid.PSET
lrb (integer) – Optional.
LRB Part
ID (only for card typeD2R
)- Returns:
No return value
- Return type:
None
Example
To set the 3rd D2R card to ptype DeformabletoRigid.PART, pid 100 and lrb 200, for DeformableToRigid dtor:
dtor.SetDefToRegAutoCard(DeformabletoRigid.D2R, 2, DeformabletoRigid.PART, 100, 200)
- DeformableToRigid.SetFlag(flag)¶
Sets a flag on the deformable to rigid
- Parameters:
flag (Flag) – Flag to set on the deformable to rigid
- Returns:
No return value
- Return type:
None
Example
To set flag f for deformable to rigid dtor:
dtor.SetFlag(f)
- DeformableToRigid.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the deformable to rigid. The deformable to rigid will be sketched until you either call
DeformableToRigid.Unsketch()
,DeformableToRigid.UnsketchAll()
,Model.UnsketchAll()
, or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the deformable to rigid is sketched. If omitted redraw is true. If you want to sketch several deformable to rigids 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 deformable to rigid dtor:
dtor.Sketch()
- DeformableToRigid.Unblank()¶
Unblanks the deformable to rigid
- Returns:
No return value
- Return type:
None
Example
To unblank deformable to rigid dtor:
dtor.Unblank()
- DeformableToRigid.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the deformable to rigid
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the deformable to rigid is unsketched. If omitted redraw is true. If you want to unsketch several deformable to rigids 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 deformable to rigid dtor:
dtor.Unsketch()
- DeformableToRigid.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:
DeformableToRigid object
- Return type:
dict
Example
To check if DeformableToRigid property dtor.example is a parameter by using the
DeformableToRigid.GetParameter()
method:if dtor.ViewParameters().GetParameter(dtor.example): do_something..
- DeformableToRigid.Xrefs()¶
Returns the cross references for this deformable to rigid
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for deformable to rigid dtor:
xrefs = dtor.Xrefs()