Model.linecreatecircle#

Model.linecreatecircle(method, offset=0.0, closed=1, angle=360.0, radius=1.0, centerpt=hwTriple(0.0, 0.0, 0.0), normal=hwTriple(0.0, 0.0, 0.0), coordlist=hwDoubleList())#

Creates circle line from points or center and radius.

Parameters:
  • method (hwString) –

    The method of creating the circle.

    center - Uses the input center point, radius, and normal.

    points - Uses the input points.

  • offset (double) – The circle offset value. Default is 0.0. Valid for method="center".

  • closed (int) – The flag defining if a closed circle is created (0 - No, 1 - Yes). Valid for method="points".

  • angle (double) – The circle angle in degrees. Default is 360. Valid for method="center".

  • radius (double) – The radius of the circle. Valid for method="center".

  • centerpt (hwTriple) – The coordinates of the circle center. Valid for method="center".

  • normal (hwTriple) – The vector x, y, z components defining the normal of the circle. Valid for method="center".

  • coordlist (hwDoubleList) – The x, y, z coordinates defining three points in space. Valid for method="points".

Example#

Create a circle using the “center” method at center (-0.2 0.1 0.0), using normal (0.0 0.0 1.0) and radius 0.64#
import hm
import hm.entities as ent

model = hm.Model()

model.linecreatecircle(
    method="center",
    centerpt=[-0.2, 0.1, 0.0],
    normal=[0.0, 0.0, 1.0],
    radius=0.64
)
Create a circle using the “points” method using coordinates (1.12 0.42 0.0), (0.91 -0.4 0.0), (1.82 -0.49 0.0).#
import hm
import hm.entities as ent

model = hm.Model()

model.linecreatecircle(
    method="points",
    coordlist=[1.12, 0.42, 0.0, 0.91, -0.4, 0.0, 1.82, -0.49, 0.0]
)