Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Adding Objects

addpoly

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Adds a polygon primitive to the simulation environment.  The polygon object defines a polygon in the XY plane using a set of x, y coordinates (vertices) and then extrudes it in the Z direction to create a 3D geometry.

 

Supported Product: FDTD, MODE, DEVICE

 

Syntax

Description

addpoly;

Adds a polygon primitive to the simulation environment.

This function does not return any data.

 

Example

The following script creates a 2D matrix to store the vertices of a polygon and uses it to create a polygon primitive.

vtx = [1,0;2,2;4,2;4,1;3,1]*1e-6;  # microns

addpoly;

set("name","random_polygon");

set("vertices",vtx);

set("z span",2e-6);

 

See Also

Adding Objects, set

Copyright Lumerical Inc. | Privacy | Site Map