Skip to content

Commit c5e06ca

Browse files
authored
Merge pull request #681 from David-GERARD/main
feat(meshwell): check if mesh order is defined in LayerLevel.info
2 parents 156a560 + 53ad883 commit c5e06ca

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

gplugins/meshwell/get_meshwell_cross_section.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,17 @@ def get_meshwell_cross_section(
131131
else:
132132
raise ValueError("name_by must be 'layer' or 'material'")
133133

134+
# Determine mesh order (use layer info if available, otherwise default to layer level mesh order)
135+
if layer_level.info is not None and "mesh_order" in layer_level.info:
136+
# cspdk LayerStack has the mesh_order in the info dict, override default mesh_order if specified there
137+
mesh_order = layer_level.info["mesh_order"]
138+
else:
139+
mesh_order = layer_level.mesh_order
140+
134141
surface = PolySurface(
135142
polygons=cross_section_polygons,
136143
physical_name=physical_name,
137-
mesh_order=layer_level.mesh_order,
144+
mesh_order=mesh_order,
138145
mesh_bool=True,
139146
additive=False
140147
)

0 commit comments

Comments
 (0)