lattice

GitHub

用于在3D模型边界内生成晶格或填充图案,支持网格、蜂窝等类型,适用于轻量化结构设计。

skills/lattice/SKILL.md ghbalf/freecad-ai

Trigger Scenarios

生成3D晶格图案 创建内部填充结构 设计轻量化部件

Install

npx skills add ghbalf/freecad-ai --skill lattice -g -y
More Options

Use without installing

npx skills use ghbalf/freecad-ai@lattice

指定 Agent (Claude Code)

npx skills add ghbalf/freecad-ai --skill lattice -a claude-code -g -y

安装 repo 全部 skill

npx skills add ghbalf/freecad-ai --all -g -y

预览 repo 内 skill

npx skills add ghbalf/freecad-ai --list

SKILL.md

Frontmatter
{
    "name": "lattice",
    "description": "Generate a 3D lattice or infill pattern inside a bounding region. Useful for lightweight structural parts."
}

Lattice / Infill Pattern

Generate a 3D lattice or infill pattern inside a bounding region. Useful for lightweight structural parts.

Pattern types

  • Grid: rectangular grid of holes or beams
  • Honeycomb: hexagonal pattern (strongest weight-to-strength ratio)
  • Diagonal: 45-degree crosshatch
  • Gyroid (advanced): triply periodic minimal surface

Parameters to ask (if not provided)

  • Pattern type: grid / honeycomb / diagonal
  • Region: existing object to fill, or bounding box dimensions
  • Cell size: distance between pattern centers (default 10mm)
  • Wall thickness: thickness of lattice walls/beams (default 1.5mm)
  • Height/depth: extrusion height of the pattern

Construction approach

Grid pattern

  1. Create a sketch with a rectangular array of circles or squares
  2. Use spacing = cell_size, hole diameter = cell_size - wall_thickness
  3. Pad to height, then boolean-intersect with the bounding shape

Honeycomb

  1. Create hexagonal cells: 6 line segments per cell
  2. Hex radius = cell_size / 2
  3. Offset rows by cell_size * 0.75 horizontally and cell_size * sqrt(3)/2 vertically
  4. Pad and intersect with bounding shape

Diagonal crosshatch

  1. Create parallel lines at 45 degrees, spaced by cell_size
  2. Create second set at -45 degrees
  3. Lines have width = wall_thickness
  4. Pad and intersect

Important

  • Always create the lattice larger than the target region, then use boolean intersection to trim
  • Label clearly: "Lattice Grid 10mm" etc.
  • For 3D printing, ensure wall_thickness >= 2x nozzle diameter (typically >= 0.8mm)
  • After construction, hide all sketches for a clean viewport:
for obj in App.ActiveDocument.Objects:
    if obj.TypeId == "Sketcher::SketchObject":
        obj.Visibility = False

Version History

  • 08d637d Current 2026-10-18 20:51

Same Skill Collection

skills/create-validation/SKILL.md
skills/enclosure/SKILL.md
skills/fastener-hole/SKILL.md
skills/gear/SKILL.md
skills/optimize-skill/SKILL.md
skills/sketch-from-image/SKILL.md
skills/skill-creator/SKILL.md
skills/thread-insert/SKILL.md

Metadata

Files
0
Version
08d637d
Hash
9332eaac
Indexed
2026-10-18 20:51

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-20 02:12
浙ICP备14020137号-1