### 6.5.11. ModelingGroup

`class compolyx.ModelingGroup`(graph, obj, parent=None)

Class to manage modeling groups.

Access:

    >>> import compolyx
    >>> db = compolyx.DB()
    >>> model = db.models['class40.1']
    >>> mpg = model.modeling_groups['PlyGroup.1']

Creation:

    >>> import compolyx
    >>> db = compolyx.DB()
    >>> model = db.models['class40.1']
    >>> mpg_1 = model.create_modeling_group('PlyGroup.1')

`copy_butt_joint_sequence`(source, global_ply_nr=None, sort=True)

  Makes a copy of a butt joint sequence

  Parameters

  - source : Source object to copy

  - global_ply_nr : Global ply number to use. If 0 the ply is added at the top.

  - sort : Whether to sort all plies of modeling group after copy.

      If multiple plies are copied at once it can be useful to sort only once at the end of the copy operation.

  Returns

  New instance of modeling ply

`copy_interface_layer`(source, global_ply_nr=None, sort=True)

  Copy a Interface Layer

  Parameters

  - source : Source object to copy

  - global_ply_nr : Global ply number to use. If 0 the ply is added at the top.

  - sort : Whether to sort all plies of Interface Layer group after copy.

      If multiple plies are copied at once it can be useful to sort only once at the end of the copy operation.

  Returns

  New instance of Interface Layer

`copy_modeling_ply`(source, global_ply_nr=None, sort=True)

  Copy a modeling ply

  Parameters

  - source : Source object to copy

  - global_ply_nr : Global ply number to use. If 0 the ply is added at the top.

  - sort : Whether to sort all plies of modeling group after copy.

      If multiple plies are copied at once it can be useful to sort only once at the end of the copy operation.

  Returns

  New instance of modeling ply

`create_butt_joint_sequence`(name=None, id=None, global_ply_nr=None, master_plies=None, slave_plies=None, active=True)

  Creates an new butt joint sequences and adds it to this modeling group

  Parameters

  - name : Name of the butt joint - id : ID of the name - global_ply_nr : Global ply number which orders the ply sequences - master_plies : List of tuples (modeling ply, level) - slave_plies : Single or list of modeling plies - active : Boolean whether the butt joint sequence is active or not

  Return

  New butt joint sequence

`create_interface_layer`(name=None, id=None, global_ply_nr=None, oriented_selection_sets=None, open_area_sets=None, active=True)

  Create Interface Layer

  Parameters

  - name : Name of the new Interface Layer

  - id : Optional id of the new Interface Layer

  - global_ply_nr : Ply number for stacking sequence

  - oriented_selection_sets : Oriented Selection Set for the expansion

      of the Interface Layer

  - open_area_sets : Defines the initial crack of a VCCT layer (optional)

  - active : Interface Layer active. Default True

  Returns

  The created Interface Layer

  Example

      >>> oes_1 = model.oriented_selection_sets['OrientedSelectionSet.1']
      >>> mpg = model.modeling_groups['PlyGroup.1']
      >>> mp_1 = mpg.create_interface_layer( name='InterfaceLayer.1',
                                        global_ply_nr=0,
                                        oriented_selection_sets=(oes_1,),
                                        active=True)

`create_modeling_ply`(name=None, id=None, ply_material=None, ply_angle=0.0, number_of_layers=1, global_ply_nr=None, oriented_selection_sets=None, selection_rules=None, draping='no_draping', draping_seed_point=None, auto_draping_direction=True, draping_thickness_correction=True, draping_direction=None, draping_mesh_size=None, thickness_definition='nominal', core_geometry=None, active=True, taper_edges=None, thickness_field=None, thickness_field_type='absolute', angle_1_field=None, angle_2_field=None)

  Create modeling ply

  Parameters

  - name : Name of the new Modeling Ply

  - id : Optional id of the new Modeling Ply

  - ply_material : Ply Material (Fabric, Stackup, SubLaminate)

  - ply_angle : Angle of the Ply Material

  - number_of_layers : Multiplier of this layer

  - global_ply_nr : Ply number for stacking sequence

  - oriented_selection_sets : Oriented Selection Set for the expansion

      of the Modeling Ply

  - selection_rules : Element Selection Rules for the Modeling Ply

  - draping : The type of draping to be used "no_draping", "evaluate_draping", or "tabular_values"

  - draping_seed_point : Start/Seed Point for Draping

  - auto_draping_direction : Automatically set draping direction (Default: True)

  - draping_direction : Direction to go in Draping (Default: None)

  - draping_mesh_size : Mesh size used for Draping (Default: Calculated average element size from mesh )

  - thickness_definition : Enum that describes the method used for thickness definition (Default: Nominal)

  - core_geometry : The assigned core geometry

  - active : Modeling Ply active

  - taper_edges : Taper Edges for the Modeling Ply

  - thickness_field : Look-Up table column with scalar values for thickness sampling (optional)

  - thickness_field_type : The type of thickness field 'absolute' or 'relative'

  - angle_1_field : Look-Up table column with scalar values for angle 1

  - angle_2_field : Look-Up table column with scalar values for angle 2

  Returns

  The created Modeling Ply

  Example

      >>> oes_1 = model.oriented_selection_sets['OrientedSelectionSet.1']
      >>> fabric_1 = model.material_data.fabrics['Fabric.1']
      >>> mpg = model.modeling_groups['PlyGroup.1']
      >>> mp_1 = mpg.create_modeling_ply( name='ModelingPly.1',
                                          ply_angle=0.0,
                                          global_ply_nr=0,
                                          number_of_layers=1,
                                          ply_material=fabric_1,
                                          oriented_selection_sets=(oes_1,),
                                          selection_rules=(rule1,),
                                          draping="no_draping",
                                          draping_seed_point = (1,0,0),
                                          auto_draping_direction = True)

`export_ply_geometries`(filename, ply_level='production_ply', boundary=True, surface=True, offset_type='middle_offset', direction_arrows=False, first_direction=True, second_direction=False, arrow_length=1.0, arrow_type='no_arrow')

  Exports the surface, boundary and/or fiber directions of modeling, production and analysis ply to igs or step file.

  Parameters

  - filename : File path (allowed extensions are iges, igs, step and stp).

  - ply_level : Defines which plies are exported: modeling_ply_wise , production_ply_wise or analysis_ply_wise . Default is production_ply_wise .

  - boundary : Boolean whether to export the boundary. Default is True.

  - surface : Boolean whether to export the ply surface. Default is True.

  - offset_type : Offset type (can be no_offset , middle_offset , top_offset or bottom_offset ). Default is middle_offset .

  - direction_arrows : Boolean whether to export the direction arrows. Default is False.

  - first_direction : Boolean whether to export the first (main) material direction. Default is True

  - second_direction : Boolean whether to export the second material direction. Default is False.

  - arrow_length : Length of the arrows. Default is 1.

  - arrow_type : Defines the arrow type (can be standard_arrow , no_arrow , half_arrow ). Default is no_arrow .

`plies`

  Modeling Plies of the Modeling Group

`reorder_plies`(source, target, type='after')

  Reorder the ply group. Take source plies and insert before/after target ply.

  Parameters

  - source : list of plies to insert at new position

  - target : position to insert plies can be modeling ply or global_ply_nr

  - type : insert type can be after`(default) and `before

`serialize`()

  Serialize to Python string

Release 18.2 - © ANSYS, Inc. All rights reserved.