BezierPath

class BezierPath

Base class: SceneObject

property id

The id of the scene object.

Type

str, read-only

property name

The name of the scene object.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property type

The type of the scene object.

Type

SceneObjectType, read-only

property parent_object

The parent object of this object or None if no parent.

Type

SceneObject or None

Raises
  • ReadOnlyError -- If Database is in read only mode.

  • ValueError -- If trying to move the object into one of its children, trying to move the object to another model, trying to move the object to itself or trying to move the object to an object which is not a KinematicNode (that is an Axis, a Null or a Vector ).

property visible

The scene object visibility.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property locked

The scene object lock state.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property selected

Whether the scene object is selected.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property color

The shaper color of the scene object.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property translation

The global translation of the scene object, in meters.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property rotation

The global rotation of the scene object, in degrees.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property scale

The global scale of the scene object.

Type

Vector3

Raises
property pivot_to_world_translation

The translation from pivot point to global position, in meters.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property pivot_to_world_rotation

The rotation from pivot point to global orientation, in degrees.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property local_to_pivot_translation

The translation from local point to pivot position, in meters.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property local_to_pivot_rotation

The rotation from local point to pivot orientation, in degrees.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property pivot_to_parent_translation

The translation from pivot point to parent position, in meters

Note

If the object does not have a parent, it returns the global translation.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property pivot_to_parent_rotation

The rotation from pivot point to parent orientation, in degrees

Note

If the object does not have a parent, it returns the global rotation.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property closed

If the Bezier path is closed or not.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property invert_evaluation_direction

If the evaluation direction is inverted or not.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property evaluation_starting_point

The evaluation starting point. This point is on the Bezier path.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property vertex_count

The count of vertex contained in the Bezier path.

Type

int, read-only

list_child_objects(recursive=True)

List the child kinematic object of this objects.

Parameters

recursive (bool) -- If True, lists all child objects in this object, otherwise only the direct child objects are returned.

Returns

The list of kinematic object of this node.

Return type

list(SceneObject)

has_tag(tag)

Whether the tag is assigned to the scene object.

Parameters

tag (str) -- Name of the tag.

Returns

Whether the tag is assigned to the scene object.

Return type

bool

list_tags()

List all the tags assigned to the scene object.

Returns

The list of tags assigned to the scene object.

Return type

list(str)

add_tag(tag)

Create a new tag and assign to the scene object.

Parameters

tag (str) -- Name of the tag.

Returns

Whether the tag was added or not.

Return type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

remove_tag(tag)

Remove tag from the scene object.

Parameters

tag (str) -- Name of the tag.

Raises

ReadOnlyError -- If Database is in read only mode.

remove()

Delete this scene object.

Raises

ReadOnlyError -- If Database is in read only mode.

vertex_from_index(index)

Return the vertex guid for the index th vertex.

Parameters

index (int) -- The index of the vertex in the bezier path. Must be a valid index (0 <= index < vertex count).

Returns

The vertex guid.

Return type

str

Raises

ValueError -- If the index is invalid.

index_from_vertex(vertex)

Return the irdex of the given vertex guid.

Parameters

vertex (str) -- Is the vertex guid. Must correspond to the guid of a vertex contained into the Bezier path.

Returns

The vertex index in the Bezier path.

Return type

int

Raises

ValueError -- If the guid is not the guid of a vertex contained in the Bezier path.

vertex_position(vertex)

Return the world position for the given vertex guid.

Parameters

vertex (str) -- Is the vertex guid. Must correspond to the guid of a vertex contained into the Bezier path.

Returns

The vertex position in the world coordinates.

Return type

Vector3

Raises

ValueError -- If the guid is not the guid of a vertex contained in the Bezier path.

vertex_left_tangent_position(vertex)

Return the left tangent for the given vertex guid.

Parameters

vertex (str) -- Is the vertex guid. Must correspond to the guid of a vertex contained into the Bezier path.

Returns

The vertex left tangent expressed in the world coordinates.

Return type

Vector3

Raises

ValueError -- If the guid is not the guid of a vertex contained in the Bezier path.

vertex_right_tangent_position(vertex)

Return the right tangent for the given vertex guid.

Parameters

vertex (str) -- Is the vertex guid. Must correspond to the guid of a vertex contained into the Bezier path.

Returns

The vertex right tangent expressed in the world coordinates.

Return type

Vector3

Raises

ValueError -- If the guid is not the guid of a vertex contained in the Bezier path.

set_vertex_position(vertex, position)

Set the world position for the given vertex guid.

Parameters
  • vertex (str) -- Is the vertex guid. Must correspond to the guid of a vertex contained into the Bezier path.

  • position (Vector3) -- The new vertex position in the world coordinates.

Raises

ValueError -- If the guid is not the guid of a vertex contained in the Bezier path.

set_vertex_left_tangent_position(vertex, tangent)

Set the left tangent position for the given vertex guid.

Parameters
  • vertex (str) -- Is the vertex guid. Must correspond to the guid of a vertex contained into the Bezier path.

  • tangent (Vector3) -- The new vertex left tangent position expressed in the world coordinates.

Raises

ValueError -- If the guid is not the guid of a vertex contained in the Bezier path.

set_vertex_right_tangent_position(vertex, tangent)

Set the right tangent position for the given vertex guid.

Parameters
  • vertex (str) -- Is the vertex guid. Must correspond to the guid of a vertex contained into the Bezier path.

  • tangent (Vector3) -- The new vertex right tangent position expressed in the world coordinates.

Raises

ValueError -- If the guid is not the guid of a vertex contained in the Bezier path.

append_vertex(position, tangent)

Append a new vertex to the end of the Bezier path with the given position and tangent.

Parameters
  • position (Vector3) -- The position of the new vertex.

  • tangent (Vector3) -- The tangent of the new vertex.

Returns

The guid of the new vertex.

Return type

str

Raises

ReadOnlyError -- If Database is in read only mode.

evaluate_position(curvilinear_abscissa)

Return the world position evaluated at the given curvilinear abscissa.

Parameters

curvilinear_abscissa (float) -- The curvilinear abscissa. Must be valid (0 <= curvilinearAbscissa <= 1).

Returns

The evaluated position expressed in world coordinates.

Return type

Vector3

Raises

ValueError -- If the abscissa is invalid.

evaluate_tangent(curvilinear_abscissa)

Return the tangent evaluated at the given curvilinear abscissa.

Parameters

curvilinear_abscissa (float) -- The curvilinear abscissa. Must be valid (0 <= curvilinearAbscissa <= 1).

Returns

The evaluated tangent expressed in world coordinates.

Return type

Vector3

Raises

ValueError -- If the abscissa is invalid.

remove_vertex(vertex)

Remove the given vertex from the Bezier path. This method invalidate all the indices obtained using getIndexFromVertex.

Parameters

vertex (str) -- Is the vertex guid. Must correspond to the guid of a vertex contained into the Bezier path.

Raises
duplicate()

Duplicate the Bezier path.

Returns

The duplicated bezier path.

Return type

BezierPath

Raises

ReadOnlyError -- If Database is in read only mode.