返回技能列表

prepare-print-model

pjt222
更新于 2 days ago
3 次查看
17
2
17
在 GitHub 上查看
ai

关于

This skill prepares 3D models for FDM/SLA printing by handling export, mesh repair, and printability checks. It is used when converting from CAD, troubleshooting slicing failures, or optimizing part orientation for manufacturing. Key capabilities include STL/3MF export, wall thickness verification, and support structure generation.

快速安装

Claude Code

推荐
主要方式
npx skills add pjt222/agent-almanac -a claude-code
插件命令备选方式
/plugin add https://github.com/pjt222/agent-almanac
Git 克隆备选方式
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/prepare-print-model

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

Prepare Print Model

Export and optimize 3D models for additive manufacturing. Cover full workflow from CAD/modeling software export through mesh repair, printability analysis, support generation, slicer configuration. Ensures models are manifold, have adequate wall thickness, properly oriented for strength and print quality.

When Use

  • Exporting models from CAD software (Fusion 360, SolidWorks, Onshape) or 3D modeling tools (Blender, Maya) for 3D printing
  • Verifying existing STL/3MF files printable before sending to slicer
  • Troubleshooting models that fail to slice or print correctly
  • Optimizing part orientation for strength, surface finish, or minimal support material
  • Preparing mechanical parts with specific strength or tolerance requirements
  • Converting between model formats (STL, 3MF, OBJ) while preserving printability

Inputs

  • source_model: Path to CAD file or 3D model file (STEP, F3D, STL, OBJ, 3MF)
  • target_process: Printing process type (fdm, sla, sls)
  • material: Intended print material (e.g. pla, petg, abs, standard-resin)
  • functional_requirements: Load direction, tolerance requirements, surface finish needs
  • printer_specs: Build volume, nozzle diameter (FDM), layer height capabilities
  • slicer_tool: Target slicer (cura, prusaslicer, orcaslicer, chitubox)

Steps

1. Export Model from Source Software

Export 3D model in suitable format for printing:

For FDM/SLA:

# If starting from CAD (Fusion 360, SolidWorks)
# Export as: STL (binary) or 3MF
# Resolution: High (triangle count sufficient for detail)
# Units: mm (verify scale)

# Example export settings:
# STL: Binary format, refinement 0.1mm
# 3MF: Include color/material data if using multi-material printer

Got: Model file exported with appropriate resolution (0.1mm chord tolerance for mechanical parts, 0.05mm for organic shapes).

If fail: Check model fully defined (no construction geometry), no missing faces, all components visible.

2. Verify Mesh Integrity

Check mesh is manifold and printable:

# Install mesh repair tools if needed
# sudo apt install meshlab admesh

# Check STL file for errors
admesh --check model.stl

# Look for:
# - Non-manifold edges: 0 (every edge connects exactly 2 faces)
# - Holes: 0
# - Backwards/inverted normals: 0
# - Degenerate facets: 0

Common issues:

  • Non-manifold edges: Multiple faces share an edge, or edge has only one face
  • Holes: Gaps in mesh surface
  • Inverted normals: Inside/outside of model reversed
  • Intersecting faces: Self-intersecting geometry

Got: Report shows 0 errors, or errors are repairable.

If fail: Repair mesh automatically or manually:

# Automatic repair with admesh
admesh --write-binary-stl=model_fixed.stl \
       --exact \
       --nearby \
       --remove-unconnected \
       --fill-holes \
       --normal-directions \
       model.stl

# Or use meshlab GUI for manual inspection/repair
meshlab model.stl
# Filters → Cleaning and Repairing → Remove Duplicate Vertices
# Filters → Cleaning and Repairing → Remove Duplicate Faces
# Filters → Normals → Re-Orient all faces coherently

Automatic repair fails? Return to source software. Fix modeling errors (coincident vertices, open edges, overlapping bodies).

3. Check Wall Thickness

Verify minimum wall thickness for chosen process:

Minimum wall thickness by process:

ProcessMin WallRecommended MinStructural Parts
FDM (0.4mm nozzle)0.8mm1.2mm2.4mm+
FDM (0.6mm nozzle)1.2mm1.8mm3.6mm+
SLA (standard)0.4mm0.8mm2.0mm+
SLA (engineering)0.6mm1.2mm2.5mm+
SLS (nylon)0.7mm1.0mm2.0mm+
# Check wall thickness visually in slicer:
# - Import model
# - Enable "Thin walls" detection
# - Slice with 0 infill to see wall structure

