Model.surfacesplitwithline#

Model.surfacesplitwithline(surface, line, vector, entire_surf_flag, distance)#

Splits a surface with a line by sweeping the line along a vector.

Parameters:
  • surface (Entity) – The surface entity to be split.

  • line (Entity) – The entity line used to split the surface.

  • vector (hwTriple) – The hwTriple object representing the vector used to sweep the line. User can also supply a Python list of three doubles.

  • entire_surf_flag (int) –

    0 - The line is swept for a distance of distance

    1 - The line is swept throughout the entire surface.

  • distance (double) – The distance to sweep line, if entire_surf_flag=0.

Example#

Split the surface with ID 1 by sweep the line with ID 2 along the x - axis for a distance of 100.0#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacesplitwithline(
    surface=ent.Surface(model, 1),
    line=ent.Line(model, 2),
    vector=[1.0, 0.0, 0.0],
    entire_surf_flag=0,
    distance=100.0,
)