You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: Make SolidModel ignore NORENDER_META
* Allow GDSMeta mapping to be manually overridden in map_meta_dict
* Allow specification of ignored_layers in SolidModelTarget
* Remove entities by default in remove_group!
* Update CHANGELOG.md
* Add type annotation to _map_layer
Copy file name to clipboardExpand all lines: CHANGELOG.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,16 @@ The format of this changelog is based on
4
4
[Keep a Changelog](https://keepachangelog.com/), and this project adheres to
5
5
[Semantic Versioning](https://semver.org/).
6
6
7
+
## Upcoming
8
+
9
+
- Improved metadata handling for `LayoutTarget` and `SolidModelTarget`
10
+
11
+
+ SolidModelTargets will now ignore `NORENDER_META` (the `:norender` layer)
12
+
+ SolidModelTargets now take `ignored_layers`, a list of layer symbols which are not rendered
13
+
+ LayoutTargets now allow overriding the mapping of `GDSMeta` by setting `target.map_meta_dict[my_gdsmeta] = my_override`, allowing changes to different `GDSMeta` or `nothing` rather than always mapping a `GDSMeta` to itself
14
+
15
+
- Changed `remove_group!` SolidModel postrendering operation to use `remove_entities=true` by default, fixing the unexpected and undesired default behavior that only removed the record of the group and not its entities
16
+
7
17
## 1.5.0 (2025-10-10)
8
18
9
19
- Added `auto_speed`, `endpoints_curvature`, and `auto_curvature` keyword options to `bspline!` and `BSplineRouting`
@@ -12,6 +22,7 @@ The format of this changelog is based on
12
22
+ `endpoints_curvature` sets boundary conditions on the curvature (by inserting extra waypoints)
13
23
+ `auto_curvature` B-spline sets curvature at endpoints to match previous segment (or to zero if there is no previous segment)
14
24
+ Both `endpoints_speed` and `endpoints_curvature` can be specified as two-element iterables to set the start and end boundary conditions separately
25
+
15
26
- Added `spec_warnings` keyword option for `save` to allow disabling warnings about cell names violating the GDSII specification (modern tools will accept a broader range of names than strictly allowed by the specification)
16
27
- Added `unfold` method for point arrays to help construct polygons with mirror symmetry
17
28
- Added FAQ entry about MeshSized/OptionalEntity styling on Paths
Copy file name to clipboardExpand all lines: src/schematics/solidmodels.jl
+23Lines changed: 23 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@
5
5
levelwise_layers::Vector{Symbol}
6
6
indexed_layers::Vector{Symbol}
7
7
substrate_layers::Vector{Symbol}
8
+
ignored_layers::Vector{Symbol}
8
9
rendering_options::NamedTuple
9
10
postrenderer
10
11
end
@@ -14,6 +15,18 @@ Contains information about how to render a `Schematic` to a 3D `SolidModel`.
14
15
The `technology` contains parameters like layer heights and thicknesses that are used
15
16
to position and extrude 2D geometry elements.
16
17
18
+
# Metadata Mapping
19
+
20
+
When rendering entities, metadata is mapped to physical group names as follows:
21
+
22
+
1. If `layer(m) == layer(DeviceLayout.NORENDER_META)` (i.e., `:norender`), the entity is skipped and not rendered to the solid model.
23
+
2. If `layer(m)` is in `ignored_layers`, the entity is skipped and not rendered to the solid model.
24
+
3. The base name is taken from `layername(m)`.
25
+
4. If `layer(m)` is in `levelwise_layers`, `"_L\$(level(m))"` is appended.
26
+
5. If `layer(m)` is in `indexed_layers` and `layerindex(m) != 0`, `"_\$(layerindex(m))"` is appended.
27
+
28
+
# Rendering Options
29
+
17
30
The `rendering_options` include any keyword arguments to be passed down to the lower-level
18
31
`render!(::SolidModel, ::CoordinateSystem; kwargs...)`. The target also includes some
19
32
3D-specific options:
@@ -27,6 +40,7 @@ The `rendering_options` include any keyword arguments to be passed down to the l
27
40
- `indexed_layers`: A list of layer `Symbol`s to be turned into separate `PhysicalGroup`s with `"_\$i"` appended for each index `i`. These layers will be automatically indexed if not already present in a `Schematic`'s `index_dict`.
28
41
- `substrate_layers`: A list of layer `Symbol`s for layers that are extruded by their
29
42
`technology` into the substrate, rather than away from it.
43
+
- `ignored_layers`: A list of layer `Symbol`s for layers that should be ignored during rendering (mapped to `nothing`). This provides an alternative to using `NORENDER_META` for layers that should be conditionally ignored in solid model rendering but may be needed for other rendering targets.
30
44
31
45
The `postrenderer` is a list of geometry kernel commands that create new named groups of
32
46
entities from other groups, for example by geometric Boolean operations like intersection.
@@ -213,8 +215,8 @@ that determine how or whether entities with an `OptionalStyle` with the correspo
213
215
214
216
When rendering `ent::GeometryEntity` with `target::LayoutTarget`, its metadata `m` is handled as follows:
215
217
216
-
0. If `m` is already a `GDSMeta`, use as is.
217
-
1. If `target.map_meta_dict[m]` exists (as a `GDSMeta` instance or `nothing`), use that. This can be manually assigned before rendering, overriding the default that would result from the steps below. If it does not yet exist, then the result of the steps below will be stored in `target.map_meta_dict[m]`.
218
+
0. If `target.map_meta_dict[m]` exists (as a `GDSMeta` instance or `nothing`), use that. This can be manually assigned before rendering, overriding the default behavior for any metadata type, including `GDSMeta`. Otherwise, the result of the steps below will be stored in `target.map_meta_dict[m]`.
219
+
1. If `m` is already a `GDSMeta` and not in `map_meta_dict`, use as is.
218
220
2. If `layer(m) == layer(DeviceLayout.NORENDER_META)` (that is, `:norender`), use `nothing`.
219
221
3. If `!(level(m) in target.levels)`, use `nothing`.
220
222
4. If `layer(m)` is not present as a key in `layer_record(target.technology)` and is not of the form `:GDS<layer>_<datatype>`, then emit a warning and use `GDSMeta(0,0)`, ignoring level and layer index.
0 commit comments