70002317 CmdMirror to have an option to keep source objects

Article 70002317
Type Wish
Product WebJS
Version 1002
Date Added 3/1/2023 12:00:00 AM
Fixed 10.1003.0.2 (3/1/2023 12:00:00 AM)
Submitted by Dariusz Johanik

Summary

CmdMirror to have an option to keep source objects

Solution

In version 1003.0.2 an additional parameter keepsource added to the CmdMirror method of vdrawcanvas

 CmdMirror(object entities, object axisPoint, double axisAngle, CmdScriptCallback scriptCallBack = null, bool keepsource = false)
summary:                                 Mirror an array of vdraw entities around a 2d axis.

param name="entities":          An array of vdraw entities or null so the user can pick the objects on screen.
param name="axisPoint":         A point object in World coordinates or null so the user can pick this point on screen. This point will be used as the mirro axis base point.
param name="axisAngle":         The angle (in radians) defines the direction of the mirror axis or null in order for the user to select it on screen.
param name="scriptCallBack":   Optional.A delegate of  type to be fired when the user action finish
param name="keepsource":       Optional.If it is true the command keep the source objects and mirror a copy of them


Also
with the following example mirror thew user selected objects relative to a user selected axis and keepthe source objects
 vdcanvas.scriptCommand.select(null, function (vdcanvas) { vdcanvas.scriptCommand.mirror(undefined, undefined, undefined,true); });
-or-
with out keep source objects
 vdcanvas.scriptCommand.select(null, function (vdcanvas) { vdcanvas.scriptCommand.mirror(); });

Send comments on this topic.