paraview-interface-python-script-structure-paraviewsimple
Sub-skill of paraview-interface: Python Script Structure (paraview.simple) (+5).
Best use case
paraview-interface-python-script-structure-paraviewsimple is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of paraview-interface: Python Script Structure (paraview.simple) (+5).
Teams using paraview-interface-python-script-structure-paraviewsimple should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/python-script-structure-paraviewsimple/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How paraview-interface-python-script-structure-paraviewsimple Compares
| Feature / Agent | paraview-interface-python-script-structure-paraviewsimple | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of paraview-interface: Python Script Structure (paraview.simple) (+5).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Python Script Structure (paraview.simple) (+5)
## Python Script Structure (paraview.simple)
```python
from paraview.simple import *
# Disable automatic rendering for batch performance
paraview.simple._DisableFirstRenderCameraReset()
# Load data source
reader = OpenFOAMReader(registrationName='case', FileName='case.foam')
reader.MeshRegions = ['internalMesh']
reader.CellArrays = ['U', 'p']
# Set time step
animationScene = GetAnimationScene()
animationScene.UpdateAnimationUsingDataTimeSteps()
animationScene.AnimationTime = reader.TimestepValues[-1] # Last time step
# Create render view
renderView = GetActiveViewOrCreate('RenderView')
renderView.ViewSize = [1920, 1080]
```
## Loading Different Data Formats
| Format | Reader | Key Parameters |
|--------|--------|----------------|
| OpenFOAM | `OpenFOAMReader(FileName='case.foam')` | `MeshRegions`, `CellArrays`, `SkipZeroTime` |
| VTK | `LegacyVTKReader(FileNames=['file.vtk'])` | Direct read |
| VTU | `XMLUnstructuredGridReader(FileName=['file.vtu'])` | Direct read |
| CSV | `CSVReader(FileName=['data.csv'])` | `HaveHeaders`, `DetectNumericColumns` |
| EnSight | `EnSightReader(CaseFileName='file.case')` | `PointArrays` |
| STL | `STLReader(FileNames=['mesh.stl'])` | Surface only |
## OpenFOAM .foam File
Create a `.foam` trigger file in the case directory:
```bash
# Empty file triggers OpenFOAM reader
touch /path/to/case/case.foam
```
## Color Map Configuration
```python
def setup_color_map(display, array_name, component=None, preset='Cool to Warm'):
"""Configure color mapping for a display."""
ColorBy(display, ('POINTS', array_name, component) if component else ('POINTS', array_name))
color_tf = GetColorTransferFunction(array_name)
opacity_tf = GetOpacityTransferFunction(array_name)
# Apply preset
color_tf.ApplyPreset(preset, True)
# Auto-rescale to data range
color_tf.RescaleTransferFunction(*display.RescaleTransferFunctionToDataRange(True))
# Show color bar
display.SetScalarBarVisibility(GetActiveView(), True)
return color_tf
```
## Common Color Map Presets
| Preset | Use Case |
|--------|----------|
| `Cool to Warm` | Diverging data (pressure, temperature) |
| `Viridis (matplotlib)` | Sequential data (velocity magnitude) |
| `Rainbow Uniform` | General purpose |
| `Blue to Red Rainbow` | Temperature fields |
| `Jet` | Legacy CFD visualization |
| `Black-Body Radiation` | Heat transfer |
## Camera Setup
```python
def set_camera(view, position, focal_point, up=(0, 0, 1)):
"""Set camera position and orientation."""
view.CameraPosition = position
view.CameraFocalPoint = focal_point
view.CameraViewUp = up
view.CameraParallelScale = 1.0
Render()
def set_isometric_view(view):
"""Standard isometric engineering view."""
view.ResetCamera()
view.CameraPosition = [1, 1, 1]
view.CameraFocalPoint = [0, 0, 0]
view.CameraViewUp = [0, 0, 1]
view.ResetCamera()
Render()
```Related Skills
repo-structure
Canonical source layout, test mirroring, root cleanliness, gitignore, docs classification, and committed artifact rules for all workspace-hub tier-1 repos. Consult before creating directories or files in any submodule.
python-import-path-mismatch-debugging
Diagnose and fix ModuleNotFoundError when a package is installed but imports still fail due to environment/path mismatches
python-import-path-debugging
Diagnose ModuleNotFoundError when a package is installed but still fails to import
github-issue-structure-for-personal-finance-tracking
Pattern for organizing financial analysis work across multiple repos (data/config vs. logic separation)
python-debugpy
Debug Python: pdb REPL + debugpy remote (DAP).
blender-interface
AI interface skill for Blender 3D — headless CLI execution, Python bpy API, mesh import/export, rendering, and integration with engineering analysis workflows.
webhook-subscriptions
Create and manage webhook subscriptions for event-driven agent activation. Use when the user wants external services to trigger agent runs automatically.
python-project-template
Generate standardized Python project structure with pyproject.toml, UV environment, pytest configuration, and workspace-hub compliance. Creates production-ready project scaffolding.
shell-script-hardening-patterns
Harden Bash automation scripts with TDD-first static and behavioral checks, safe Python invocation via uv, locking, persistent state, and review-driven correction loops.
xlsx-to-python
Convert Excel calculation spreadsheets to Python code — extract formulas, build dependency graphs, generate pytest tests using cell values as assertions, and produce dark-intelligence archive YAMLs.
excel-workbook-to-python-v2
Convert engineering Excel workbooks to Python code using Codex Desktop cowork on Windows. Proven superior quality vs Linux openpyxl extraction (24 vs 7 functions, 81 vs 53 tests). Validated on Ballymore jumper installation analysis.
repo-cleanup-structure-section-updates
Sub-skill of repo-cleanup: Structure Section Updates (+1).