Model.CE_ConnectorPartition#

Model.CE_ConnectorPartition(connector_collection, non_normal, use_tol, tol, passed_comp_type, passed_comp, number_passed_type, passed_start_id, failed_comp_type, failed_comp, number_failed_type, failed_start_id, backup, backup_comp_type, backup_comp, skip_gap=0)#

This function can be used to partition seam connectors. Each test point is tested for at least two available projections. This happens with respect to the tolerance specified on the connector or to the tolerance given in the function. The connectors become partitioned into passed and failed seam connector pieces. These connectors can be organized in different components and follow certain numbering rules. The original connectors can also be backed up.

Parameters:
  • connector_collection (Collection) – The collection containing the connector entities to update.

  • non_normal (int) –

    0 - Use normal projection (recommended, <5° is considered normal).

    1 - Use non-normal projection.

  • use_tol (int) –

    Flag indicating the tolerance to use.

    0 - Use original tolerance.

    1 - Use tolerance by tol.

  • tol (double) – The tolerance to use if use_tol=1.

  • passed_comp_type (int) –

    The method to store the passed connectors.

    0 - Passed connectors will be organized into the newly created component “CE partition passed”.

    1 - Passed connectors will be organized into the current component.

    2 - Passed connectors will be organized into the connectors’ original component.

    3 - Passed connectors will be organized into the specified component passed_comp.

  • passed_comp (hwString) – The name of the component to use if passed_comp_type=3.

  • number_passed_type (int) –

    Method to renumber passed connectors.

    0 - Passed connectors will be renumbered/created beginning with the connector ID defined by passed_start_id. Any IDs already is use are skipped.

    1 - Passed connectors will be renumbered/created beginning with lowest available (unused) connector ID.

  • passed_start_id (int) – Connector ID for renumbering the passed connectors when number_passed_type=0.

  • failed_comp_type (int) –

    The method to store the failed connectors.

    0 - Failed connectors will be organized into the newly created component “CE partition failed”.

    1 - Failed connectors will be organized into the current component.

    2 - Failed connectors will be organized into the connectors’ original component.

    3 - Failed connectors will be organized into the specified component failed_comp.

  • failed_comp (hwString) – The name of the component to use if failed_comp_type=3.

  • number_failed_type (int) –

    Method to renumber failed connectors.

    0 - Failed connectors will be renumbered/created beginning with the connector ID defined by failed_start_id. Any IDs already is use are skipped.

    1 - Failed connectors will be renumbered/created beginning with lowest available (unused) connector ID.

  • failed_start_id (int) – Connector ID for renumbering the failed connectors when number_failed_type=0.

  • backup (int) –

    Flag indicating whether to backup the original connectors before partitioning.

    0 - Do not backup.

    1 - Backup.

  • backup_comp_type (int) –

    The method to store the backup connectors if backup=1.

    0 - Backup connectors will be organized into the newly created component “^CE partition backup”.

    1 - Backup connectors will be organized into the specified component backup_comp.

  • backup_comp (hwString) – The name of the component to use if backup_comp_type=1.

  • skip_gap (int) – Reserved for future development.

Example#

Partition the connectors with IDs 1-100. This is done using a normal projection with a tolerance of 20.0. The passed connectors will be moved into the original connector component and their IDs will continue. The failed connectors will be moved into the new “CE partition failed” component, and will begin with ID 5000. No backup of the original connectors will be made#
import hm
import hm.entities as ent

model = hm.Model()

model.CE_ConnectorPartition(
    connector_collection=hm.Collection(model, ent.Connector, list(range(1, 101))),
    non_normal=0,
    use_tol=1,
    tol=20.0,
    passed_comp_type=2,
    passed_comp="",
    number_passed_type=1,
    passed_start_id=1,
    failed_comp_type=0,
    failed_comp="CE partition failed",
    number_failed_type=0,
    failed_start_id=5000,
    backup=0,
    backup_comp_type=0,
    backup_comp="",
)