Oasys.PRIMER.Belt class

Constants

Mesh segments

Belt.MSEG_B1_ONLY

Old style all 1D belt

Belt.MSEG_B2_ONLY

Old style all 2D belt

Belt.MSEG_BD_NEW

Indicates new mode. This must be set before any of the new style constants can be used

Belt.MSEG_CE_1D

New style 1D at centre

Belt.MSEG_CE_2D

New style 2D at centre

Belt.MSEG_CE_SH

New style SH at centre

Belt.MSEG_E1_1D

New style 1D at end 1

Belt.MSEG_E1_2D

New style 2D at end 1

Belt.MSEG_E1_SH

New style shells at end 1

Belt.MSEG_E2_1D

New style 1D at end 2

Belt.MSEG_E2_2D

New style 2D at end 2

Belt.MSEG_E2_SH

New style shells at end 2

Belt.MSEG_MIX_SB1

Old style 1D at ends, shells in middle

Belt.MSEG_MIX_SB2

Old style 2D at ends, shells in middle

Belt.MSEG_SH_ONLY

Old style all shell belt

Meshing start Labels

Belt.MESH_2D_SLIPRING_SET_NODE

Set meshing start Labels for 2D slipring node sets

Belt.MESH_ALL

Set meshing start Labels for everything used in the seatbelt definition

Belt.MESH_NODE

Set meshing start Labels for nodes

Belt.MESH_NRBC

Set meshing start Labels for nodal rigid bodies

Belt.MESH_RETRACTOR

Set meshing start Labels for retractors

Belt.MESH_SEATBELT

Set meshing start Labels for seatbelt elements

Belt.MESH_SET_NODE

Set meshing start Labels for node sets

Belt.MESH_SET_PART

Set meshing start Labels for part sets

Belt.MESH_SET_SHELL

Set meshing start Labels for shell sets

Belt.MESH_SHELL

Set meshing start Labels for shells

Belt.MESH_SLIPRING

Set meshing start Labels for slipring elements

Belt.MESH_XSEC

Set meshing start Labels for Database cross sections

Path point fixity

Belt.B_POST_SLIPRING

There is a B-Post slipring at this point

Belt.FIXED

Point is fixed

Belt.FREE_SLIPRING

There is a free (eg pelvis) slipring at this point

Belt.KNOWN

The belt path is known to pass through this point

Belt.RETRACTOR

There is a retractor at this point

Belt.SLIPRING

There is a slipring at this point. (Deprecated from V12 onwards, use FREE_SLIPRING or B_POST_SLIPRING instead)

Belt.TWIST

Point has twist vectors or twist nodes defined

Belt.XSEC

There is a database cross section at this point

Path point insertion

Belt.INSERT_AFTER

Insert after given path point

Belt.INSERT_BEFORE

Insert before given path point

Properties

property Belt.acuteAngle: float

Limiting angle to be considered “acute” (0 means 90)

property Belt.curvature: float

Maximum permitted transverse belt curvature in degrees

property Belt.elemSet(read only): integer

Set of shell or 2D seatbelt elements. Only created if the option to generate a contact for the belt is used

property Belt.exists(read only): boolean

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

property Belt.friction: float

Transverse friction coefficient

property Belt.id: integer

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

property Belt.include: integer

The Include file number that the belt is in

property Belt.iterations: integer

The number of fitting iterations between contact bucket resorts

property Belt.label: integer

Belt number. Also see the id property which is an alternative name for this

property Belt.length: float

The characteristic length of each belt element

property Belt.meshSegs(read only): integer

Number of mesh segments defined

property Belt.model(read only): integer

The Model number that the belt is in

property Belt.n2sContact(read only): integer

Nodes to Surface contact used between nodes on 1D belt elements and dummy structure. Only set if the AUTOMATIC_NODES_TO_SURFACE contact is defined in Seatbelts contact panel. Optional contact, see “Contact: Creating a Contact between Belt and Dummy” section in the PRIMER manual for more information

property Belt.nodeSet(read only): integer

Set of all nodes in seatbelt. Only created if the option to generate a contact for the belt is used

property Belt.nrbFirst(read only): integer

First nodal rigid body ID

property Belt.nrbLast(read only): integer

Last nodal rigid body ID

property Belt.nsboSet(read only): integer

Set of nodes on 1D seatbelt elements only. Only created if the option to generate a contact for the belt is used

property Belt.overlap: float

Fraction by which facets are extended during contact checking to stop nodes “falling into gaps”

