evCreate API 5.7 Help

RotatePart Function

Rotates given parts of a 3D model edited in an active 3D editing session around a given pivot point, along a given axis, by a given angle.

RotatePart( parts: [[[EvItem|canvas-envision-document-items.html#part-items]]][], pivot: [[[EvCoord3D|evcoord3d-type-alias.html]]], axis: [[[EvVector3D|evvector3d-type-alias.html]]], angle: number ): Promise<void>

Parameters

parts: EvItem[]

An array of Part item objects, one or more given parts of a 3D model currently edited in an active 3D editing session that should be rotated around the given pivot point, along the given axis, by the given angle.

pivot: EvCoord3D

An EvCoord3D object, the 3D coordinates of a given pivot point (rotation center) around which the given parts should be rotated.

axis: EvVector3D

An EvVector3D object, the 3D coordinates of a given vector that is normalized to a unit vector that defines the direction of an axis passing through the given pivot point along which the given parts should be rotated by the given angle.

angle: number

A number, a given angle in degrees by which the given parts should be rotated around the given axis.

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the given parts of the 3D model currently edited in the active 3D editing session have been successfully rotated around the given pivot point, along the given axis, by the given angle.

Discussion

The function will throw an error if the 3D editing mode has not been activated.

25 April 2025