alias_api.AlCurveAttributes

class alias_api.AlCurveAttributes

Bases: AlAttributes

Interface to Alias curve attributes.

AlCurveAttributes is a class derived from the AlAttributes class. This class allows access to a curve.

This class provides information similar to that of the AlCurve class but without the ability to modify the curve or its CVs.

NOTE: When an AlCurve has just an AlCurveAttribute attribute the AlCurveAttribute provides no information that the AlCurve doesn’t. For this reason, in this case, no information is provided by the AlCurveAttribute, all methods return null values.

copy_wrapper(self: alias_api.AlCurveAttributes) alias_api.AlObject

This method makes a copy of the AlCurveAttributes. The returned AlCurveAttributes will reference the same data as the original.

cvs_unaffected_position(self: alias_api.AlCurveAttributes) tuple[int, std::vector<std::array<double,4>,std::allocator<std::array<double,4> > >, std::vector<int,std::allocator<int> >]

Returns the CV’s in the given CV array and the multiplicity of each CV in the multiplicity vector. The first dimension of the CV array must be number_of_cvs(). The length of the multiplicity vector must also be number_of_cvs(). The multiplicity vector returned by this function is the same as the one returned by cvs_world_position().

Returns

A tuple containing: (1) The status code result of the operation:

Success - the CVs positions were returned InvalidObject - the attribute was not valid sInvalidArgument - a None argument was supplied Failure - an error occurred

  1. The CV positions

  2. The multiplicity of each CV

Return type

int(AlStatusCode)

degree(self: alias_api.AlCurveAttributes) int

Returns the degree of the curve. Zero will be returned if the attribute is not valid.

form(self: alias_api.AlCurveAttributes) alias_api.AlCurveFormType

When a curve is periodic it means that its endpoints are coincident and that the curve is tangent continuous at the point where its endpoints touch. “Periodic” is returned in this case. “Closed” is returned if the curve is not periodic, but if its endpoints are coincident. If a curve is neither “Periodic” nor “Closed” then “Open” is returned.

(Note: If you use the “close” menu item in the interactive Alias package, you actually make a curve periodic.)

Returns

The curve form type.

Return type

curveFormType Open - the curve is open. Closed - the curve is closed. Periodic - the curve is periodic. InvalidCurve - the attribute is not valid.

knot_vector(self: alias_api.AlCurveAttributes) std::vector<double,std::allocator<double> >

Returns the knot vector in the given vector. This vector must be of length numberOfKnots(). For more information as to what these values mean, see the description for the create() method.

:param knot_vector - returned knot vector :type knot_vector: List

Returns

The status code result of the operation: Success - the knot vector was returned InvalidObject - the curve was not valid InvalidArgument - a None argument was supplied Failure - the knot vector could not be returned

Return type

int(AlStatusCode)

number_of_cvs(self: alias_api.AlCurveAttributes) int

Returns the number of CVs. -1 is returned if the attribute is not valid.

number_of_knots(self: alias_api.AlCurveAttributes) int

Returns the number of knots in this curve. For more information as to what this number means, see the description for the create() method. -1 is returned if the attribute is not valid.

number_of_spans(self: alias_api.AlCurveAttributes) int

Returns the number of spans in the curve. -1 is returned if the attribute is not valid.

type(self: alias_api.AlCurveAttributes) alias_api.AlObjectType

Returns the class identifier ‘ConicAttributeType’.