Model.CE_ConnectorCreateByListWithCC#

Model.CE_ConnectorCreateByListWithCC(entitylist, ce_style, num_links, link_collection, cc_type, cc_name, area_mesh_size=1.0, area_mesh_type=0, area_offset=0.0, area_width=1.0, line_density=0.0, line_offset=0.0, line_offset_flag=0, line_spacing=1.0, link_elems_geom='geom', link_rule='none', relink_rule='none', seam_area_group=0, tol=0.0, tol_flag=0, end_offset=0.0, grouplinks=0, line_preserve_joints=0, line_preserve_nodes=0, smooth_curve_nodes=0, start_offset=0.0)#

Creates a connector from a list and assigns a connectorcontrol/connectorcontroldefault.

Parameters:
  • entitylist (EntityList) – A list containing the entity objects that specify the location to create connectors. Valid entities are elements, lines, nodes, points and surfaces.

  • ce_style (hwString) – The style of connectors to create. Valid values are apply_mass, area, bolt, seam, and spot.

  • num_links (int) – The number of links to use.

  • link_collection (Collection) – The collection containing the entities to create links for. Valid entities are components (for spot, bolt, seam, area or apply_mass), elements (for spot or apply_mass), nodes (for spot or apply_mass), surfaces (for spot, seam or area) and tags (for spot or apply_mass).

  • cc_type (EntityFullType) – The type of control to assign. Valid values are connectorcontrol and connectorcontroldefault.

  • cc_name (hwString) – The name of the connectorcontrol/connectorcontroldefault to assign.

  • area_mesh_size (double) – The mesh size for area connectors when type of entities in entitylist is surfaces. Default 10.0.

  • area_mesh_type (int) –

    The mesh type for area connectors when type of entities in entitylist is surfaces.

    0 - Trias

    1 - Quads

    2 - Mixed

    3 - Right trias

  • area_offset (double) – Offset area connectors created from node or line lists from the selected location by this value. Default 0.0.

  • area_width (double) – Width of area connectors created from node or line lists. Default 1.0.

  • line_density (double) – The density for spot or seam connectors on lines. Default 0.0.

  • line_offset (double) – Offset value from the ends of the line for spot or seam connectors on lines. Default 0.0.

  • line_offset_flag (int) –

    0 - Do not offset connectors (default)

    1 - Offset connectors

  • line_spacing (double) – The spacing for spot or seam connectors on lines. Default 1.0.

  • link_elems_geom (hwString) – Specifies whether to connect elements (default “elems”) or geometry (“geom”).

  • link_rule (hwString) – Specifies the link rule. Valid values are “now”, “at_fe_realize” or “none” (default).

  • relink_rule (hwString) – Specifies the relink rule. Valid values are “id”, “name” or “none” (default).

  • seam_area_group (int) –

    Flag for seam or area connector grouping:

    0 - No (default)

    1 - Yes

  • tol (double) – Add entities as links only within this distance of the specified location. Default 0.0.

  • tol_flag (int) –

    Flag for seam or area connector grouping:

    0 - Do not use tol (default)

    1 - Use tol

  • end_offset (double) – Reserved for future development

  • grouplinks (int) – Reserved for future development

  • line_preserve_joints (unsigned int) – Reserved for future development

  • line_preserve_nodes (unsigned int) – Reserved for future development

  • smooth_curve_nodes (unsigned int) – Reserved for future development

  • start_offset (double) – Reserved for future development

Example#

Create a seam connector at the location of line with ID 10 to connect component with IDs 3 and 4 using a tolerance of 6.0 and assign connectorcontrol “seam_quad_ltb”#
import hm
import hm.entities as ent

model = hm.Model

model.CE_ConnectorCreateByListWithCC(
    entitylist=[ent.Line(model, 10)],
    ce_style="seam",
    num_links=2,
    link_collection=hm.Collection(model, ent.Component, [3, 4]),
    cc_type=ent.Connectorcontrol,
    cc_name="seam_quad_ltb",
    link_elems_geom="elems",
    relink_rule="none",
    tol_flag=1,
    tol=6.0,
)