Skill Library

intermediate Code Development

3D Printing Optimizer

Optimize 3D models for additive manufacturing considering orientation, supports, infill, and material properties.

When to Use This Skill

  • Preparing models for printing
  • Reducing print time and material
  • Achieving better surface quality
  • Designing for manufacturability

How to use this skill

1. Copy the AI Core Logic from the Instructions tab below.

2. Paste it into your AI's System Instructions or as your first message.

3. Provide your raw data or requirements as requested by the AI.

#3d-printing#cad#manufacturing#optimization

System Directives

## 3D Printing Optimization ### Orientation Strategy ```python def optimize_orientation(mesh, criteria="surface_quality"): """ Find optimal print orientation Criteria: surface_quality, strength, speed, support_minimization """ import numpy as np from trimesh import transformations best_score = -np.inf best_rotation = None for angle_x in range(0, 360, 45): for angle_y in range(0, 180, 45): rotation = transformations.euler_matrix( np.radians(angle_x), np.radians(angle_y), 0 ) rotated = mesh.copy() rotated.apply_transform(rotation) if criteria == "surface_quality": score = evaluate_surface_quality(rotated) elif criteria == "support_minimization": score = -estimate_support_volume(rotated) if score > best_score: best_score = score best_rotation = rotation return best_rotation def evaluate_surface_quality(mesh): """Minimize overhang angles""" face_normals = mesh.face_normals z_up = np.array([0, 0, 1]) angles = np.arccos(np.clip( np.dot(face_normals, z_up), -1.0, 1.0 )) overhang_penalty = np.sum(angles > np.radians(45)) return -overhang_penalty ``` ### Support Generation Logic ```python def generate_tree_supports(mesh, overhang_angle=45): """Generate tree-style supports""" overhang_faces = detect_overhangs(mesh, overhang_angle) support_points = [] for face_idx in overhang_faces: center = mesh.triangles_center[face_idx] normal = mesh.face_normals[face_idx] support_point = center.copy() support_point[2] = 0 # Z = 0 (build plate) support_points.append(support_point) supports = optimize_support_tree(support_points) return supports ``` ## Slicer Settings by Material ``` PLA (Standard): ├── Nozzle: 200°C ├── Bed: 60°C ├── Speed: 50-60 mm/s ├── Retraction: 6mm @ 25mm/s └── Cooling: 100% after layer 2 ABS (Strong): ├── Nozzle: 250°C ├── Bed: 110°C ├── Enclosure: Required ├── Speed: 40-50 mm/s └── Cooling: Minimal PETG (Durable): ├── Nozzle: 240°C ├── Bed: 80°C ├── Speed: 30-40 mm/s ├── Retraction: 4mm @ 20mm/s └── Z-offset: +0.02mm TPU (Flexible): ├── Nozzle: 230°C ├── Bed: 60°C ├── Speed: 20-30 mm/s ├── Retraction: Minimal └── Compression: Avoid ``` ## Best Practices - Orient to minimize supports - Use brim for warping materials - Enable adaptive layer heights - Optimize infill density by region

Procedural Integration

This skill is formatted as a set of persistent system instructions. When integrated, it provides the AI model with specialized workflows and knowledge constraints for Code Development.

Skill Actions


Model Compatibility
🎭 Claude Sonnet🧠 GPT-4
Code Execution: Optional
MCP Tools: Optional
Footprint ~827 tokens