Model.CE_ConnectorCreateByAutopitch#

Model.CE_ConnectorCreateByAutopitch(collection, feature_angle, consider_thin_solids, max_flange_width, max_proximity_distance, autopitch_interval, autopitch_offset, autopitch_to_edge_distance, create_points_in_middle, max_variation_percent)#

Creates connectors using autopitch points, obtained by flange detection techniques.

Parameters:
  • collection (Collection) – The collection containing the entities to find flanges in, to create connectors. Valid entities are components.

  • feature_angle (double) – Used to identify each connected sequence of feature edges. Specifically, a feature edge is one whose adjoining faces form an angle greater than this value. Acceptable values are [0.0, 180], otherwise closer extreme is used.

  • consider_thin_solids (int) –

    0 - Closed shell thin solids are not considered as input. Only standard shell midmeshes are considered.

    1 - Closed shell thin solids are considered as input, along with standard shell midmeshes.

  • max_flange_width (double) – The maximum flange width. Used only if it is greater than 0.0.

  • max_proximity_distance (double) – The maximum proximity distance that can be used. Also, used as the tolerance value for connector creation.

  • autopitch_interval (double) – Spacing between autopitch points. Points are not created if set to 0.0.

  • autopitch_offset (double) – The initial offset for autopitch point. If set to 0.0, autopitch_interval/2 is used.

  • autopitch_to_edge_distance (double) – The distance from the free edge for autopitch points.

  • create_points_in_middle (int) –

    0 - Autopitch points are created on one of the flanges

    1 - Autopitch points are created at the midplane of flanges

  • max_variation_percent (double) – The maximum percentage variation allowed in inter-flange distances, from the average inter-flange distance.

Example#

Create connectors at the midplane of the components with IDs 1 and 2 using a feature angle of 30.0 degrees, not considering closed shell thin solids as input, maximum flange width of 20.0, maximum proximity distance of 20.0, autopitch interval of 50.0, offset of 10.0, and a distance from free edge of 10.0#
import hm
import hm.entities as ent

model = hm.Model()

model.CE_ConnectorCreateByAutopitch(
    collection=hm.Collection(model, ent.Component, [1, 2]),
    feature_angle=30.0,
    consider_thin_solids=0,
    max_flange_width=20.0,
    max_proximity_distance=20.0,
    autopitch_interval=50.0,
    autopitch_offset=10.0,
    autopitch_to_edge_distance=10.0,
    create_points_in_middle=1,
    max_variation_percent=0.0,
)