property Belt.parts: integer

Part set ID defining structure. Note that if you are creating the seatbelt definition from scratch in JavaScript you must define a shell, solid or thick shell set

property Belt.penetration: float

Maximum penetration distance considered for contact into solid and thick shell elements

property Belt.pidShell: integer

The part ID for any 2D seatbelt elements

property Belt.pid_1d: integer

The part ID for any 1D seatbelt elements

property Belt.pid_2d: integer

The part ID for any 2D seatbelt elements

property Belt.points(read only): integer

Number of path points defined

property Belt.projection: float

Initial projection distance by which belt path is “thrown outwards” at start of fitting

property Belt.psiShell: float

Optional orthotropic angle for any shell elements

property Belt.psi_2d: float

Optional orthotropic angle for any 2D seatbelt elements

property Belt.retractorFirst(read only): integer

First retractor ID

property Belt.retractorLast(read only): integer

Last retractor ID

property Belt.rows: integer

The number of rows of 2D elements across the belt

property Belt.s2sContact(read only): integer

Surface to Surface contact used between shell/2D belt elements and dummy structure. Only set if the AUTOMATIC_SURFACE_TO_SURFACE contact is defined in Seatbelts contact panel. Optional contact, see “Contact: Creating a Contact between Belt and Dummy” section in the PRIMER manual for more information

property Belt.seatbeltFirst(read only): integer

First 1D seatbelt ID

property Belt.seatbeltLast(read only): integer

Last 1D seatbelt ID

property Belt.segments(read only): integer

Segment set created for contact

property Belt.shells: integer

Shell set ID defining structure. Note that if you are creating the seatbelt definition from scratch in JavaScript you must define a shell, solid or thick shell set

property Belt.slen_1d: float

The initial slack length for any 1D seatbelt elements

property Belt.slipringFirst(read only): integer

First slipring ID

property Belt.slipringLast(read only): integer

Last slipring ID

property Belt.solids: integer

Solid set ID defining structure. Note that if you are creating the seatbelt definition from scratch in JavaScript you must define a shell, solid or thick shell set

property Belt.t1Shell: float

Optional thickness at n1 for any shell elements

property Belt.t1_2d: float

Optional thickness at n1 for any 2D seatbelt elements

property Belt.t2Shell: float

Optional thickness at n2 for any shell elements

property Belt.t2_2d: float

Optional thickness at n2 for any 2D seatbelt elements

property Belt.t3Shell: float

Optional thickness at n3 for any shell elements

property Belt.t3_2d: float

Optional thickness at n3 for any 2D seatbelt elements

property Belt.t4Shell: float

Optional thickness at n4 for any shell elements

property Belt.t4_2d: float

Optional thickness at n4 for any 2D seatbelt elements

property Belt.thickFactor: float

Factor used when thickFlag is 1

property Belt.thickFlag: integer

Thickness used during fitting: 0 (default)=use true thickness; 1=use true thickness x factor; 2=use neutral axis (no thickness)

property Belt.thickness: float

The thickness of 2D belt elements

property Belt.title: string

Belt title

property Belt.tolerance: float

The convergence tolerance at which fitting halts

property Belt.tshells: integer

Thick shell set ID defining structure. Note that if you are creating the seatbelt definition from scratch in JavaScript you must define a shell, solid or thick shell set

property Belt.width: float

The overall belt width

property Belt.xsect_pretext: string

If X-Section pretext option is set to 2 then string for additional pretext

property Belt.xsect_pretext_option: integer

X-Section pretext option, 0: None, 1: Automatic, 2: Manual

property Belt.xsectionFirst(read only): integer

First cross section ID

property Belt.xsectionLast(read only): integer

Last cross section ID

Constructor

classmethod Belt(model, id, title=Oasys.gRPC.defaultArg, structural_type=Oasys.gRPC.defaultArg, flag=Oasys.gRPC.defaultArg)

Create a new Belt object

Parameters:
  • model (Model) – Model that the belt definition will be created in

  • id (integer) – Belt number

  • title (string) – Optional. Title for the belt

  • structural_type (string) – Optional. Seatbelt will be fitted around this entity type. This will trigger creation of sets as required. Type can be one of MODEL, DUMMY, PART, any ELEMENT subtype such as SHELL, or any SET subtype such as SET_PART. See Appendix I of the PRIMER manual for more information on PRIMER types

  • flag (integer) – Optional. Flag used to identify entities that the belt should fit around. This argument is ignored if structural_type is MODEL. Instead, the current model is used

