Model.surfaceintersectmark2#

Model.surfaceintersectmark2(collection1, plane_flag, plane_normal, plane_base, collection2, comp_mode)#

Creates lines by intersecting surfaces with a plane or other surfaces.

Parameters:
  • collection1 (Collection) – The collection containing the surface entities to intersect.

  • plane_flag (int) –

    0 - Use collection2 to define the surfaces to use for the intersection.

    1 - Use plane_normal and plane_base to define the plane to use for the intersection.

  • plane_normal (hwTriple) – The hwTriple object defining the plane normal components to use for intersection. User can also supply a Python list of three doubles. Valid when plane_flag=1.

  • plane_base (hwTriple) – The hwTriple object defining the base point components of the plane to use for intersection. User can also supply a Python list of three doubles. Valid when plane_flag=1.

  • collection2 (Collection) – The collection containing the surface entities to use for intersection. Valid when plane_flag=0.

  • comp_mode (int) –

    Parameter specifying how lines are organized into components:

    0 - Lines are created in the current component.

    1 - All created intersection lines will be placed in the original surface component(s), splitting the lines where necessary if the surfaces selected are connected and in different components.

Examples#

Create intersection lines for the xy - plane with a base node of ( 0.0 , 10.0 , 0.0 ) with the displayed surfaces#
import hm
import hm.entities as ent

model = hm.Model()

model.surfaceintersectmark2(
    collection1=hm.CollectionByDisplayed(model, ent.Surface),
    plane_flag=1,
    plane_normal=[0.0, 0.0, 1.0],
    plane_base=[0.0, 10.0, 0.0],
    collection2=hm.Collection(model, ent.Surface, populate=False),
    comp_mode=0,
)
Create intersection lines for the intersection of surfaces with IDs 1 and 2 with surfaces with IDs 10 and 11#
import hm
import hm.entities as ent

model = hm.Model()

model.surfaceintersectmark2(
    collection1=hm.Collection(model, ent.Surface[1, 2]),
    plane_flag=0,
    plane_normal=None,
    plane_base=None,
    collection2=hm.Collection(model, ent.Surface, [10, 11]),
    comp_mode=0,
)