Model.surfaceintersectmark#

Model.surfaceintersectmark(collection1, plane_flag, plane_normal, plane_base, collection2)#

Creates lines by intersecting surfaces with a plane or other surfaces. The line segments are organized into the current component.

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 the plane defined by the plane_normal and plane_base 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.

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.surfaceintersectmark(
    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),
)
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.surfaceintersectmark(
    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]),
)