Oasys.PRIMER.Beam class

Properties

property Beam.cid: integer

Coordinate system ID (_SCALAR)

property Beam.cid_1: integer

Coordinate system ID at node 1 (_SCALR)

property Beam.colour: Colour

The colour of the beam

property Beam.d1: float

Section parameter 1

property Beam.d2: float

Section parameter 2

property Beam.d3: float

Section parameter 3

property Beam.d4: float

Section parameter 4

property Beam.d5: float

Section parameter 5

property Beam.d6: float

Section parameter 6

property Beam.dofn1: integer

Active degree of freedom at node 1 (_SCALAR)

property Beam.dofn2: integer

Active degree of freedom at node 2 (_SCALAR)

property Beam.dofns: integer

Active degrees of freedom at nodes 1 and 2 (_SCALR)

property Beam.eid: integer

Beam number. Also see the label property which is an alternative name for this

property Beam.elbow: boolean

If ELBOW option is set. Can be true or false

property Beam.exists(read only): boolean

true if beam exists, false if referred to but not defined

property Beam.include: integer

The Include file number that the beam is in

property Beam.iner: float

Mass moment of inertia for beam

property Beam.label: integer

Beam number. Also see the eid property which is an alternative name for this

property Beam.local: integer

Coordinate system option

property Beam.mn: integer

Middle Node for elbow beam

property Beam.model(read only): integer

The Model number that the beam is in

property Beam.n1: integer

Node number 1

property Beam.n2: integer

Node number 2

property Beam.n3: integer

Node number 3

property Beam.nodes(read only): integer

Number of nodes beam has

property Beam.offset: float

If _OFFSET option is set. Can be true or false

property Beam.orientation: float

If _ORIENTATION option is set. Can be true or false

property Beam.parm1: float

Thickness parameter 1

property Beam.parm2: float

Thickness parameter 2

property Beam.parm3: float

Thickness parameter 3

property Beam.parm4: float

Thickness parameter 4

property Beam.parm5: float

Thickness parameter 5

property Beam.pid: integer

Part number

property Beam.pid1: integer

Part number 1 for spotweld beam

property Beam.pid2: integer

Part number 2 for spotweld beam

property Beam.pid_opt: boolean

If _PID option is set. Can be true or false

property Beam.rr1: integer

Rotational release code at node 1

property Beam.rr2: integer

Rotational release code at node 2

property Beam.rt1: integer

Translational release code at node 1

property Beam.rt2: integer

Translational release code at node 2

property Beam.scalar: boolean

If _SCALAR option is set. Can be true or false

property Beam.scalr: boolean

If _SCALR option is set. Can be true or false

property Beam.section: boolean

If _SECTION option is set. Can be true or false

property Beam.sn1: integer

Scalar Node number 1

property Beam.sn2: integer

Scalar Node number 2

property Beam.stype: string

Section type

property Beam.thickness: boolean

If _THICKNESS option is set. Can be true or false

property Beam.transparency: integer

The transparency of the beam (0-100) 0% is opaque, 100% is transparent

property Beam.vol: float

Volume of beam

property Beam.vx: float

Orientation vector X at node 1

property Beam.vy: float

Orientation vector Y at node 1

property Beam.vz: float

Orientation vector Z at node 1

property Beam.warpage: boolean

If WARPAGE option is set. Can be true or false

property Beam.wx1: float

Offset vector X at node 1

property Beam.wx2: float

Offset vector X at node 2

property Beam.wy1: float

Offset vector Y at node 1

property Beam.wy2: float

Offset vector Y at node 2

property Beam.wz1: float

Offset vector Z at node 1

property Beam.wz2: float

Offset vector Z at node 2

Constructor

classmethod Beam(model, eid, pid, n1, n2=Oasys.gRPC.defaultArg, n3=Oasys.gRPC.defaultArg)

Create a new Beam object. Use either 1, 2 or 3 nodes when creating a new beam

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

  • eid (integer) – Beam number

  • pid (integer) – Part number

  • n1 (integer) – Node number 1

  • n2 (integer) – Optional. Node number 2

  • n3 (integer) – Optional. Node number 3

Returns:

Beam object

Return type:

dict

Example

To create a new beam in model m with label 100, part 10 and nodes 1, 2, 3:

b = Oasys.PRIMER.Beam(m, 100, 10, 1, 2, 3)

Static methods

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

Blanks all of the beams in the model

Parameters:
  • model (Model) – Model that all beams 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 beams in model m:

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

