Model.surfacecreatespinlinewithoffsetangle#

Model.surfacecreatespinlinewithoffsetangle(collection, rotation_plane_normal, rotation_plane_base, start_angle, end_angle, options, solid_stitch=0)#

Spins lines to create surfaces by specifying a start and end angle.

Parameters:
  • collection (Collection) – The collection containing the line entities to spin.

  • rotation_plane_normal (hwTriple) – The hwTriple object defining the plane normal components. User can also supply a Python list of three doubles.

  • rotation_plane_base (hwTriple) – The hwTriple object defining the base point components of the plane. User can also supply a Python list of three doubles.

  • start_angle (double) – Degrees value of initial rotation angle: selected lines are rotated by this value before surface “sweeping” begins.

  • end_angle (double) – Degrees value of final rotation angle: surface “sweeping” stops at this value.

  • options (int) –

    Flags that indicate different modes.

    Bit values are used and the value is calculated as (Bit0 + 2*Bit1). Valid Bit options are:

    Bit0

    Line merging mode. Valid values are:

    0 - Do not merge input lines. A surface is created for each input line.

    1 - Merge input lines into smooth lines when possible. A surface is created for each group that forms tangentially continuous line.

    Bit1

    Specifies how entities are organized into components. Valid values are:

    0 - Surfaces are created in the current component.

    1 - Surfaces are created in the most common input lines component.

    Show Bit value calculator
    Radio Button Table
    Option Name Value
    Line merging mode (Bit0)
    Specifies how entities are organized into components (Bit1)
    Calculated argument value: 0

  • solid_stitch (int) –

    0 - Created surface will not be stitched to a solid.

    1 - Created surface will be stitched to a solid.

Example#

Spin the line with ID 2 from 45.0 to 90.0 degrees about an axis given by the vector (1,0,2.0,3.0) with rotation center at point (4.0,5.0,6.0), create a surface of revolution in current component#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacecreatespinlinewithoffsetangle(
    collection=hm.Collection(model, ent.Line, [2]),
    rotation_plane_normal=[1.0, 2.0, 3.0],
    rotation_plane_base=[4.0, 5.0, 6.0],
    start_angle=45.0,
    end_angle=90.0,
    options=0,
)