Oasys.PRIMER.MorphBox class

Properties

property MorphBox.exists(read only): boolean

true if morph box exists, false if referred to but not defined

property MorphBox.include: integer

The Include file number that the morph box is in

property MorphBox.label: integer

MorphBox number

property MorphBox.model(read only): integer

The Model number that the box is in

property MorphBox.nx(read only): integer

Number of morph points in parametric X direction

property MorphBox.ny(read only): integer

Number of morph points in parametric Y direction

property MorphBox.nz(read only): integer

Number of morph points in parametric Z direction

property MorphBox.setid(read only): integer

ID for node set of nodes dragged with the box. This will be a *SET_NODE_COLUMN containing the nodes together with their parametric coordinates in X, Y, Z. It is strongly discouraged to edit the contents of this set or the column data manually

Constructor

classmethod MorphBox(model, label, flag, options=Oasys.gRPC.defaultArg)

Create a new MorphBox object around flagged items

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

  • label (integer) – MorphBox number

  • flag (Flag) – Flag set on the entities (for example nodes, elements and/or parts) that you want to create the box around

  • options (dict) –

    Optional. Options to create the box

    csys (optional):

    (integer) Coordinate system for local coordinates. Leave undefined if using global coordinates or if local coordinate system defined with n1, n2 and n3

    n1 (optional):

    (integer) Node 1 label for local coordinate. Leave undefined if using global coordinates or if local coordinate system defined with csys

    n2 (optional):

    (integer) Node 2 label for local coordinate. Leave undefined if using global coordinates or if local coordinate system defined with csys

    n3 (optional):

    (integer) Node 3 label for local coordinate. Leave undefined if using global coordinates or if local coordinate system defined with csys

    nx (optional):

    (integer) Number of points in X direction of box (assumed to be 2 for linear box if omitted)

    ny (optional):

    (integer) Number of points in Y direction of box (assumed to be 2 for linear box if omitted)

    nz (optional):

    (integer) Number of points in Z direction of box (assumed to be 2 for linear box if omitted)

    points (optional):

    (Array of integers) List of integers of depth 3 containing the morph point IDs. This should be omitted in the (default) case of also creating new morph points together with the morph box at the locations based on the bounding box of the flagged items. If this list contains ‘nx’ by ‘ny’ by ‘nz’ existing morph points, the morph box is attached to these points, and ‘csys’, ‘n1’, ‘n2’, ‘n3’ will be irrelevant. Each ‘points[i][j][k]’ should contain the morph point ID to be added at index i in local X direction, index j in local Y direction and index k in local Z direction. The box will then still contain flagged nodes only, but nodes geometrically outside the volume of the morph points will not be included either

Returns:

MorphBox object

Return type:

dict

Example

To create a new morph box in model m with label 100 and 2 by 2 by 2 points (linear in each coordinate direction) around all items flagged with flag in global coordinates:

box = Oasys.PRIMER.MorphBox(m, 100, flag)

To create a new morph box in model m with label 100 and 4 by 4 by 2 points (cubic in parametric X and Y directions and linear in Z direction) around all flagged items in local coordinates determined by nodes 11, 12 and 13:

options = { "nx":4, "ny":4, "nz":2, "n1":11, "n2":12, "n3":13 }
box = Oasys.PRIMER.MorphBox(m, 100, flag, options)

Suppose there are already morph points 1, 2, 3, 4, 5, 6, 7, 8 in model m at coordinates (0, 0, 0), (0, 0, 100), (0, 100, 0), (0, 100, 100), (100, 0, 0), (100, 0, 100), (100, 100, 0), (100, 100, 100) respectively. To create a new linear morph box between these points containing flagged items inside their volume:

options = dict()
options["points"] = [[[1,2],[3,4]],[[5,6],[7,8]]]
box = Oasys.PRIMER.MorphBox(m, 100, flag, options)

Static methods

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

Blanks all of the boxs in the model

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

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

Blanks all of the flagged boxs in the model

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

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

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

Returns the first box in the model

Parameters:

model (Model) – Model to get first box in

Returns:

MorphBox object (or None if there are no boxs in the model)

Return type:

MorphBox

Example

To get the first box in model m:

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

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

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

MorphBox label

Return type:

int

Example

To get the first free box label in model m:

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

Oasys.PRIMER.MorphBox.FlagAll(m, f)
classmethod MorphBox.FlagAllMorphedConnections(model, flag)

Flags all connections, in a given model, that have been morphed since their last remake. This includes connections that have been morphed by a morph box that has since been deleted

Parameters:
  • model (Model) – Model containing desired connections

  • flag (integer) – Flag to mark morphed connections

Returns:

True if successful, False if not

Return type:

bool

Example

To flag all morphed connections in Model m with flag