Blanks all of the flagged beams in the model

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

  • flag (Flag) – Flag set on the beams 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 beams in model m flagged with f:

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

Starts an interactive editing panel to create a beam

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

Beam object (or None if not made)

Return type:

dict

Example

To start creating a beam in model m:

s = Oasys.PRIMER.Beam.Create(m)
classmethod Beam.FindBeamInBox(model, xmin, xmax, ymin, ymax, zmin, zmax, flag=Oasys.gRPC.defaultArg, excl=Oasys.gRPC.defaultArg, vis_only=Oasys.gRPC.defaultArg)

Returns a list of Beam objects for the beams within a box. Please note this function provides a list of all beams that could potentially be in the box (using computationally cheap bounding box comparison) it is not a rigorous test of whether the beam is actually in the box. Note an extension of “spot_thickness” is applied to each beam. This may include beams that are ostensibly outside box. The user should apply their own test. (this function is intended to provide an upper bound of elems to test) Setting the “excl” flag will require that the beam is fully contained, but this may not capture all the beams you want to process

Parameters:
  • model (Model) – Model designated model

  • xmin (real) – Minimum bound in global x

  • xmax (real) – Maximum bound in global x

  • ymin (real) – Minimum bound in global y

  • ymax (real) – Maximum bound in global y

  • zmin (real) – Minimum bound in global z

  • zmax (real) – Maximum bound in global z

  • flag (integer) – Optional. Optional flag to restrict beams considered, if 0 all beams considered

  • excl (integer) – Optional. Optional flag ( 0) Apply inclusive selection ( 1) Apply exclusive selection inclusive selection means elements intersect box exclusive selection means elements contained in box

  • vis_only (integer) – Optional. Optional flag to consider visible elements only (1), if (0) all elements considered

Returns:

List of Beam objects

Return type:

list

Example

To get a list of Beam objects for flagged beams within defined box (inclusive selection)

s = Oasys.PRIMER.Beam.FindBeamInBox(m, xmin, xmax, ymin, ymax, zmin, zmax, flag, 0, 0)
      if len(s):
    ..
classmethod Beam.First(model)

Returns the first beam in the model

Parameters:

model (Model) – Model to get first beam in

Returns:

Beam object (or None if there are no beams in the model)

Return type:

Beam

Example

To get the first beam in model m:

b = Oasys.PRIMER.Beam.First(m)
classmethod Beam.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the first free beam label in the model. Also see Beam.LastFreeLabel(), Beam.NextFreeLabel() and Model.FirstFreeItemLabel()

Parameters:
  • model (Model) – Model to get first free beam label in

  • layer (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:

Beam label

Return type:

int

Example

To get the first free beam label in model m:

label = Oasys.PRIMER.Beam.FirstFreeLabel(m)
classmethod Beam.FlagAll(model, flag)

Flags all of the beams in the model with a defined flag

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

  • flag (Flag) – Flag to set on the beams

Returns:

No return value

Return type:

None

Example

To flag all of the beams with flag f in model m:

Oasys.PRIMER.Beam.FlagAll(m, f)
classmethod Beam.GetAll(model)

Returns a list of Beam objects for all of the beams in a model in PRIMER

Parameters:

model (Model) – Model to get beams from

Returns:

List of Beam objects

Return type:

list

Example

To make a list of Beam objects for all of the beams in model m

b = Oasys.PRIMER.Beam.GetAll(m)
classmethod Beam.GetFlagged(model, flag)

Returns a list of Beam objects for all of the flagged beams in a model in PRIMER

Parameters:
  • model (Model) – Model to get beams from

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

Returns:

List of Beam objects

Return type:

list

Example

To make a list of Beam objects for all of the beams in model m flagged with f

b = Oasys.PRIMER.Beam.GetFlagged(m, f)
classmethod Beam.GetFromID(model, number)

Returns the Beam object for a beam ID

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

  • number (integer) – number of the beam you want the Beam object for

Returns:

Beam object (or None if beam does not exist)

Return type:

Beam

Example

To get the Beam object for beam 100 in model m

b = Oasys.PRIMER.Beam.GetFromID(m, 100)
classmethod Beam.Last(model)

Returns the last beam in the model

Parameters:

model (Model) – Model to get last beam in

Returns:

Beam object (or None if there are no beams in the model)

Return type:

Beam

Example

To get the last beam in model m:

b = Oasys.PRIMER.Beam.Last(m)
classmethod Beam.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the last free beam label in the model. Also see Beam.FirstFreeLabel(), Beam.NextFreeLabel() and see Model.LastFreeItemLabel()

Parameters:
  • model (Model) – Model to get last free beam label in

  • layer (Include number) – Optional. Include file (0 for the main file) to search for labels in (Equivalent to Highest free in layer in editing panels). If omitted the whole model will be used

Returns:

Beam label

Return type:

int

Example

To get the last free beam label in model m:

label = Oasys.PRIMER.Beam.LastFreeLabel(m)
classmethod Beam.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)

