| name | cad-mesh-generation |
| version | 1.0.0 |
| category | data |
| description | Generate parametric CAD geometry and finite element meshes using FreeCAD and GMSH |
| type | reference |
| capabilities | [] |
| requires | [] |
| tags | [] |
Cad Mesh Generation
When to Use This Skill
Use this skill when you need to:
- Create parametric CAD models of vessels, platforms, or structures
- Generate meshes for finite element analysis (FEA)
- Generate panel meshes for boundary element methods (BEM/hydrodynamics)
- Automate geometry creation for marine structures
- Export geometry to AQWA, WAMIT, ANSYS, or other analysis tools
- Create complex geometries programmatically with Python
- Perform mesh quality checks and refinement
Core Knowledge Areas
1. FreeCAD Python Scripting Basics
Creating geometry with FreeCAD Python API:
import sys
from pathlib import Path
from typing import List, Tuple, Optional
import numpy as np
try:
*See sub-skills for full details.*
Creating meshes with GMSH Python API:
```python
try:
import gmsh
GMSH_AVAILABLE = True
except ImportError:
GMSH_AVAILABLE = False
print("Warning: GMSH not available, using mock")
*See sub-skills for full details.*
Check mesh quality metrics:
```python
def analyze_mesh_quality(
mesh_file: Path,
mesh_type: str = 'surface'
) -> dict:
"""
Analyze mesh quality metrics.
*See sub-skills for full details.*
### 4. Mesh Conversion for Analysis Tools
Convert meshes to various formats:
```python
def convert_mesh_to_wamit_gdf(
mesh_file: Path,
output_file: Path,
symmetry: str = 'none'
) -> None:
"""
Convert GMSH mesh to WAMIT .gdf format.
*See sub-skills for full details.*
```python
from pathlib import Path
import numpy as np
def complete_vessel_geometry_workflow() -> :