flag = Oasys.PRIMER.AllocateFlag()
Oasys.PRIMER.MorphBox.FlagAllMorphedConnections(m, flag)
classmethod MorphBox.GetAll(model)

Returns a list of MorphBox objects for all of the boxs in a model in PRIMER

Parameters:

model (Model) – Model to get boxs from

Returns:

List of MorphBox objects

Return type:

list

Example

To make a list of MorphBox objects for all of the boxs in model m

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

Returns a list of MorphBox objects for all of the flagged boxs in a model in PRIMER

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

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

Returns:

List of MorphBox objects

Return type:

list

Example

To make a list of MorphBox objects for all of the boxs in model m flagged with f

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

Returns the MorphBox object for a box ID

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

  • number (integer) – number of the box you want the MorphBox object for

Returns:

MorphBox object (or None if box does not exist)

Return type:

MorphBox

Example

To get the MorphBox object for box 100 in model m

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

Returns the last box in the model

Parameters:

model (Model) – Model to get last box in

Returns:

MorphBox object (or None if there are no boxs in the model)

Return type:

MorphBox

Example

To get the last box in model m:

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

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

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

MorphBox label

Return type:

int

Example

To get the last free box label in model m:

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

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

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

MorphBox label

Return type:

int

Example

To get the next free box label in model m:

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

Allows the user to pick a box

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

MorphBox object (or None if not picked)

Return type:

dict

Example

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

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

Renumbers all of the boxs in the model

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

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

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

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

Renumbers all of the flagged boxs in the model

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

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

  • start (integer) – Start point for renumbering

Returns:

No return value

Return type:

None

Example

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

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

Allows the user to select boxs using standard PRIMER object menus

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

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

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

Return type:

int

Example

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

Oasys.PRIMER.MorphBox.Select(f, 'Select boxs', m)

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

Oasys.PRIMER.MorphBox.Select(f, 'Select boxs', l)
classmethod MorphBox.SetMorphConnections(status)

Turns Morph Connections on/off

Parameters:

status (boolean) – true turns Morph Connections on. false turns Morph Connections off

Returns:

No return value

Return type:

None

Example

To turn Morph Connections on

Oasys.PRIMER.MorphBox.SetMorphConnections(True)
classmethod MorphBox.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)

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

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

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

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

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

Returns the total number of boxs in the model

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

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

Returns:

number of boxs

Return type:

int

Example

To get the total number of boxs in model m:

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

Unblanks all of the boxs in the model

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

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

Unblanks all of the flagged boxs in the model

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

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

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Unsketches all boxs

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

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

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

Unsketches all flagged boxs in the model

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

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

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

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

Instance methods

MorphBox.ApplyMorphing(redraw=Oasys.gRPC.defaultArg)

Recalculates the X, Y and Z coordinates of all nodes linked to the morph box by the *SET_NODE_COLUMN. This should be called when coordinates of morph points have changed and you wish to apply the morphing. If several morph point positions on the same box change, then it is more speed-efficient to call this function only once for the box

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to apply the morphing to several boxes and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using Model.UpdateGraphics()

Returns:

No return value

Return type:

None

Example

To calculate all global X, Y and Z coordinates for the morphed nodes for box b:

b.ApplyMorphing()
MorphBox.AssociateComment(comment)

Associates a comment with a box

Parameters:

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

Returns:

No return value

Return type:

None

Example

To associate comment c to the box b:

b.AssociateComment(c)
MorphBox.Blank()

Blanks the box

Returns:

No return value

Return type:

None

Example

To blank box b:

b.Blank()
MorphBox.Blanked()

Checks if the box is blanked or not

Returns:

True if blanked, False if not

Return type:

bool

Example

To check if box b is blanked:

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

Clears a flag on the box

Parameters:

flag (Flag) – Flag to clear on the box

Returns:

No return value

Return type:

None

Example

To clear flag f for box b:

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

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

MorphBox object

Return type:

MorphBox

Example

To copy box b into box z:

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

Detaches a comment from a box

Parameters:

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

Returns:

No return value

Return type:

None

Example

To detach comment c from the box b:

b.DetachComment(c)
MorphBox.FlagMorphedConnections(flag)

Flags all connections that have been morphed, by a givine morph box, since their last remake. A connection could be morphed by one morph box and not another, therefore calling this function on two boxes that share a connection may produce different results depending on which box the function is called for. E.g. morb1 and morb2 share conx1, morb1 gets morphed whereas morb2 remains unchanged. Calling this function for morb1 will flag conx1, however calling the function for morb2 won’t flag conx1

Parameters:

flag (integer) – Flag to mark morphed connections

Returns:

True if successful, False if not

Return type:

bool

Example

To flag all morphed connections in a MorphBox with flag

flag = Oasys.PRIMER.AllocateFlag()
box.FlagMorphedConnections(flag)
MorphBox.Flagged(flag)

