Curve

Defines a curve object that mostly parallels Cubit's RefEdge class.

Inheritance

PyObservable
Entity
GeomEntity
Curve

Class Member Functions

  color Set the color of the Curve.
int color Get the color of the Curve.
[ float ] tangent Get the tangent to the Curve at a particular point.
[ float ] curvature Get the curvature of the Curve at a particular point.
[ float ] closest_point Get the curvature of the Curve at a particular point.
[ float ] closest_point_trimmed Get the curvature of the Curve at a particular point.
float length Get the length of the Curve.
[ float ] curve_center Get the center point of the Curve.
[ float ] position_from_fraction Get the position of the point a specified fraction along the Curve.
float start_param Get the lowest value of the Curve in uv space.
float end_param Get the highest value of the Curve in uv space.
float u_from_position Get the u value of a particular position on the Curve.
[ float ] position_from_u Get the position of a particular u value for the Curve.
float u_from_arc_length Get the u value for a point a specified arc length away from a specified root parameter on the Curve.
float fraction_from_arc_length Get the fraction along the Curve a specified arc length is away from a given Vertex.
[ float ] point_from_arc_length Get the position on a Curve that is a specified arc length away from the specified root parameter.
float length_from_u Get the length between two specified parameters on a Curve.
Bool is_periodic Get whether the Curve is periodic or not.

Member Function Documentation


color(value)

Set the color of the Curve.

Example

 curve.color(0)

Parameters

value The color value that the curve will have

int color()

Get the color of the Curve.

Example

 col = curve.color()

Return

The color value associated with the curve's current color


[ float ] tangent(point)

Get the tangent to the Curve at a particular point.

Example

 tan = curve.tangent([0,0,0])

Parameters

point A vector containing 3 doubles representing coordinates of a location on the Curve

Return

The tangent to the Curveat the location specified


[ float ] curvature(point)

Get the curvature of the Curve at a particular point.

Example

 curvature = curve.curvature([0,0,0])

Parameters

point A vector containing 3 doubles representing coordinates of a location on the Curve

Return

The curvature of the Curveat the location specified


[ float ] closest_point(point)

Get the curvature of the Curve at a particular point.

Example

 close = curve.closest_point([0,0,0])

Parameters

point A vector containing 3 doubles representing coordinates of a location on the Curve

Return

The closest point to the Curvefrom the location specified


[ float ] closest_point_trimmed(point)

Get the curvature of the Curve at a particular point.

Example

 close = curve.closest_point([0,0,0])

Parameters

point A vector containing 3 doubles representing coordinates of a location on the Curve

Return

The closest point to the Curvefrom the location specified


float length()

Get the length of the Curve.

Example

 len = curve.length()

Return

The length of the Curve


[ float ] curve_center()

Get the center point of the Curve.

Example

 center = curve.curve_center()

Return

A vector containing the coordinates of the Curve's center according to the following: 0 - x coordinate 1 - y coordinate 2 - z coordinate


[ float ] position_from_fraction(fraction_along_curve)

Get the position of the point a specified fraction along the Curve.

Example

 pos = curve.position_from_fraction(0.5)

Parameters

fraction_along_curve A decimal value between 0 and 1 to determine a particular position along the Curve

Return

A vector containing the coordinates of the position a specified fraction along the Curve: 0 - x coordinate 1 - y coordinate 2 - z coordinate


float start_param()

Get the lowest value of the Curve in uv space.

Example

 start = curve.start_param()

Return

The beginning value of the parameter


float end_param()

Get the highest value of the Curve in uv space.

Example

 end = curve.end_param()

Return

The ending value of the parameter


float u_from_position(position)

Get the u value of a particular position on the Curve.

Example

 u = curve.u_from_position([0,0,0])

Parameters

position A vector containing the coordinates of the input position

Return

The u value of the position along the Curve


[ float ] position_from_u(u_value)

Get the position of a particular u value for the Curve.

Example

 position = curve.position_from_u(0.5)

Parameters

u_value The u value of the position along the Curve

Return

A vector containing the coordinates of the output position


float u_from_arc_length(root_param, arc_length)

Get the u value for a point a specified arc length away from a specified root parameter on the Curve.

Example

 u = curve.u_from_arc_length(0, 0.5)

Parameters

root_param The beginning parameter from which the arc length is added to
arc_length The length away from the root parameter of the output parameter

Return

The u value of the Curvethe arc length away from the root parameter


float fraction_from_arc_length(root_vertex, length)

Get the fraction along the Curve a specified arc length is away from a given Vertex.

Example

 fraction = curve.fraction_from_arc_length(vertex, 0.5)

Parameters

root_vertex The Vertexto start from (vertex object)
length The length along the Curveaway from the root Vertex

Return

The fraction of the Curvethat is the specified length away from the specified Vertex


[ float ] point_from_arc_length(root_param, arc_length)

Get the position on a Curve that is a specified arc length away from the specified root parameter.

Example

 position = curve.point_from_arc_length(0, 0.5)

Parameters

root_param The root parameter from which the arc length is added to
arc_length The arc length along the Curveaway from the root parameter

Return

A vector that contains the coordinates of a position a specified arc length away from the root parameter


float length_from_u(parameter1, parameter2)

Get the length between two specified parameters on a Curve.

Example

 length = curve.length_from_u(0, 0.5)

Parameters

parameter1 The beginning parameter
parameter2 The ending parameter

Return

The length between the two specified paramters along the Curve


Bool is_periodic()

Get whether the Curve is periodic or not.

Example

 periodic = curve.is_periodic()

Return

Whether the Curveis periodic or not