Skip to content

Bound plot3D isosurfaces for grayscale structures - #3318

Open
CAOShurong wants to merge 1 commit into
NanoComp:masterfrom
CAOShurong:codex/3317-bound-plot3d-isosurfaces
Open

CAOShurong wants to merge 1 commit into
NanoComp:masterfrom
CAOShurong:codex/3317-bound-plot3d-isosurfaces

Conversation

@CAOShurong

Copy link
Copy Markdown

Summary

  • add a public nlevels argument to Simulation.plot3D for both the native and HTML backends
  • default to at most 10 evenly distributed non-background permittivity levels while preserving all levels when fewer are present
  • reject non-positive or non-integral limits and document the bounded behavior
  • add regression coverage for the default cap, explicit limits, background exclusion, validation, and HTML-backend forwarding

Testing

  • base reproduction: a 12-level grayscale grid generated 11 non-background isosurfaces
  • committed-source marching-cubes probe: default generated 10 surfaces; nlevels=3 generated levels 2, 7, and 12
  • focused test_plot3D_nlevels execution and HTML dispatch probe
  • pre-commit hooks for all four changed files
  • python -m compileall for the changed Python sources and test
  • python -m mkdocs build --strict -f mkdocs.yml
  • git diff --check

Closes #3317

Disclosure: This contribution was developed with OpenAI Codex assistance. I reviewed the implementation and regression coverage.

Signed-off-by: CAOShurong <170531907+CAOShurong@users.noreply.github.com>

@oskooi oskooi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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.

add nlevels argument to plot3d to bound the number of isosurfaces

2 participants