Model.CE_ConnectorLineCombine_bycollection#
- Model.CE_ConnectorLineCombine_bycollection(connectors, collection, ce_style, num_links, link_collection, area_mesh_size=10.0, area_mesh_type=1, area_offset=0.0, area_width=1.0, line_combine_option='', line_density=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)#
Combines multiple line connectors to a single line connector. In addition, the internal lines (within the connectors) are merged into a single internal line.
- Parameters:
connectors (Collection) – The collection containing the connector entities.
collection (Collection) – The collection containing the entities that specifies the location to create connectors.
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 Valid only for Spot, Bolt, Seam or Area or Apply Mass connectors.
elements Valid for Spot or Apply Mass connectors.
nodes Valid for Spot or Apply Mass connectors.
surfaces Valid only for Spot, Seam or Area connectors.
tags Valid for Spot or Apply Mass connectors.
area_mesh_size (double) – The mesh size for area connectors when the entities of the
collectionare surfaces.area_mesh_type (int) –
The mesh type for area connectors when the entities of the
collectionare 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_combine_option (hwString) –
The combine option for combining the two or more line connectors:
combine_smooth - Combines lines/connector with smooth
curvecombine_straight - Combines lines/connectors with straight
curvecombine_midline - Combines two lines/connectors as one midline connector
line_density (unsigned int) – 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 (unsigned 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 (elems default) or geometry (geom).
link_rule (hwString) – Specifies the link rule. Valid values are “now”, “at_fe_realize” or “none”. (Default “none”)
relink_rule (hwString) – Specifies the relink rule. Valid values are “id”, “name” or “none”. (Default “none”)
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 (unsigned int) –
Flag for seam or area connector grouping:
0 - Do not use
tol(default)1 - Use
tol
Example#
Combine spot line connectors with IDs 1 and 2 , lines with IDs 3 and 4, and components links with IDs 1, 2, 3 and 4 with “combine_smooth” option#import hm import hm.entities as ent model = hm.Model() model.CE_ConnectorLineCombine_bycollection( connectors=hm.Collection(model, ent.Connector, [1, 2]), collection=hm.Collection(model, ent.Line, [3, 4]), link_collection=hm.Collection(model, ent.Component, [3, 4]), num_links=2, ce_style="spot", link_elems_geom="elems", link_rule="now", relink_rule="none", tol_flag=1, tol=99.0, line_density=0, line_spacing=5.0, line_offset=0.0, line_combine_option="combine_smooth", )