alias_api.AlCurveNode
- class alias_api.AlCurveNode
Bases:
AlDagNodeA dag node that refers to a nurbs curve’s geometry.
AlCurveNode is the class used to access and manipulate curves within the dag.
This class behaves like other dag nodes (see AlDagNode for a description of the usage and purpose of dag nodes). Users access the geometry of the curve via the ‘curve()’ method which returns a pointer to an AlCurve object which provides the user with the methods used to modify the geometry of the curve. Curves can be created from scratch by instantiating and creating an AlCurve, and then by instantiating and creating an AlCurveNode (using the AlCurve as a parameter).
There are two ways to delete an AlCurveNode. If the AlCurveNode delete_object() method is called, then the node’s AlCurve is also deleted. If the AlCurve.delete_object() method is called, then its associated AlCurveNode is also deleted.
- copy_wrapper(self: alias_api.AlCurveNode) alias_api.AlObject
Return an exact duplicate of this AlCurveNode wrapper.
- create(self: alias_api.AlCurveNode, curve: alias_api.AlCurve) int
Allocate the dag node for this object and attach it to the given AlCurve ‘curve’.
This method should only be called once for any AlCurve. It is an error to this method twice or if the object has been read in from a wire file.
- Parameters
curve (AlCurve) – The curve to create the curve node from.
- Returns
The status code from performing the operation AlStatusCode.Success - successful AlStatusCode.InvalidArgument - the new curve was invalid or None AlStatusCode.AlreadyCreated - the curve was already created elsewhere AlStatusCode.InsufficientMemory - if not enough memory available
- Return type
statusCode
- curve(*args, **kwargs)
Overloaded function.
curve(self: alias_api.AlCurveNode) -> alias_api.AlCurve
Return the curve data structure which can be used to acces the geometry of the curve.
curve(self: alias_api.AlCurveNode, tm: alias_api.AlTM) -> alias_api.AlCurve
Return the curve data structure which can be used to acces the geometry of the curve.
The AlTM ‘tm’ will be updated with the curve node’s transformation matrix, if a curve exists.
- delete_object(self: alias_api.AlCurveNode) int
Delete the AlCurveNode from the Alias Universe and return the status of the performed operation.
- join(self: alias_api.AlCurveNode, curve_node: alias_api.AlCurveNode) alias_api.AlCurveNodeJoinErrors
Join the passed in curve node’s curve to the end of this curve, if the end is coincident with the beginning of the curve node’s curve.
This is most useful when using curves with attributes.
Warning: this operator will remove this curve’s CVs from all clusters and sets but not the curve node that is passed in. This means that all AlClusterMembers’ and AlSetMembers’ of this curves CVs will no longer be valid after a join. Further all AlCurveCVs and attribteus on ‘this’ AlCurve will have been deleted and regenerated (the passed curve is unchanged).
If the return value is etiher AlCurveNodeJoinErrors.Success or AlCurveNodeJoinErrors.Failure then all pointers to this curve’s AlCurveCVs will be invalid.
If the return value is AlCurveNodeJoinErrors.DuplicateCurve, AlCurveNodeJoinErrors.BadData, AlCurveNodeJoinErrors.NoAttribute, or AlCurveNodeJoinErrors.InvalidKeyPoints the model will not have been modified.
If the return value is AlCurveNodeJoinErrors.BadCluster all AlCurveCVs below this AlCurveNode will have been removed from all sets and clusters and the cluster effects may have been applied to some CVs.
Finally if the return value is AlCurveNodeJoinErrors.Failure all AlCurveCVs below this AlCurveNode will have been removed from all sets and clusters, all AlCurveCVs have been deleted and recreated, existing AlAttributes have been moved to the garbage list and new ones created and a join was attempted but failed, perhaps because the ends of the two curves did not overlap.
- Parameters
curve_node (AlCurveNode) – A curve that will be added to the end of this curve.
- Returns
The status code from performing the operation AlCurveNodeJoinErrors.Success - all OK, the join successed. AlCurveNodeJoinErrors.Failure - the join failed, perhaps because the end points didn’t overlap. AlCurveNodeJoinErrors.BadCluster - failed to remove effect of all clusters. AlCurveNodeJoinErrors.InvalidKeyPoints - one curve may have been a circle. AlCurveNodeJoinErrors.NoAttributes - coudln’t find or create attribteus for a curve. AlCurveNodeJoinErrors.BadData - the model is in an incorrect state. AlCurveNodeJoinErrors.DuplicateCurve - tried joining a curve to itself.
- Return type
- type(self: alias_api.AlCurveNode) alias_api.AlObjectType
Return the AlCurveNode type identifier.