# For precise measurement, use CAD software:
# - Measure distance between parallel surfaces
# - Check in critical load-bearing areas

Got: All walls meet minimum thickness for chosen process. Thin walls flagged for review.

If fail: Return to CAD and thicken walls, or:

  • Switch to smaller nozzle (FDM)
  • Use "detect thin walls" slicer setting
  • Accept reduced strength for prototypes

4. Determine Print Orientation

Pick orientation to optimize strength, surface finish, support usage:

Orientation decision matrix:

For strength:

  • Orient so layer lines run perpendicular to primary load direction
  • Example: Bracket under tension → print vertically so layers stack along load axis

For surface finish:

  • Orient largest/most visible surface flat on bed (minimal stair-stepping)
  • Critical dimensions aligned with X/Y plane (higher precision than Z)

For minimal supports:

  • Minimize overhangs >45° (FDM) or >30° (SLA)
  • Place flat surfaces on bed when possible

Load direction analysis:

If part experiences:
- Tensile load along axis → print with layers perpendicular to axis
- Compressive load → layers can be parallel (less critical)
- Bending moment → layers perpendicular to neutral axis
- Shear → avoid layer interfaces parallel to shear direction

Got: Orientation chosen with explicit reason for strength, finish, or support tradeoffs.

If fail: No orientation satisfies all requirements? Prioritize in order: functional strength → dimensional accuracy → surface finish → support minimization.

5. Generate Support Structures

Configure automatic or manual supports for overhangs:

Support angle thresholds:

  • FDM: 45° from vertical (some bridging up to 60° possible)
  • SLA: 30° from vertical (less bridging capability)
  • SLS: No supports needed (powder bed support)

Support types:

Tree supports (FDM, recommended):

  • Fewer contact points with model
  • Easier removal
  • Better for organic shapes
  • Configure: Branch angle 40-50°, branch density medium

Linear supports (FDM, traditional):

  • More stable for large overhangs
  • More contact points (harder removal)
  • Configure: Pattern grid, density 15-20%, interface layers 2-3

Heavy supports (SLA):

  • Thicker contact points for heavy parts
  • Risk of marks on surface
  • Configure: Contact diameter 0.5-0.8mm, density based on part weight

Interface layers:

  • Add 2-3 interface layers between support and model
  • Reduces surface marks
  • Slightly easier removal
# In slicer (PrusaSlicer example):
# Print Settings → Support material
# - Generate support material: Yes
# - Overhang threshold: 45° (FDM) / 30° (SLA)
# - Pattern: Rectilinear / Tree (auto)
# - Interface layers: 3
# - Interface pattern spacing: 0.2mm

Got: Supports generated for all overhangs exceeding threshold angle. Preview shows no floating geometry.

If fail: Automatic supports inadequate?

  • Add manual support enforcers in critical areas
  • Increase support density near thin overhangs
  • Split model and print in sections if supports infeasible

6. Configure Slicer Profile

Set process-appropriate parameters:

FDM layer heights:

  • Draft: 0.28-0.32mm (fast, visible layers)
  • Standard: 0.16-0.20mm (balanced quality/speed)
  • Fine: 0.08-0.12mm (smooth, slow)
  • Rule: Layer height = 25-75% of nozzle diameter

SLA layer heights:

  • Standard: 0.05mm (balanced)
  • Fine: 0.025mm (miniatures, high detail)
  • Fast: 0.1mm (prototypes)

Key parameters by process:

FDM:

layer_height: 0.2mm
line_width: 0.4mm (= nozzle diameter)
perimeters: 3-4 (structural), 2 (cosmetic)
top_bottom_layers: 5 (0.2mm layers = 1mm solid)
infill_percentage: 20% (cosmetic), 40-60% (functional)
infill_pattern: gyroid (FDM), grid (basic)
print_speed: 50mm/s perimeter, 80mm/s infill
temperature: material-specific (see select-print-material skill)

SLA:

layer_height: 0.05mm
bottom_layers: 6-8 (strong bed adhesion)
exposure_time: material-specific (2-8s per layer)
bottom_exposure_time: 30-60s
lift_speed: 60-80mm/min
retract_speed: 150-180mm/min

Got: Profile configured with process-appropriate defaults. Modified for specific material/model requirements.

If fail: Unsure about parameters? Start with slicer's default "Standard Quality" profile for chosen material. Iterate.

7. Preview Slice Layer-by-Layer

Inspect sliced G-code for issues:

# In slicer:
# - Slice model
# - Use layer preview slider to inspect each layer
# - Check for:
#   * Gaps in perimeters (indicates thin walls)
#   * Floating regions (missing supports)
#   * Excessive stringing paths (reduce travel)
#   * First layer: proper squish and adhesion
#   * Top layers: sufficient solid infill

Red flags in preview:

  • White gaps in solid regions: Walls too thin for current line width
  • Travels over large distances: Increase retraction or add z-hop
  • First layer not squishing: Adjust Z-offset down by 0.05mm
  • Sparse top layers: Increase top solid layers to 5+

Got: Preview shows continuous perimeters, proper infill, clean travels, no obvious defects.

If fail: Adjust slicer settings and re-slice. Common fixes:

  • Thin wall gaps → Enable "Detect thin walls" or reduce line width
  • Poor bridging → Reduce bridge speed to 30mm/s, increase cooling
  • Stringing → Increase retraction distance +1mm, reduce temperature -5°C

8. Export G-code and Verify

Save sliced G-code with descriptive name:

# Naming convention:
# <part_name>_<material>_<layer_height>_<profile>.gcode
# Example: bracket_petg_0.2mm_standard.gcode

# Verify G-code:
grep "^;PRINT_TIME:" model.gcode  # Check estimated time
grep "^;Filament used:" model.gcode  # Check material usage
head -n 50 model.gcode | grep "^M104\|^M140"  # Verify temperatures

# Expected first layer temp:
# M140 S85  (bed temp for PETG)
# M104 S245 (hotend temp for PETG)

Pre-print checklist:

  • Bed leveled and clean
  • Correct material loaded and dry
  • Temperatures match material requirements
  • First layer Z-offset calibrated
  • Adequate filament/resin remaining
  • Print time acceptable for monitoring plan

Got: G-code file saved with embedded metadata. Temperatures verified. Print time/material estimate reasonable.

If fail: Print time excessive (>12 hours)?

  • Increase layer height (0.2 → 0.28mm saves ~30% time)
  • Reduce perimeters (4 → 3)
  • Reduce infill (40% → 20% for non-structural)
  • Scale model down if size not critical

Checks

  • Model exported from source software with correct units (mm) and scale
  • Mesh integrity verified: manifold, no holes, normals correct
  • Wall thickness meets minimum for chosen process (≥0.8mm FDM, ≥0.4mm SLA)
  • Print orientation optimized for strength, finish, or support tradeoffs
  • Supports generated for all overhangs >45° (FDM) or >30° (SLA)
  • Slicer profile configured with appropriate layer height and parameters
  • Layer-by-layer preview inspected, no gaps or floating regions
  • G-code exported with verified temperatures and reasonable print time
  • Pre-print checklist completed (bed leveled, material loaded, etc.)

Pitfalls

  1. Skip mesh repair: Non-manifold meshes can slice but fail to print correctly with gaps or malformed layers
  2. Ignore wall thickness: Thin walls (< minimum) will have gaps. Drastically reduces strength
  3. Wrong orientation for strength: Printing tensile parts with layers parallel to load direction creates weak delamination plane
  4. Insufficient supports: Underestimating overhang angle leads to sagging, stringing, complete failure
  5. First layer neglect: 90% of print failures occur in first layer — Z-offset and bed adhesion are critical
  6. Temperature from Internet: Every printer/material combination unique. Always calibrate temperature with tower tests
  7. Excessive detail for layer height: Fine features smaller than 2× layer height won't resolve properly
  8. Not previewing slice: Slicers can make unexpected decisions (thin wall gaps, weird infill). Always preview before printing
  9. Material hygroscopy: Wet filament (especially Nylon, TPU, PETG) causes poor layer adhesion, stringing, brittleness
  10. Overconfidence in supports: Heavy parts with large overhangs can still sag even with supports. Test on smaller models first

See Also

  • select-print-material: Pick appropriate material based on mechanical, thermal, chemical requirements
  • troubleshoot-print-issues: Diagnose and fix print failures if prepared model still fails
  • Model with Blender (future skill): Create 3D models optimized for printing from scratch
  • Calibrate 3D Printer (future skill): E-steps, flow rate, temperature towers, retraction tuning

GitHub 仓库

pjt222/agent-almanac
路径: i18n/caveman/skills/prepare-print-model
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

相关推荐技能

content-collections

Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。

查看技能

polymarket

这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。

查看技能

creating-opencode-plugins

该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。

查看技能

sglang

SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。

查看技能