Returns:

Belt object

Return type:

dict

Example

To create a new belt called ‘Example’ in model m with label 100:

b = Oasys.PRIMER.Belt(m, 100, 'Example')

Static methods

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

Blanks all of the belts in the model

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

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

Blanks all of the flagged belts in the model

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

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

Oasys.PRIMER.Belt.BlankFlagged(m, f)
classmethod Belt.First(model)

Returns the first belt in the model

Parameters:

model (Model) – Model to get first belt in

Returns:

Belt object (or None if there are no belts in the model)

Return type:

Belt

Example

To get the first belt in model m:

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

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

Parameters:
  • model (Model) – Model to get first free belt 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:

Belt label

Return type:

int

Example

To get the first free belt label in model m:

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Returns a list of Belt objects for all of the belts in a model in PRIMER

Parameters:

model (Model) – Model to get belts from

Returns:

List of Belt objects

Return type:

list

Example

To make a list of Belt objects for all of the belts in model m

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

Returns a list of Belt objects for all of the flagged belts in a model in PRIMER

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

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

Returns:

List of Belt objects

Return type:

list

Example

To make a list of Belt objects for all of the belts in model m flagged with f

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

Returns the Belt object for a belt ID

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

  • number (integer) – number of the belt you want the Belt object for

Returns:

Belt object (or None if belt does not exist)

Return type:

Belt

Example

To get the Belt object for belt 100 in model m

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

Returns the last belt in the model

Parameters:

model (Model) – Model to get last belt in

Returns:

Belt object (or None if there are no belts in the model)

Return type:

Belt

Example

To get the last belt in model m:

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

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

Parameters:
  • model (Model) – Model to get last free belt 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:

Belt label

Return type:

int

Example

To get the last free belt label in model m:

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

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

Parameters:
  • model (Model) – Model to get next free belt 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:

Belt label

Return type:

int

Example

To get the next free belt label in model m:

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

Allows the user to pick a belt

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

Belt object (or None if not picked)

Return type:

dict

Example

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

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

Renumbers all of the belts in the model

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

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

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

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

Renumbers all of the flagged belts in the model

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

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

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

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

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

Allows the user to select belts using standard PRIMER object menus

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

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

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

Return type:

int

Example

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

Oasys.PRIMER.Belt.Select(f, 'Select belts', m)

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

Oasys.PRIMER.Belt.Select(f, 'Select belts', l)
classmethod Belt.SetMeshingLabels(entity_type, label_value)

Set the start labels for the entities created for a Seat Belt

Parameters:
Returns:

no return value

Return type:

None

Example

To get the initial value of the node label in seatbelt meshing as 1000:

Oasys.PRIMER.Belt.SetMeshingLabels(Oasys.PRIMER.Belt.MESH_NODE,1000)
classmethod Belt.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

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

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

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

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

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

Returns the total number of belts in the model

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

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

Returns:

number of belts

Return type:

int

Example

To get the total number of belts in model m:

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

Unblanks all of the belts in the model

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

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

Unblanks all of the flagged belts in the model

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

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

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Unsketches all belts

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

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

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

Unsketches all flagged belts in the model

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

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

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

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

Instance methods

Belt.AssociateComment(comment)

Associates a comment with a belt

Parameters:

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

Returns:

No return value

Return type:

None

Example

To associate comment c to the belt b:

b.AssociateComment(c)
Belt.Blank()

Blanks the belt

Returns:

No return value

Return type:

None

Example

To blank belt b:

b.Blank()
Belt.Blanked()

Checks if the belt is blanked or not

Returns:

True if blanked, False if not

Return type:

bool

Example

To check if belt b is blanked:

if b.Blanked():
    do_something..
Belt.ClearFlag(flag)

Clears a flag on the belt

Parameters:

flag (Flag) – Flag to clear on the belt

Returns:

No return value

Return type:

None

Example

To clear flag f for belt b:

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

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

Belt object

Return type:

Belt

Example

To copy belt b into belt z:

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

Detaches a comment from a belt

Parameters:

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

Returns:

No return value

Return type:

None

Example

To detach comment c from the belt b:

b.DetachComment(c)
Belt.Fit()

(Re)fits belt

Returns:

No return value

Return type:

None

Example

To (re)fit belt b:

b.Fit()
Belt.Flagged(flag)

Checks if the belt is flagged or not

Parameters:

