@@ -23,6 +23,7 @@ def get_mesh(
23
23
type : str ,
24
24
layer_stack : LayerStack ,
25
25
layer_physical_map : dict | None = None ,
26
+ layer_meshbool_map : dict | None = None ,
26
27
z : float | None = None ,
27
28
xsection_bounds = None ,
28
29
wafer_padding : float = 0.0 ,
@@ -37,6 +38,7 @@ def get_mesh(
37
38
type: one of "xy", "uz", or "3D". Determines the type of mesh to return.
38
39
layer_stack: LayerStack object containing layer information.
39
40
layer_physical_map: by default, physical are tagged with layername; this dict allows you to specify custom mappings.
41
+ layer_meshbool_map: by default, all polygons on layer_stack layers are meshed; this dict allows you set True of False to the meshing of given layers.
40
42
z: used to define z-slice for xy meshing.
41
43
xsection_bounds: used to define in-plane line for uz meshing.
42
44
wafer_padding: padding beyond bbox to add to WAFER layers.
@@ -85,6 +87,16 @@ def get_mesh(
85
87
if layer_name not in layer_physical_map .keys ():
86
88
layer_physical_map [layer_name ] = layer_name
87
89
90
+ # Default meshing flags (all True)
91
+ if layer_meshbool_map is None :
92
+ layer_meshbool_map = {}
93
+ for layer_name in layer_stack .layers .keys ():
94
+ layer_meshbool_map [layer_name ] = True
95
+ else :
96
+ for layer_name in layer_stack .layers .keys ():
97
+ if layer_name not in layer_physical_map .keys ():
98
+ layer_meshbool_map [layer_name ] = True
99
+
88
100
if type == "xy" :
89
101
if z is None :
90
102
raise ValueError (
0 commit comments