evCreate API 5.7 Help

TranslatePart Function

Translates given parts of a 3D model edited in an active 3D editing session by a given translation offset vector.

TranslatePart( parts: [[[EvItem|canvas-envision-document-items.html#part-items]]][], by: [[[EvVector3D|evvector3d-type-alias.html]]], locally: boolean ): 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 translated by the given translation offset vector.

by: EvVector3D

An EvVector3D object, the 3D coordinates of a given translation offset vector that defines the offset by which the given parts should be translated.

locally: boolean

A Boolean, a flag to specify how to translate multiple given parts:

  • true: each given part separately in the local coordinate system of that part.

  • false: all given parts together as a group in the coordinate system of this group.

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 translated by the given translation offset vector.

Discussion

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

25 April 2025