flag (Flag) – Flag to test on the belt

Returns:

True if flagged, False if not

Return type:

bool

Example

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

if b.Flagged(f):
    do_something..
Belt.Generate()

Generates belt mesh. Extracts and uses existing mesh properties when a mesh is present; inserts a default mesh otherwise

Returns:

No return value

Return type:

None

Example

To generate a mesh for belt b:

b.Generate()
Belt.GetComments()

Extracts the comments associated to a belt

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

comm_list = b.GetComments()
Belt.GetMesh(index)

Returns the information for a belt mesh section (properties base_pt1, base_pt2, path_pt1, path_pt2, mode, lb1, lb2). See Belt.SetMesh() for more information on supported properties. Must be preceded by a call to Belt.Generate()

Parameters:

index (integer) – The index of the mesh section you want the information for. Note that mesh segments start at 0, not 1. 0 <= index < meshSegs

Returns:

Dict containing the mesh section information

Return type:

dict

Example

To get the information for the 3rd mesh section for belt b:

info = b.GetMesh(2)
Belt.GetParameter(prop)

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

Parameters:

prop (string) – belt property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

To check if Belt 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 Belt property b.example is a parameter by using the GetParameter method:

if b.ViewParameters().GetParameter(b.example):
    do_something..
Belt.GetPoint(index)

Returns the information for a path point (properties fixity, x, y, z, node, trx1, try1, trz1, tnx1, tny1, tnz1, tnode1, trx2, try2, trz2, tnx2, tny2, tnz2, tnode2). Properties fixity, x, y, z and node will always be returned. Twist properties trx1, try1, trz1, tnx1, tny1, tnz1, tnode1, trx2, try2, trz2, tnx2, tny2, tnz2 and tnode2 will only be returned if defined for the point

Parameters:

index (integer) – The index of the path point you want the information for. Note that path points start at 0, not 1. 0 <= index < points

Returns:

Dict containing the path point information

Return type:

dict

Example

To get the information for the 3rd path point for belt b:

info = b.GetPoint(2)
Belt.InsertPoint(index, position, data)

Inserts a path point before/after an existing one. Subsequent path points will be moved ‘up’ as required

Parameters:
  • index (integer) – The index of an existing path point. Note that path points start at 0, not 1. 0 <= index < points

  • position (integer) – Do we want to insert before or after the path point denoted by index? The position can be Belt.INSERT_AFTER or Belt.INSERT_BEFORE

  • data (dict) –

    Object containing the path point data

    fixity:

    (integer) Point fixity type. Bitwise ‘or’ of the Path point fixity constants: Belt.B_POST_SLIPRING, Belt.FREE_SLIPRING, Belt.KNOWN, Belt.RETRACTOR, Belt.TWIST, Belt.XSEC

    node (optional):

    (integer) Node label (not required if using x, y and z)

    tnode1 (optional):

    (integer) Twist node 1 label

    tnode2 (optional):

    (integer) Twist node 2 label

    tnx1 (optional):

    (real) X component of normal vector 1

    tnx2 (optional):

    (real) X component of normal vector 2

    tny1 (optional):

    (real) Y component of normal vector 1

    tny2 (optional):

    (real) Y component of normal vector 2

    tnz1 (optional):

    (real) Z component of normal vector 1

    tnz2 (optional):

    (real) Z component of normal vector 2

    trx1 (optional):

    (real) X component of twist radial vector 1

    trx2 (optional):

    (real) X component of twist radial vector 2

    try1 (optional):

    (real) Y component of twist radial vector 1

    try2 (optional):

    (real) Y component of twist radial vector 2

    trz1 (optional):

    (real) Z component of twist radial vector 1

    trz2 (optional):

    (real) Z component of twist radial vector 2

    x (optional):

    (real) X coordinate (not required if using node)

    y (optional):

    (real) Y coordinate (not required if using node)

    z (optional):

    (real) Z coordinate (not required if using node)

Returns:

no return value

Return type:

None

Example

To insert a new 2nd path point for belt b with B-Post slipring fixity using twist nodes 1000 and 10001:

data = { "fixity":Oasys.PRIMER.Belt.RETRACTOR, "node":999, "tnode1":1000, "tnode2":1001 }
b.InsertPoint(1, Oasys.PRIMER.Belt.INSERT_BEFORE, data)
Belt.Next()

Returns the next belt in the model

Returns:

Belt object (or None if there are no more belts in the model)

Return type:

Belt

