Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 1.18 KB

File metadata and controls

54 lines (44 loc) · 1.18 KB

Mirror

Description

Reflect an object across an axis.

For a 2D reflection, the axis is a line containing arbitrary point p and extending along vector v.

FUNCTION Mirror(
				h   : HANDLE;
				dup : BOOLEAN;
				p1  : POINT;
				p2  : POINT): HANDLE;
def vs.Mirror(h, dup, p1, p2):
    return HANDLE

Parameters

Name Type Description
h HANDLE The object to reflect
dup BOOLEAN If false, transform the original object to the new position. If true, create a new object
p1 POINT An arbitrary point on the mirror axis
p2 POINT A second arbitrary point on the mirror axis

Remarks

(_c_, 2019.11.09) This doesn't support Groups and is unpredictable on 3D objects

Examples

resultH := Mirror(h, TRUE, 1, 2);
import vs

# Reflect an object across an axis.
h = vs.FSActLayer()  # handle to the first selected object on the active layer
dup = True
p1 = (0, 0)
p2 = (2, 2)

objHandle = vs.Mirror(h, dup, p1, p2)
if objHandle is not None:
    vs.Message('Created object handle: ' + str(objHandle))

Version

Availability: from Vectorworks 2017

Category