Add polygon region examples and python-script-writer agent docs#135
Closed
Copilot wants to merge 5 commits intonext-major-releasefrom
Closed
Add polygon region examples and python-script-writer agent docs#135Copilot wants to merge 5 commits intonext-major-releasefrom
Copilot wants to merge 5 commits intonext-major-releasefrom
Conversation
Co-authored-by: magnesj <1793152+magnesj@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add polygon definitions and grid filters
Add polygon-based grid region example to Python API docs
Mar 5, 2026
…ygons Co-authored-by: magnesj <1793152+magnesj@users.noreply.github.com>
Copilot
AI
changed the title
Add polygon-based grid region example to Python API docs
Add Python examples for polygon-based grid region assignment
Mar 5, 2026
Co-authored-by: magnesj <1793152+magnesj@users.noreply.github.com>
Copilot
AI
changed the title
Add Python examples for polygon-based grid region assignment
Add polygon region examples and python-script-writer agent docs
Mar 5, 2026
Updates the agent to prioritize using tools for discovering and reading existing examples in the repository instead of relying on embedded code snippets. Reorganizes instructions into tables for better readability and updates API reference URLs to include the development branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two new
ripsworkflow examples for polygon-based grid region assignment, plus an agent instruction document to guide future Python script authoring.New examples
polygon_grid_region.py— creates N polygons programmatically from bounding-box coordinates, adds them to the project'sPolygonCollection, then writes aGENERATEDpropertyPOLYGON_REGIONassigning each active cell a 1-based region index via 2D ray-casting.polygon_region_from_project.py— reads polygons already present in the project and applies the same region-assignment logic:Both examples are wired into
PythonExamples_case_and_grid_operations.rst.Agent instructions
agents/python-script-writer.md— describes script skeleton, error-guard conventions, polygon patterns (create vs. read), cell property I/O,descendants()navigation, and style rules. Referenceshttps://api.resinsight.orgthroughout.CLAUDE.md— updated to advertise the new agent alongside the existingdocs-writer.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.