VS:IntersectSurface

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Creates new surface objects that are the intersection of the two referenced surface objects. The original surface objects are not modified. The new objects get "inserted" into the drawing list, after s2, and before the next object after that.

FUNCTION IntersectSurface(
s1 :HANDLE;
s2 :HANDLE) : HANDLE;
def vs.IntersectSurface(s1, s2):
    return HANDLE

Parameters

s1 HANDLE Handle to object.
s2 HANDLE Handle to object.

Return Value

Returns a HANDLE to the new surface object, or to a group containing multiple surface objects.

Example

VectorScript

PROCEDURE Example;
VAR
h1, h2, h3, h4 :HANDLE;
pt :VECTOR;
BEGIN
h1 := NIL;
WHILE h1 = NIL DO BEGIN
Message('Pick the first object...');
GetPt(pt.x, pt.y);
h1 := PickObject(pt.x, pt.y);
END;
h2 := NIL;
WHILE h2 = NIL DO BEGIN
Message('Pick the second object...');
GetPt(pt.x, pt.y);
h2 := PickObject(pt.x, pt.y);
END; 

{Capture the handle of the next object.}
h3 := NextObj(h2);

{Now create the intersection surface(s).}
h4 := IntersectSurface(h1, h2);

{Now find the intersection surface(s).}
WHILE h4 <> h3 DO BEGIN
SetFPat(h4, 3);
h4 := NextObj(h4);
END;
ClrMessage;
END;
RUN(Example);

Python


Version

Availability: from VectorWorks8.5