UnitCell

A unit cell.

Example

application = cf.Application.GetInstance()
project = application:NewProject()

-- Create a ring shape

ringShape = project.Definitions.PeriodicStructures.Shapes:AddRing(1.0, 0.9)

-- Create a unit cell

properties = cf.UnitCell.GetDefaultProperties()
properties.Layers[1].Method = cf.Enums.UnitCellLayerMethodTypeEnum.Aperture
properties.Layers[1].Shape = ringShape
properties.Layers[1].Rotation = "0.0"
unitCell = project.Definitions.PeriodicStructures.UnitCells:AddUnitCell(properties)

-- Build geometry, for the unit cell, with PBC

unitCellGeometry = unitCell:BuildGeometry(true)

Inheritance

The UnitCell object is derived from the Object object.

Usage locations

The UnitCell object can be accessed from the following locations:

Property List

DistanceU
The length along the U side of the unit cell. (Read/Write ParametricExpression)
DistanceV
The length along the V side of the unit cell. (Read/Write ParametricExpression)
Label
The object label. (Read/Write string)
Layers
The collection of layers that make up the unit cell definition. (Read/Write UnitCellLayerList)
ReferenceVector
Swap the unit cell direction between U and V vectors. (Read/Write UnitCellReferenceVectorEnum)
SkewAngle
The angle between the reference vector and the unit cell. (Read/Write ParametricExpression)
Type
The object type string. (Read only string)
ZValue
The Z value at the top of layer 1. (Read/Write ParametricExpression)

Method List

BuildGeometry (setpbc boolean)
Creates the full geometry representation of the unit cell. (Returns a Geometry object.)
Delete ()
Deletes the entity.
Duplicate ()
Duplicates the entity. (Returns a Object object.)
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
SetProperties (properties Object)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.

Static Function List

GetDefaultProperties ()
Creates a table containing the default settings to create an object. (Returns a table object.)

Property Details

DistanceU
The length along the U side of the unit cell.
Type
ParametricExpression
Access
Read/Write
DistanceV
The length along the V side of the unit cell.
Type
ParametricExpression
Access
Read/Write
Label
The object label.
Type
string
Access
Read/Write
Layers
The collection of layers that make up the unit cell definition.
Type
UnitCellLayerList
Access
Read/Write
ReferenceVector
Swap the unit cell direction between U and V vectors.
Type
UnitCellReferenceVectorEnum
Access
Read/Write
SkewAngle
The angle between the reference vector and the unit cell.
Type
ParametricExpression
Access
Read/Write
Type
The object type string.
Type
string
Access
Read only
ZValue
The Z value at the top of layer 1.
Type
ParametricExpression
Access
Read/Write

Method Details

BuildGeometry (setpbc boolean)
Creates the full geometry representation of the unit cell.
Input Parameters
setpbc(boolean)
Sets the Periodic Boundary Condition if set to true.
Return
Geometry
The geometry built.
Delete ()
Deletes the entity.
Duplicate ()
Duplicates the entity.
Return
Object
The new (duplicated) entity.
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
Return
table
A table defining the properties.
SetProperties (properties Object)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
Input Parameters
properties(Object)
A table of properties defining the new state of the object.

Static Function Details

GetDefaultProperties ()
Creates a table containing the default settings to create an object.
Return
table
A table containing the default properties.