Example

To get the belt in model m after belt b:

b = b.Next()
Belt.Previous()

Returns the previous belt in the model

Returns:

Belt object (or None if there are no more belts in the model)

Return type:

Belt

Example

To get the belt in model m before belt b:

b = b.Previous()
Belt.RemovePoint(index)

Removes a path point from a belt

Parameters:

index (integer) – The index of the path point you want to remove. Note that path points start at 0, not 1. 0 <= index < points

Returns:

no return value

Return type:

None

Example

To remove for the 3rd path point for belt b:

b.RemovePoint(2)
Belt.SetFlag(flag)

Sets a flag on the belt

Parameters:

flag (Flag) – Flag to set on the belt

Returns:

No return value

Return type:

None

Example

To set flag f for belt b:

b.SetFlag(f)
Belt.SetMesh(index, data)

Sets the data for various properties for a mesh section in a belt. Values for properties not invoked will be retained as is. Must be preceded by a call to Belt.Generate()

Parameters:
Returns:

no return value

Return type:

None

Example

To set the following properties for the final mesh section: base points: 5, 9, path points: 59, 92, mode: 1D at ends, shells at centre, number of elements at either end: 4 and 10:

data = { "base_pt1": 5, "base_pt2": 9, "path_pt1": 59, "path_pt2": 92, "mode": Belt.MSEG_BD_NEW | Belt.MSEG_E1_1D | Belt.MSEG_CE_SH | Belt.MSEG_E2_1D, "lb1": 4, "lb2": 10 }
b.SetMesh(b.meshSegs-1, data)
Belt.SetPoint(index, data)

Sets the data for a path point in a belt

Parameters:
  • index (integer) – The index of the path point you want to set. Note that path points start at 0, not 1. To add a new point use index points

  • data (dict) –

    Object containing the path point data

    fixity:

    (integer) Point fixity type. Bitwise ‘or’ of the Path point fixity constants: Belt.B_POST_SLIPRING, Belt.FREE_SLIPRING, Belt.KNOWN, Belt.RETRACTOR, Belt.TWIST, Belt.XSEC

    node (optional):

    (integer) Node label (not required if using x, y and z)

    tnode1 (optional):

    (integer) Twist node 1 label

    tnode2 (optional):

    (integer) Twist node 2 label

    tnx1 (optional):

    (real) X component of normal vector 1

    tnx2 (optional):

    (real) X component of normal vector 2

    tny1 (optional):

    (real) Y component of normal vector 1

    tny2 (optional):

    (real) Y component of normal vector 2

    tnz1 (optional):

    (real) Z component of normal vector 1

    tnz2 (optional):

    (real) Z component of normal vector 2

    trx1 (optional):

    (real) X component of twist radial vector 1

    trx2 (optional):

    (real) X component of twist radial vector 2

    try1 (optional):

    (real) Y component of twist radial vector 1

    try2 (optional):

    (real) Y component of twist radial vector 2

    trz1 (optional):

    (real) Z component of twist radial vector 1

    trz2 (optional):

    (real) Z component of twist radial vector 2

    x (optional):

    (real) X coordinate (not required if using node)

    y (optional):

    (real) Y coordinate (not required if using node)

    z (optional):

    (real) Z coordinate (not required if using node)

Returns:

no return value

Return type:

None

Example

To add a new B-Post slipring path point to belt b at node 1000:

data = { "fixity":Oasys.PRIMER.Belt.B_POST_SLIPRING, "node":1000 }
b.SetPoint(b.points, data)

To add a new path point to belt b at coordinate (10, 20, 30):

data = { "fixity":0, "x":10, "y":20, "z":30 }
b.SetPoint(b.points, data)

To add a new retractor path point to belt b at (10, 20, 30) with twist nodes 1000 and 1001:

data = { "fixity":Oasys.PRIMER.Belt.RETRACTOR|Oasys.PRIMER.Belt.TWIST, "x":10, "y":20, "z":30, "tnode1":1000, "tnode2":1001 }
b.SetPoint(b.points, data)
Belt.Sketch(redraw=Oasys.gRPC.defaultArg)

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

Parameters:

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

b.Sketch()
Belt.Unblank()

Unblanks the belt

Returns:

No return value

Return type:

None

Example

To unblank belt b:

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

Unsketches the belt

Parameters:

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

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

Belt object

Return type:

dict

Example

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

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

Returns the cross references for this belt

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for belt b:

xrefs = b.Xrefs()