gmsh-meshing-initialization-and-model-management
Sub-skill of gmsh-meshing: Initialization and Model Management (+6).
Best use case
gmsh-meshing-initialization-and-model-management is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of gmsh-meshing: Initialization and Model Management (+6).
Teams using gmsh-meshing-initialization-and-model-management 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/initialization-and-model-management/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gmsh-meshing-initialization-and-model-management Compares
| Feature / Agent | gmsh-meshing-initialization-and-model-management | 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 gmsh-meshing: Initialization and Model Management (+6).
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
# Initialization and Model Management (+6)
## Initialization and Model Management
```python
import gmsh
# Initialize
gmsh.initialize()
gmsh.option.setNumber("General.Verbosity", 3)
# Create a new model
gmsh.model.add("my_model")
*See sub-skills for full details.*
## Built-in Kernel (gmsh.model.geo)
```python
# Points
p1 = gmsh.model.geo.addPoint(0, 0, 0, meshSize=1.0)
p2 = gmsh.model.geo.addPoint(10, 0, 0, meshSize=1.0)
p3 = gmsh.model.geo.addPoint(10, 5, 0, meshSize=0.5)
# Lines
l1 = gmsh.model.geo.addLine(p1, p2)
l2 = gmsh.model.geo.addLine(p2, p3)
*See sub-skills for full details.*
## OpenCASCADE Kernel (gmsh.model.occ)
```python
# Box: addBox(x, y, z, dx, dy, dz)
box = gmsh.model.occ.addBox(0, 0, 0, 100, 20, 10)
# Sphere: addSphere(xc, yc, zc, radius)
sphere = gmsh.model.occ.addSphere(0, 0, 0, 5.0)
# Cylinder: addCylinder(x, y, z, dx, dy, dz, r)
cyl = gmsh.model.occ.addCylinder(0, 0, 0, 0, 0, 10, 5.0)
*See sub-skills for full details.*
## Mesh Generation (gmsh.model.mesh)
```python
# Generate mesh
gmsh.model.mesh.generate(1) # 1D
gmsh.model.mesh.generate(2) # 2D surface
gmsh.model.mesh.generate(3) # 3D volume
# Recombine triangles to quads
gmsh.model.mesh.recombine()
# Set transfinite constraints
*See sub-skills for full details.*
## Options (gmsh.option)
```python
# Mesh algorithm selection
gmsh.option.setNumber("Mesh.Algorithm", 6) # Frontal-Delaunay 2D
gmsh.option.setNumber("Mesh.Algorithm3D", 1) # Delaunay 3D
# Size controls
gmsh.option.setNumber("Mesh.MeshSizeFactor", 0.5)
gmsh.option.setNumber("Mesh.MeshSizeMin", 0.1)
gmsh.option.setNumber("Mesh.MeshSizeMax", 2.0)
gmsh.option.setNumber("Mesh.MeshSizeFromCurvature", 12)
*See sub-skills for full details.*
## Mesh Size Fields (gmsh.model.mesh.field)
```python
# Distance field — distance from curves or points
f_dist = gmsh.model.mesh.field.add("Distance")
gmsh.model.mesh.field.setNumbers(f_dist, "CurvesList", [1, 2, 3])
gmsh.model.mesh.field.setNumber(f_dist, "Sampling", 100)
# Threshold field — size based on distance
f_thresh = gmsh.model.mesh.field.add("Threshold")
gmsh.model.mesh.field.setNumber(f_thresh, "InField", f_dist)
gmsh.model.mesh.field.setNumber(f_thresh, "SizeMin", 0.1) # size at DistMin
*See sub-skills for full details.*
## File I/O
```python
# Write mesh
gmsh.write("output.msh") # Default format
gmsh.write("output.stl") # STL
gmsh.write("output.vtk") # VTK
gmsh.write("output.unv") # Universal
gmsh.write("output.bdf") # Nastran
# Write specific format version
gmsh.option.setNumber("Mesh.MshFileVersion", 2.2)
*See sub-skills for full details.*Related Skills
digitalmodel-worktree-test-execution-with-shared-venv
Run digitalmodel tests from isolated worktrees without uv editable-dependency failures by using the main repo's existing virtualenv and PYTHONPATH.
digitalmodel-orcawave-orcaflex-proof-workflows
Class-level digitalmodel OrcaWave/OrcaFlex readiness, semantic-proof, fixture-proof, and closeout workflows.
digitalmodel-code-explorer
Fast orientation guide for the digitalmodel codebase, with module lookup, source-to-test mapping, and targeted inspection patterns to avoid repeated bulk-reading of digitalmodel/src and tests.
digitalmodel-orcawave-orcaflex-workflow
Current-state workflow for navigating and extending digitalmodel OrcaWave/OrcaFlex capabilities across code, tests, issues, queue tooling, and licensed-machine boundaries.
cron-job-management
Patterns for creating, testing, debugging, and maintaining cron-driven automation in workspace-hub, including log strategy, failure analysis, and safe git-aware job design.
segment-anything-model
Foundation model for image segmentation with zero-shot transfer. Use when you need to segment any object in images using points, boxes, or masks as prompts, or automatically generate all object masks in an image.
github-repo-management
Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.
orcaflex-modeling
Setup, configure, and run OrcaFlex hydrodynamic simulations using the universal runner. Use for marine/offshore analysis including static analysis, dynamic simulations, mooring analysis, and batch processing of OrcaFlex models.
orcaflex-model-sanitization
Sanitize OrcaFlex models by stripping client-identifiable references, converting binary .dat to YAML .yml, and organizing into the reference model library.
orcaflex-model-generator
Generate OrcaFlex modular models from spec.yml using builder registry pattern with conditional generation and cross-builder context sharing.
data-management
Comprehensive DataFrame loading, filtering, transformation, and data pipeline management from Excel, CSV, and multiple sources with YAML-driven configuration.
task-management
Simple task management using a shared TASKS.md file for tracking commitments and action items.