Skip to content

Add preextrusion_ops and cavity etch regression test#169

Draft
hughcars wants to merge 1 commit intomainfrom
hughcars/cavity-fragment-fix
Draft

Add preextrusion_ops and cavity etch regression test#169
hughcars wants to merge 1 commit intomainfrom
hughcars/cavity-fragment-fix

Conversation

@hughcars
Copy link
Contributor

Summary

  • Adds preextrusion_ops keyword to SolidModelTarget for operations that must
    run before layer extrusions (e.g., 2D metal patterning that would otherwise be
    destroyed by OCC's recursive deletion when 3D extrusions are consumed by boolean ops)
  • Adds a cavity etch solidmodel test exercising substrate/cavity/vacuum domain
    decomposition with overlapping 2D surfaces extruded to different depths

The postrender pipeline order is now:
preextrusion_ops → extrusion_ops → postrender_ops → intersection_ops

Cavity etch test

The new test creates a geometry with three concentric rectangles (cavity, metal_negative,
chip_area/simulated_area), extrudes them into volumes at different heights, performs boolean
domain decomposition (substrate = chip - cavity, vacuum = sim - substrate), then verifies
physical groups exist and 3D meshing succeeds.

This test currently requires a patched Gmsh 4.15.0 to pass. Stock 4.15.0 produces
PLC mesh errors due to two bugs in booleanOperator's preserve-numbering path:

  1. Ascending-dim unbind order leaves stale face bindings when parent volumes block _unbind
  2. Entity map uses stale integer tags instead of shape identity for unmodified entities

A patch for GModelIO_OCC.cpp has been prepared against Gmsh master and will be submitted
upstream. Once a patched gmsh_jll is available (via Yggdrasil), this test will pass in CI.

Test plan

  • Full test suite passes with patched Gmsh 4.15.0 (5425 pass, 1 Aqua stale deps)
  • Full test suite passes with patched Gmsh 5.0.0 master
  • Cavity etch test fails on stock Gmsh 4.15.0 (PLC Error crash) — confirms the test catches the bug
  • preextrusion_ops=[] default is backward-compatible — no existing behavior changes

Add a preextrusion_ops field to SolidModelTarget that allows operations
(e.g., 2D metal patterning) to run before layer extrusions. This prevents
OCC recursive deletion from cascading across dimensions when 3D boolean
operations consume surfaces that were shared with 2D groups.

Pipeline order is now:
  preextrusion_ops → extrusion_ops → postrender_ops → intersection_ops

Also adds a "Cavity Etch" test that exercises the substrate/cavity/vacuum
domain decomposition workflow with overlapping 2D surfaces extruded to
different depths, boolean cuts, and 3D meshing.
@hughcars hughcars marked this pull request as draft March 10, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant