Model.separate_fillets#

Model.separate_fillets(input_collection, output_collection, string_array)#

Takes as input a mark of surfaces or solids of a 3D body. It recognizes fillets in the 3D body and groups them by radius and width. The function creates a component with an autogenerated name for each fillet group and moves the fillet surfaces to the corresponding components.

Optionally the surfaces of the detected fillets can be put to an output mark.

Parameters:
  • input_collection (Collection) – The collection containing the entities as input. Valid entities are surfaces and solid entities.

  • output_collection (Collection) – The collection containing the surface entities of the detected holes.

  • string_array (hwStringList) –

    The object describing that contains the fillet width and radius group information.

    The string may contain either two quoted values:

    • min_fillet_radius <value> - The minimum radius of the fillet

    • max_fillet_radius <value> - The maximum radius of the fillet

    or four quoted values:

    • min_fillet_radius <value> - The minimum radius of the fillet

    • max_fillet_radius <value> - The maximum radius of the fillet

    • min_fillet_width <value> - The minimum width of the fillet

    • max_fillet_width <value> - The maximum width of the fillet

    The groups should not overlap.

Example#

Separate fillets form all surfaces in two groups . Group 1 with fillet radius between 0.001 - 10.0 and fillet width between 0.01 - 30.0 . Group 2 with fillet radius between 10.0 - 20.0 and fillet width between 30.0 - 50.0#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains all the surfaces
surfaces_collection = hm.Collection(model, ent.Surface)

model.separate_fillets(
    input_collection=surfaces_collection,
    output_collection=hm.Collection(model, ent.Surface, populate=False),
    string_array=["0.001 10.0 0.01 30.0", "10.0 20.0 30.0 50.0"],
)