Solid Models

A Schematic can be rendered to a SolidModel, creating a 3D geometry corresponding to the schematic, which can then be exported to a standard 3D format. This is analogous to rendering the Schematic to a Cell in preparation for GDS export.

DeviceLayout.render!Method
render!(sm::SolidModel, sch::Schematic, target::Target; strict=:error, kwargs...)

Render sch to sm, using rendering settings from target.

The strict keyword should be :error, :warn, or :no.

The strict=:error keyword option causes render! to throw an error if any errors were logged while building component geometries or while rendering geometries to cs. This is enabled by default, but can be disabled with strict=:no, in which case any component which was not successfully built will have an empty geometry, and any non-fatal rendering errors will be ignored as usual. Using strict=:no is recommended only for debugging purposes.

The strict=:warn keyword option causes render! to throw an error if any warnings were logged. This is disabled by default. Using strict=:warn is suggested for use in automated pipelines, where warnings may require human review.

Additional keyword arguments may be used for certain entity types for controlling how geometry entities are converted to primitives and added to sm.

source

We use a SolidModelTarget to specify how a 2D geometry is rendered to 3D entities and physical groups. This is analogous to the use of a LayoutTarget in Cell rendering, which specifies how to render entities with semantic metadata to Cell polygons and GDS layers.

DeviceLayout.SchematicDrivenLayout.SolidModelTargetType
struct SolidModelTarget <: Target
    technology::ProcessTechnology
    bounding_layers::Vector{Symbol}
    levelwise_layers::Vector{Symbol}
    indexed_layers::Vector{Symbol}
    substrate_layers::Vector{Symbol}
    rendering_options::NamedTuple
    postrenderer
end

Contains information about how to render a Schematic to a 3D SolidModel.

The technology contains parameters like layer heights and thicknesses that are used to position and extrude 2D geometry elements.

The rendering_options include any keyword arguments to be passed down to the lower-level render!(::SolidModel, ::CoordinateSystem; kwargs...). The target also includes some 3D-specific options:

  • bounding_layers: A list of layer Symbols. These layers are extruded according to technology to define the rendered volume, and then all other layers and technology-based extrusions are replaced with their intersection with the rendered volume.
  • levelwise_layers: A list of layer Symbols to be turned into PhysicalGroups "levelwise". That is, rather than create a single PhysicalGroup for all entities with the given layer symbol, a group is created for each level value l with "_L$l" appended.
  • indexed_layers: A list of layer Symbols to be turned into separate PhysicalGroups with "_$i" appended for each index i. These layers will be automatically indexed if not already present in a Schematic's index_dict.
  • substrate_layers: A list of layer Symbols for layers that are extruded by their technology into the substrate, rather than away from it.

The postrenderer is a list of geometry kernel commands that create new named groups of entities from other groups, for example by geometric Boolean operations like intersection. These follow the extrusions and bounding_layers intersections generated according to the technology and rendering_options.

source

Rendering using the SolidModelTarget applies the rendering option solidmodel=true. A pair of functions are provided for designating entities to be rendered or not based on that option (using DeviceLayout.OptionalStyle):

DeviceLayout.SchematicDrivenLayout.not_solidmodelFunction
not_solidmodel(ent::GeometryEntity)

Return a version of ent that is rendered unless solidmodel=true in the rendering options.

The solidmodel option can be set as a keyword argument to render! or as an element in rendering_options in the Target provided to render!.

source
DeviceLayout.SchematicDrivenLayout.only_solidmodelFunction
only_solidmodel(ent::GeometryEntity)

Return a GeometryEntity that is rendered if and only if solidmodel=true in the rendering options.

The solidmodel option can be set as a keyword argument to render! or as an element in rendering_options in the Target provided to render!.

source