Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Adding Objects

addcustom

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

Adds a custom primitive to the simulation environment.  Custom primitives are objects that are defined by equations describing the boundaries of the physical object.

 

Supported Product: FDTD, MODE

 

Syntax

Description

addcustom;

Adds a custom primitive to the simulation environment.

This function does not return any data.

 

Example

The following script commands will create a half circle with a radius of 0.5 micron in the XY plane and extrude it along the Z axis.

addcustom;

set("create 3D object by","extrusion");

set("equation 1","sqrt("+num2str(0.5)+"^2-(x-"+num2str(0.5)+")^2)");   #  y = sqrt(0.5^2-(x-0.5)^2)

set("x span",1e-6);

set("y span",1e-6);

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

 

The same equation can be used to create half a sphere by rotating the half circle rather than extruding it.

addcustom;

set("create 3D object by","revolution");

set("equation 1","sqrt("+num2str(0.5)+"^2-(x-"+num2str(0.5)+")^2)");   #  y = sqrt(0.5^2-(x-0.5)^2)

set("x span",1e-6);

set("y span",1e-6);

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

 

See Also

Adding Objects, set

Copyright Lumerical Inc. | Privacy | Site Map