Returns the next free (highest+1) beam label in the model. Also see Beam.FirstFreeLabel(), Beam.LastFreeLabel() and Model.NextFreeItemLabel()

Parameters:
  • model (Model) – Model to get next free beam label in

  • layer (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:

Beam label

Return type:

int

Example

To get the next free beam label in model m:

label = Oasys.PRIMER.Beam.NextFreeLabel(m)
classmethod Beam.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)

Allows the user to pick a beam

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

Beam object (or None if not picked)

Return type:

dict

Example

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

b = Oasys.PRIMER.Beam.Pick('Pick beam from screen', m)
classmethod Beam.RenumberAll(model, start)

Renumbers all of the beams in the model

Parameters:
  • model (Model) – Model that all beams will be renumbered in

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

To renumber all of the beams in model m, from 1000000:

Oasys.PRIMER.Beam.RenumberAll(m, 1000000)
classmethod Beam.RenumberFlagged(model, flag, start)

Renumbers all of the flagged beams in the model

Parameters:
  • model (Model) – Model that all the flagged beams will be renumbered in

  • flag (Flag) – Flag set on the beams that you want to renumber

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

To renumber all of the beams in model m flagged with f, from 1000000:

Oasys.PRIMER.Beam.RenumberFlagged(m, f, 1000000)
classmethod Beam.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

Allows the user to select beams using standard PRIMER object menus

Parameters:
  • flag (Flag) – Flag to use when selecting beams

  • prompt (string) – Text to display as a prompt to the user

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

Return type:

int

Example

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

Oasys.PRIMER.Beam.Select(f, 'Select beams', m)

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

Oasys.PRIMER.Beam.Select(f, 'Select beams', l)
classmethod Beam.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

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

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

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

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

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

Returns the total number of beams in the model

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

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

Returns:

number of beams

Return type:

int

Example

To get the total number of beams in model m:

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

Unblanks all of the beams in the model

Parameters:
  • model (Model) – Model that all beams 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 beams in model m:

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

Unblanks all of the flagged beams in the model

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

  • flag (Flag) – Flag set on the beams 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 beams in model m flagged with f:

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

Unsets a defined flag on all of the beams in the model

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

  • flag (Flag) – Flag to unset on the beams

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the beams in model m:

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

Unsketches all beams

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

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

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

Unsketches all flagged beams in the model

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

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

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

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

Instance methods

Beam.AssociateComment(comment)

Associates a comment with a beam

Parameters:

comment (Comment) – Comment that will be attached to the beam

Returns:

No return value

Return type:

None

Example

To associate comment c to the beam b:

b.AssociateComment(c)
Beam.Blank()

Blanks the beam

Returns:

No return value

Return type:

None

Example

To blank beam b:

b.Blank()
Beam.Blanked()

Checks if the beam is blanked or not

Returns:

True if blanked, False if not

Return type:

bool

Example

To check if beam b is blanked:

if b.Blanked():
    do_something..
Beam.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 beam b:

b.Browse()
Beam.ClearFlag(flag)

Clears a flag on the beam

Parameters:

flag (Flag) – Flag to clear on the beam

Returns:

No return value

Return type:

None

Example

To clear flag f for beam b:

b.ClearFlag(f)
Beam.Copy(range=Oasys.gRPC.defaultArg)

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

Beam object

Return type:

Beam

Example

To copy beam b into beam z:

z = b.Copy()
Beam.DetachComment(comment)

Detaches a comment from a beam

Parameters:

comment (Comment) – Comment that will be detached from the beam

Returns:

No return value

Return type:

None

Example

To detach comment c from the beam b:

b.DetachComment(c)
Beam.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 beam b:

b.Edit()
Beam.ElemCut(database_cross_section_label)

Returns coordinates of the intersections between a beam and a database cross section.
Note this function does not check that the beam is in the cross section definition (part set)

Parameters:

database_cross_section_label (integer) – The label of the database cross section

Returns:

A list containing the x,y,z coordinates of the cut point, or None if it does not cut

Return type:

list

Example

To get the cut line coordinates between database cross section 200 and beam b:

data = b.ElemCut(200)
Beam.ExtractColour()