Checks if the box is flagged or not

Parameters:

flag (Flag) – Flag to test on the box

Returns:

True if flagged, False if not

Return type:

bool

Example

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

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

Extracts the comments associated to a box

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

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

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

Parameters:

prop (string) – box property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

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

if b.ViewParameters().GetParameter(b.example):
    do_something..
MorphBox.GetPoint(xindex, yindex, zindex)

Returns the morph point ID on the morph box at indices in X, Y and Z directions

Parameters:
  • xindex (integer) – Index of the point in X direction. Note that indices start at 0, so it should be 0 for the points with the smallest parameteric X coordinate and box.nx-1 for the points with the highest X

  • yindex (integer) – Index of the point in Y direction. Note that indices start at 0, so it should be 0 for the points with the smallest parameteric Y coordinate and box.ny-1 for the points with the highest Y

  • zindex (integer) – Index of the point in Z direction. Note that indices start at 0, so it should be 0 for the points with the smallest parameteric Z coordinate and box.nz-1 for the points with the highest Z

Returns:

A MorphPoint object for the point on the box at given indices

Return type:

MorphPoint

Example

To get the 2nd point on the edge along the local Y direction and at highest local X and lowest local Z coordinate:

point = box.GetPoint(box.nx-1, 1, 0)
MorphBox.Keyword()

Returns the keyword for this morph box (*MORPH_BOX or *MORPH_BOX_HIGH_ORDER). Note that a carriage return is not added. See also MorphBox.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for morph box b:

key = b.Keyword()
MorphBox.KeywordCards()

Returns the keyword cards for the morph box. Note that a carriage return is not added. See also MorphBox.Keyword()

Returns:

string containing the cards

Return type:

str

Example

To get the cards for morph box b:

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

Returns the next box in the model

Returns:

MorphBox object (or None if there are no more boxs in the model)

Return type:

MorphBox

Example

To get the box in model m after box b:

b = b.Next()
MorphBox.Previous()

Returns the previous box in the model

Returns:

MorphBox object (or None if there are no more boxs in the model)

Return type:

MorphBox

Example

To get the box in model m before box b:

b = b.Previous()
MorphBox.Reset(redraw=Oasys.gRPC.defaultArg)

Resets the morph box to its initial position and updates the coordinates of all its nodes

Parameters:

redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to reset several boxes and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using Model.UpdateGraphics()

Returns:

No return value

Return type:

None

Example

To reset box b:

b.Reset()
MorphBox.SetFlag(flag)

Sets a flag on the box

Parameters:

flag (Flag) – Flag to set on the box

Returns:

No return value

Return type:

None

Example

To set flag f for box b:

b.SetFlag(f)
MorphBox.SetPointID(xindex, yindex, zindex, id)

Replaces the morph point ID on the list, whose size depends on the orders in X, Y and Z directions, with the given new ID

Parameters:
  • xindex (integer) – Index of the point in X direction. Note that indices start at 0, so it should be 0 for the points with the smallest parameteric X coordinate and box.nx-1 for the points with the highest X

  • yindex (integer) – Index of the point in Y direction. Note that indices start at 0, so it should be 0 for the points with the smallest parameteric Y coordinate and box.ny-1 for the points with the highest Y

  • zindex (integer) – Index of the point in Z direction. Note that indices start at 0, so it should be 0 for the points with the smallest parameteric Z coordinate and box.nz-1 for the points with the highest Z

  • id (integer) – New MorphPoint id

Returns:

No return value

Return type:

None

Example

To replace the 2nd point on the edge along the local X direction and at lowest local Y and highest local Z coordinate with point 101:

box.SetPointID(1, 0, box.nz-1, 101)
MorphBox.Sketch(redraw=Oasys.gRPC.defaultArg)

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

Parameters:

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

b.Sketch()
MorphBox.Unblank()

Unblanks the box

Returns:

No return value

Return type:

None

Example

To unblank box b:

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

Unsketches the box

Parameters:

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

b.Unsketch()
MorphBox.UpdateParametricCoordinates()

Recalculates parametric X, Y, Z coordinates for each node in the *SET_NODE_COLUMN associated with the morph box. This needs to be called whenever morph points on the box or their coordinates have been changed manually and you wish to keep all nodes at their intrinsic global X, Y, Z coordinates. Provided Morph Connections is on (see MorphBox.SetMorphConnections()), this will also force PRIMER to recalculate the parametric coordinates for any connections in the morph box next time one of its morph points is moved

Returns:

No return value

Return type:

None

Example

To recalculate all X, Y and Z coordinates for box b:

b.UpdateParametricCoordinates()
MorphBox.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:

MorphBox object

Return type:

dict

Example

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

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

Returns the cross references for this box

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for box b:

xrefs = b.Xrefs()