Model.linecreateatsurfparams#

Model.linecreateatsurfparams(surf_entity, u1, u2, ucount, v1, v2, vcount, mode, comp_mode)#

Creates lines on a given surface for given parametric values.

Parameters:
  • surf_entity (Entity) – The object describing the entity to create lines. Valid entities are surfaces and faces.

  • u1 (double) – The lower bound of U parametric range. Must be within the range 0 to 1.

  • u2 (double) – The upper bound of U parametric range. Must be within the range 0 to 1.

  • ucount (int) – The number of lines to create in U parametric direction. Must be ≥ 0. If ucount=1 then u1 is taken as U parametric value for created line.

  • v1 (double) – The lower bound of V parametric range. Must be within the range 0 to 1.

  • v2 (double) – The upper bound of V parametric range. Must be within the range 0 to 1.

  • vcount (int) – The number of lines to create in V parametric direction. Must be ≥ 0. If the vcount=1 then v1 is taken as V parametric value for created line.

  • mode (int) –

    Specifies whether parameters are used relative to untrimmed surface parametric area or valid parametric area is scaled to visible region. Also used to specify whether created lines must reside inside visible trimmed surface area. Valid values are:

    0 - Untrimmed surface parametric area is used. Created lines must be inside visible surface area.

    1 - Surface parametric area is scaled to visible surface area. Created lines must be inside visible surface area.

    2 - Untrimmed surface parametric area is used. Created lines can be outside visible surface area.

    3 - Surface parametric area is scaled to visible surface area. Created lines can be outside visible surface area.

  • comp_mode (int) –

    Parameter specifying how entities are organized into components:

    0 - Lines are created in the current component.

    1 - Lines are created in the surface component.

Example#

Create 12 lines ( 3 lines in U , 4 lines in V ) on surface 11 between the U locations 0.5 and 0.75 , and the V locations 0.1 and 0.3#
import hm
import hm.entities as ent

model = hm.Model()

model.linecreateatsurfparams(
    surf_entity=ent.Surface(model, 11),
    u1=0.5,
    u2=0.75,
    ucount=3,
    v1=0.1,
    v2=0.3,
    vcount=4,
    mode=0,
)