How to draw a (truncated) cone in DEVICE using the 'planar solid' object



The DEVICE solver currently do not have an object library like the optical solvers which can be a limitation if you are trying to add a complex structure in your design, for example a truncated cone. Good news is that by using the planar solid structure, it is very easy to create complex geometries like a truncated cone using the script environment.

The planar solid object is a very powerful tool to create arbitrary geometries. Lumerical’s knowledge base has documented the properties of this object in this page Structures - planar solid. The vertices of the planar solid object can be edited using script commands by two method, (i) specifying the vertices as a cell array or (ii) specifying the vertices as a matrix. Detailed examples of both approaches are documented in this other knowledge base page Planar solid - scripting example.

In this post, I am sharing a script file that can be used to create a truncated cone in DEVICE. The curved surface of the cone is broken up in multiple rectangular segments (see figure below). This helps us identify all the vertices needed to create the surfaces (top and bottom surfaces and the rectangular faces on the curved surface). The script takes the radius (in micron) of the top and bottom surfaces and the height of the cone as input parameters. It also takes the number of segments as an input. The larger the number of segments, the smoother the curved surface will become. The script can also be used to create a cone (not truncated). To do that, simply choose one of the radius values to be very small (say, 1e-3 micron or less).

planar_solid_example_truncated_cone.lsf (2.0 KB)

Custom complex geometry script
Creating custom structure for FDTD simulation
Create a rounded tip cone using planar solid for DEVICE
Custom complex geometry script
Modeling optothermal forces
Help with scripted structure - facets not appearing (due to holes?)
Radial doping of cone structure
Simulation of optical fiber cleaved with an angle

when i run it in Lumerical device it gives me this massege error “D(process 0): PLC Build: Mismatch between number of faces when searching for duplicates”


This error message indicates the solver is having an issue with building the geometry. Try following the steps suggested in this KX post (Geometry building issue in 3D simulation for DEVICE), specially the first one.


it didn’t work
i will share my file with you
my design is a cylinder on truncated cone


Hi @ahisham. Sorry about the late reply. I am attending IPR 2016 this week so could not get back to you earlier. I did look at your file on Monday but could not find a way to make it work.

UPDATE: I was able to make the structure mesh with overlaps and by changing the mesh order to ensure the final structure remains correct. I will email you the modified file since the file size is too large.


hi, if i want to make a structure group based on this cone, how do i introduce this structure into that group.


Hi, xtian,

you may add the following to your script




Thanks for the reply!It works!


引用 Shihwen KXC Chen


Hii Aalam
How can make hollow cone with thickness 200nm (say)? I am trying to produce cone with inner radius 100nm and outer radius is 300nm.
Can please help me?


Hi @chandras, you can simply create two cones, one with a radius of 100 nm and another with a radius of 300 nm. Then fill up the smaller cone with whatever cladding material you have inside the hollowed cone, place it inside the larger cone, and use a mesh order smaller than the larger cone so that it cuts out from it to create a hollowed cone.


Thanks aalam this is very helpful. This works for me. But i really want to create hollow cone structure by a script code. Can you please help me for the script code.
Thanks in advance and it will be very helpful.
Thanks again.


Just create a script for two cones with different diameter and set the material of the inner cone to etch. The syntax should be same as for one cone but with double set of parameters for two cones.