Model.connect_surfaces_11#

Model.connect_surfaces_11(source_collection, target_collection, extend_mode, trim_mode, distance, min_angle_to_target_surf, max_angle_edge_to_surf, lines_to_extend_over, guide_mode, ignore_guide_edges, guide_angle, advanced_options, additional_options)#

Extends surfaces to meet other surfaces.

Parameters:
  • source_collection (Collection) – The collection containing the surface entities to extend.

  • target_collection (Collection) – The collection containing the surface entities to target.

  • extend_mode (int) –

    The mode for extending the surfaces. Valid values are:

    1 - By distance.

    2 - By thickness ratio.

    3 - Over edges to target surface.

    4 - Over edges by distance.

  • trim_mode (int) –

    The mode for trimming the surfaces. Valid values are:

    0 - Do not trim the result.

    1 - Trim the result.

  • distance (double) – The extend distance, if extend_mode = 1. Thickness ratio, if extend_mode = 2.

  • min_angle_to_target_surf (double) – The minimum angle between surfaces that will be considered for extension.

  • max_angle_edge_to_surf (double) – The maximum angle between an edge and a surface that will be considered for extension.

  • lines_to_extend_over (Collection) – The collection containing the containing the line entities (edges) over which the extension can occur.

  • guide_mode (int) –

    The mode for using guide edges. Valid values are:

    0 - Do not use guide edges.

    1 - Use guide edges.

  • ignore_guide_edges (Collection) – The collection containing the line entities (edges) to ignore as guide edges.

  • guide_angle (double) – The minimum angle to use for determining if an edge is a guide edge.

  • advanced_options (int) –

    The advanced option settings for surface extension.

    Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3 + 16*Bit4 + 32*Bit5). Valid Bit values are:

    Bit0

    Shortening. Valid values are:

    0 - Do not allow shortening.

    1 - Allow shortening.

    Bit1

    Inter-component extensions. Valid values are:

    0 - Do not allow inter-component extensions.

    1 - Allow inter-component extensions.

    Bit2

    Place result in original components or in “Extended Surfaces” component. Valid values are:

    0 - Place result in original components.

    1 - Duplicate input surfaces and place result in “Extended Surfaces” component.

    Bit3

    Place the extended surfaces in component. Valid values are:

    0 - If Bit4=1, place the extended surfaces in the component defined by Bit2.

    1 - If Bit4=1, place the extended surfaces in the current component.

    Bit4

    Extensions are created using original or new surfaces. Valid values are:

    0 - Extensions are created using original surfaces.

    1 - Extensions are created using new surfaces.

    Bit5

    Create surface for each original surface or for each edge of the original surface. Valid values are:

    0 - Create a new surface for each edge of the original surface.

    1 - Create a single surface for each original surface.

    Show Bit value calculator
    Radio Button Table
    Option Name Value
    Shortening (Bit0)
    Inter-component extensions (Bit1)
    Place result in original components or in 'Extended Surfaces' component (Bit2)
    Place the extended surfaces in component (Bit3)
    Extensions are created using original or new surfaces (Bit4)
    Create surface for each original surface or for each edge of the original surface (Bit5)
    Calculated argument value: 0

  • additional_options (int) – Reserved for future development. Must be set to 0.

Example#

Extend surfaces with IDs 2 and 3 by a distance of 5.0, with no advanced options#
import hm
import hm.entities as ent

model = hm.Model()

model.connect_surfaces_11(
    source_collection=hm.Collection(model, ent.Surface, [2, 3]),
    target_collection=hm.CollectionByInteractiveSelection(model, ent.Surface),
    extend_mode=1,
    trim_mode=1,
    distance=5.0,
    max_angle_edge_to_surf=15.0,
    lines_to_extend_over=hm.CollectionByInteractiveSelection(model, ent.Line),
    guide_mode=30.0,
    ignore_guide_edges=hm.CollectionByInteractiveSelection(model, ent.Line),
    guide_angle=30.0,
    advanced_options=0,
    reserved=0,
)