Skip to content

ConstructiveSolid

ConstructiveSolid(operand1, operand2, operation, medium=None)

Constructive geometry based on combinations of solids.

Args

Note

Solid structures can also be combined directly using the same operators in expressions.

Example

>>> medium = td.Medium(permittivity=2.0)
>>> block = pf.Extruded(
... medium, pf.Rectangle((0, 0), (10, 8)), (0, 2)
... )
>>> cylinder = pf.Extruded(medium, pf.Circle(4.5), (1, 2))
>>> solid = block - cylinder
MethodDescription
copyCreate a copy of this 3D structure.
to_tidy3dCreate a Tidy3D structure from this 3D structure.

copy(self, deep=False)

Create a copy of this 3D structure.

Args

  • deep (bool): If set, creates copies of any internal structures. Otherwise, a shallow copy of this solid is created.

Returns

ConstructiveSolid: New copy.

to_tidy3d(self)

Create a Tidy3D structure from this 3D structure.

Returns

tidy3d.Structure: Tidy3D structure.

AttributeDescription
mediumMediumType: ConstructiveSolid solid medium.
operand1list[Extruded | Polyhedron | ConstructiveSolid]: First operand for this solid.
operand2list[Extruded | Polyhedron | ConstructiveSolid]: Second operand for this solid.
operationLiteral[”+”, ”*”, ”-”, ”^”]: Constructive solid operation.
propertiesProperties: Object properties.

MediumType: ConstructiveSolid solid medium.

list[Extruded | Polyhedron | ConstructiveSolid]: First operand for this solid.

list[Extruded | Polyhedron | ConstructiveSolid]: Second operand for this solid.

Literal[”+”, ”*”, ”-”, ”^”]: Constructive solid operation.

Properties: Object properties.