alias_api.AlArcAttributes

class alias_api.AlArcAttributes

Bases: AlAttributes

Interface to Alias arc curve attributes.

AlArcAttributes is a class derived from the AlAttributes class. This class allows access to the attributes for an arc.

The attributes which define an arc are its radius, sweep angle, center point, start point, and end point. Coordinates are given in object space, and not world space.

calculate_start_and_end_andles(self: alias_api.AlArcAttributes, x_axis: std::array<double, 3>, y_axis: std::array<double, 3>, z_axis: std::array<double, 3>) tuple[int, float, float]

This function will convert the attribute information to start and end angle format. The start and end angles are rotated by the axis into their correct position.

Parameters
  • x_axis (List[float[3]]) – the x axis

  • y_axis (List[float[3]]) – the y axis

  • z_axis (List[float[3]]) – the z axis

Returns

a tuple containing: (1) the status code result:

Success - Converting the data succeded InvalidObject - the attribute was invalid Failure - Conversion failed

  1. the start angle

  2. the end angle

Return type

Tuple[int(AlStatusCode), float, float]

center_point(self: alias_api.AlArcAttributes) tuple[int, float, float, float]

Returns the center point for the arc. Note that there is for the arc. Note that there is no “set” method for the center point. The center point is moved by changing the arc’s radius.

Returns

a tuple containing: (1) the status code result:

Success - the center point was successfully returned. InvalidObject - the attr

  1. the center point x coordinate

  2. the center point y coordinate

  3. the center point z coordinate

Return type

Tuple[int(AlStatusCode), float, float, float]

copy_wrapper(self: alias_api.AlArcAttributes) alias_api.AlObject

Return an exact duplicate of this AlArcAttributes wrapper.

end_point(self: alias_api.AlArcAttributes) tuple[int, float, float, float]

Returns the point where the arc ends.

Returns

a tuple containing: (1) the status code result:

Success - the start point was successfully returned. InvalidObject - the attribute was invalid.

  1. the end point x coordinate

  2. the end point y coordinate

  3. the end point z coordinate

Return type

Tuple[int(AlStatusCode), float, float, float]

radius(self: alias_api.AlArcAttributes) float

Returns the radius of the arc. Zero is returned if the attribute is not valid.

set_end_point(self: alias_api.AlArcAttributes, x: SupportsFloat, y: SupportsFloat, z: SupportsFloat) int

This method moves the end point of the arc. Changing the end point changes the size of the sweep, and if the new end point is not on the circle about the arc’s center point, the center point will be moved.

Parameters
  • x (float) – end point x coordinate

  • y (float) – end point y coordinate

  • z (float) – end point z coordinate

Returns

the status code result of the operation: Success - Setting the end point succeeded. InvalidObject - the attribute was invalid Failure - Setting the end point failed.

Return type

int(AlStatusCode)

set_radius(self: alias_api.AlArcAttributes, arg0: SupportsFloat) int

Change the radius for the arc. This operation will move the center point for the arc.

Parameters

radius (float) – the radius of the arc

Returns

the status code result of the operation: Success - Setting the sweep succeeded. InvalidObject - the attribute was invalid Failure - Setting the sweep failed.

Return type

int(AlStatusCode)

set_start_point(self: alias_api.AlArcAttributes, x: SupportsFloat, y: SupportsFloat, z: SupportsFloat) int

This method moves the start point of the arc. Changing the start point changes the size of the sweep, and if the new start point is not on the circle about the arc’s center point, the center point will be moved.

Parameters
  • x (float) – start point x coordinate

  • y (float) – start point y coordinate

  • z (float) – start point z coordinate

Returns

the status code result of the operation: Success - Setting the start point succeeded. InvalidObject - the attribute was not valid Failure - Setting the start point failed.

Return type

int(AlStatusCode)

set_sweep_from_end_point(self: alias_api.AlArcAttributes, arg0: SupportsFloat) int

Change the sweep of the arc from the end point. This operation will move the start point. The sweep is given in degrees.

Parameters

sweep (float) – the sweep from the end point (in degrees)

Returns

the status code result of the operation: Success - Setting the sweep succeeded. InvalidObject - the attribute was invalid Failure - Setting the sweep failed.

Return type

int(AlStatusCode)

set_sweep_from_start_point(self: alias_api.AlArcAttributes, arg0: SupportsFloat) int

Change the sweep of the arc from the start point. This operation will move the end point. The sweep is given in degrees.

Parameters

sweep (float) – the sweep from the start point (in degrees)

Returns

the status code result of the operation: Success - Setting the sweep succeeded. InvalidObject - the attribute was invalid Failure - Setting the sweep failed.

Return type

int(AlStatusCode)

start_point(self: alias_api.AlArcAttributes) tuple[int, float, float, float]

Returns the point where the arc starts.

Returns

a tuple containing: (1) the status code result:

Success - the start point was successfully returned. InvalidObject - the attribute was invalid.

  1. the start point x coordinate

  2. the start point y coordinate

  3. the start point z coordinate

Return type

Tuple[int(AlStatusCode), float, float, float]

sweep(self: alias_api.AlArcAttributes) float

Returns the number of degrees in the arc. Zero is returned if the attribute is not valid.

type(self: alias_api.AlArcAttributes) alias_api.AlObjectType

Return the AlArcAttributes type identifier.