Extracts the actual colour used for beam.
By default in PRIMER many entities such as elements get their colour automatically from the part that they are in. PRIMER cycles through 13 default colours based on the label of the entity. In this case the beam colour property will return the value Colour.PART instead of the actual colour. This method will return the actual colour which is used for drawing the beam

Returns:

colour value (integer)

Return type:

int

Example

To return the colour used for drawing beam b:

colour = b.ExtractColour()
Beam.Flagged(flag)

Checks if the beam is flagged or not

Parameters:

flag (Flag) – Flag to test on the beam

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if beam b has flag f set on it:

if b.Flagged(f):
    do_something..
Beam.GetComments()

Extracts the comments associated to a beam

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 beam b:

comm_list = b.GetComments()
Beam.GetParameter(prop)

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

Parameters:

prop (string) – beam property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

To check if Beam property b.example is a parameter:

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

To check if Beam property b.example is a parameter by using the GetParameter method:

if b.ViewParameters().GetParameter(b.example):
    do_something..
Beam.Keyword()

Returns the keyword for this beam (*BEAM, *BEAM_SCALAR or *BEAM_SCALAR_VALUE). Note that a carriage return is not added. See also Beam.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for beam s:

key = s.Keyword()
Beam.KeywordCards()

Returns the keyword cards for the beam. Note that a carriage return is not added. See also Beam.Keyword()

Returns:

string containing the cards

Return type:

str

Example

To get the cards for beam b:

cards = b.KeywordCards()
Beam.Next()

Returns the next beam in the model

Returns:

Beam object (or None if there are no more beams in the model)

Return type:

Beam

Example

To get the beam in model m after beam b:

b = b.Next()
Beam.Previous()

Returns the previous beam in the model

Returns:

Beam object (or None if there are no more beams in the model)

Return type:

Beam

Example

To get the beam in model m before beam b:

b = b.Previous()
Beam.SectionFacePoints(face)

Returns the indices of the points for a faces to plot the true section of the beam. Note face numbers start at 0. Beam.SectionPoints must be called before this method

Parameters:

face (integer) – Face to get indices for

Returns:

List of integers

Return type:

int

Example

To get the indices of the points for the second face on beam b:

indices = b.SectionFacePoints(1)
Beam.SectionFaces()

Returns the number of faces to plot the true section of the beam. Beam.SectionPoints must be called before this method

Returns:

integer

Return type:

int

Example

To get the number of faces for beam b:

faces = b.SectionFaces()
Beam.SectionPoints()

Returns the point coordinates to plot the true section of the beam. They are returned in a single list of numbers

Returns:

List of floats

Return type:

float

Example

To get the point coordinates for beam b:

points = b.SectionPoints()
Beam.SetFlag(flag)

Sets a flag on the beam

Parameters:

flag (Flag) – Flag to set on the beam

Returns:

No return value

Return type:

None

Example

To set flag f for beam b:

b.SetFlag(f)
Beam.Sketch(redraw=Oasys.gRPC.defaultArg)

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

Parameters:

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

b.Sketch()
Beam.TiedNodeCheck(contact_label, flag, option1, option2)

Checks if nodes of beam are tied by contact or directly attached (non-zero option1)

Parameters:
  • contact_label (integer) – The label of the tied contact. If zero the tied contact is found for the beam by reverse lookup

  • flag (Flag) – flag bit

  • option1 (integer) – Directly tied node (logical OR) 0:NONE 1:NRB/C_EXNO 2:BEAM 4:SHELL 8:SOLID 16:TSHELL

  • option2 (integer) – 0:No action 1:report error if directly attached node (acc. option1) also captured by contact

Returns:

string

Return type:

str

Example

To check if both nodes of beam b are tied by contact 200 or attach directly to constraint, beam or shell:

message = b.TiedNodeCheck(200, flag, 1|2|4, 1)
Beam.Timestep()

Calculates the timestep for the beam

Returns:

float

Return type:

float

Example

To calculate the timestep for beam b:

timestep = b.Timestep()
Beam.Unblank()

Unblanks the beam

Returns:

No return value

Return type:

None

Example

To unblank beam b:

b.Unblank()
Beam.Unsketch(redraw=Oasys.gRPC.defaultArg)

Unsketches the beam

Parameters:

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

b.Unsketch()
Beam.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:

Beam object

Return type:

dict

Example

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

if b.ViewParameters().GetParameter(b.example):
    do_something..
Beam.Xrefs()

Returns the cross references for this beam

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for beam b:

xrefs = b.Xrefs()