用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ffsshhttiikk/opencode-agents-skills --skill cam命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cam |
| description | Computer-aided manufacturing processes |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"manufacturing engineers, CNC programmers","category":"engineering"} |
# G-code fundamentals
class GCodeGenerator:
# Rapid move (positioning)
def rapid(self, x=None, y=None, z=None):
coords = self._format_coords(x, y, z)
return f"G0 {coords}"
# Linear feed (cutting move)
def linear_feed(self, x=None, y=None, z=None, feed=100):
coords = self._format_coords(x, y, z)
return f"G1 {coords} F{feed}"
# Circular interpolation (clockwise)
def clockwise_arc(self, x, y, i, j, feed=100):
return f"G2 X{x} Y{y} I{i} J{j} F{feed}"
# Circular interpolation (counter-clockwise)
def counterclockwise_arc(self, x, y, i, j, feed=100):
return f"G3 X{x} Y{y} I{i} J{j} F{feed}"
# Tool change
def tool_change(self, tool_number):
return f"M6 T{tool_number}"
# Spindle control
def spindle_on(self, rpm, clockwise=True):
direction = "M3" if clockwise else "M4"
return f"{direction} S{rpm}"
def spindle_off(self):
return "M5"
| Operation | Description | Applications |
|---|---|---|
| Facing | Flat surface on top | Stock removal |
| Roughing | Bulk material removal | Near-net shape |
| Finishing | Final surface quality | Precision surfaces |
| Pocket milling | Internal cavities | Molds, pockets |
| Profile milling | Contour following | Complex shapes |
| Drilling | Hole creation | Fasteners, passes |
| Tapping | Thread creation | Threaded holes |
| Turning | Rotational cutting | Cylindrical parts |
# Cutting parameters calculation
class CuttingParameters:
@staticmethod
def calculate_sfm(diameter, rpm):
"""Surface feet per minute"""
return 3.14159 * diameter * rpm / 12
@staticmethod
def calculate_rpm(sfm, diameter):
"""Revolutions per minute"""
return (sfm * 12) / (3.14159 * diameter)
@staticmethod
def calculate_feed_rate(rpm, chip_load, num_flutes):
"""IPM = RPM × chip load × number of flutes"""
return rpm * chip_load * num_flutes
@staticmethod
def calculate_mrr(depth, width, feed_rate):
"""Material removal rate (cubic inches/min)"""
return depth * width * feed_rate
# Post-processor configuration
POST_PROCESSOR_CONFIG = {
"controller": "Fanuc",
"output_format": "NC file",
"settings": {
"line_numbers": True,
"decimal_places": 3,
"modal": True,
"tool_change": "M6",
"coolant": {
"on": "M8",
"off": "M9"
}
}
}
| Software | Specialty |
|---|---|
| MasterCAM | General purpose CNC |
| Fusion 360 | Cloud-based CAM |
| SolidCAM | Integrated with SolidWorks |
| Delcam | Complex geometries |
| GibbsCAM | Multi-axis machining |
| HSMWorks | High-speed machining |