Assembly groups allow to build complex structures, such as metalenses for instance, that are made of a large number of copies of the same set of objects.
[[Note:]] assembly groups have been introduced with the 2024 R1 release.
Elements of an assembly group
An assembly group consists of:
- a prototype
- a list of parameters
- a mapping table
Prototype
The prototype is the single, in-tree, child of the assembly group. It can be a primitive object or a structure group. It is the reference object that is used to build the assembly.
Parameters
Parameters are stored in a cell array. It corresponds to the list of parameters of the prototype that are used to build the assembly group.
params = {"x", "y", "radius"};
Mapping table
The mapping table is a matrix of (number parameters) x (number of copies) elements, storing the values of parameters for each copy of the prototype.
Creating an assembly group
Assembly groups can be added to the simulation from the tool bar, in the "Groups" menu
or using the addassemblygroup - Script command:
addassemblygroup({"name": "assembly_grp"});
In a similar way, the prototype can be added to the assembly group either using the user interface, by right-clicking on the object and select "add to group"
or by selecting the object and using addtogroup - Script command
addtogroup("::model::assembly_grp");
You can then set the parameters and the mapping table using scripting:
mapping = [0, 2, 0, 1;
0, 0, 2, 1;
1, 0.5, 0.5, 1]*1e-6;
setnamed("assembly_grp", "parameters", params);
setnamed("assembly_grp", "mapping", mapping);
This will create an assembly group made of 4 objects.
In the assembly group property window, the "Info / Error" tab will provide some information on the assembly:
- parameters
- list of parameters
- number of parameters
- mapping
- total number of objects
- number of unique variations
For instance, here the assembly is made of 4 objects, but only 2 unique variations (radius of 1um and 0.5um).
[[Notes]]:
- the assembly group can only handle a maximum of 1024 unique variations.
- If the assembly contains more than 32000 objects, the structure won't be displayed.
See also
Structures, Analysis groups, Arrays of objects, addstructuregroup (script command).