ConstructiveSolid
ConstructiveSolid(operand1, operand2, operation, medium=None)Constructive geometry based on combinations of solids.
Args
- operand1 (Extruded | Polyhedron | ConstructiveSolid | Iterable[Extruded | Polyhedron | ConstructiveSolid]): First operand for this solid operation. The union is used in case of multiple objects.
- operand2 (Extruded | Polyhedron | ConstructiveSolid | Iterable[Extruded | Polyhedron | ConstructiveSolid]): Second operand for this solid operation. The union is used in case of multiple objects.
- operation (Literal[”+”, "", ”-”, ”^”]): One of ”+” (union), "" (intersection), ”-” (difference), or ”^” (symmetric difference).
- medium (MediumType): Tidy3D medium used in this structure. If unset, the medium from the first operand will be used.
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 - cylinderMethods
Section titled “Methods”| Method | Description |
|---|---|
copy | Create a copy of this 3D structure. |
to_tidy3d | Create 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
Section titled “to_tidy3d”to_tidy3d(self)Create a Tidy3D structure from this 3D structure.
Returns
tidy3d.Structure: Tidy3D structure.
Attributes
Section titled “Attributes”| Attribute | Description |
|---|---|
medium | MediumType: ConstructiveSolid solid medium. |
operand1 | list[Extruded | Polyhedron | ConstructiveSolid]: First operand for this solid. |
operand2 | list[Extruded | Polyhedron | ConstructiveSolid]: Second operand for this solid. |
operation | Literal[”+”, ”*”, ”-”, ”^”]: Constructive solid operation. |
properties | Properties: Object properties. |
medium
Section titled “medium”MediumType: ConstructiveSolid solid medium.
operand1
Section titled “operand1”list[Extruded | Polyhedron | ConstructiveSolid]: First operand for this solid.
operand2
Section titled “operand2”list[Extruded | Polyhedron | ConstructiveSolid]: Second operand for this solid.
operation
Section titled “operation”Literal[”+”, ”*”, ”-”, ”^”]: Constructive solid operation.
properties
Section titled “properties”Properties: Object properties.