mcpField
N
n8n-cost-estimation

n8n-cost-estimation

github.com/datadrivenconstructionデータ・データベース375107 回インストール1 週間前に更新
リポジトリ

n8n-cost-estimation について

Revit などの CAD ファイルを構造化された要素データに変換し、LLM による分類と CWICR の価格照合でコストや工期を見積もる n8n ワークフローです。建設見積もりや BIM 業務向けです。

主な機能

  1. 01CAD ファイルから要素データを抽出
  2. 02要素の分類と LLM による判定
  3. 03CWICR のベクトル検索
  4. 04コスト計算とレポート生成

活用シーン

  1. 01Revit モデルから工事費を見積もる
  2. 02要素に施工項目と価格を照合する
  3. 03工程別の費用と工期をまとめる

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction --skill n8n-cost-estimation

インストール後、Claude Code で/n8n-cost-estimationを入力して読み込まれたか確認します。

同梱ファイルclaw.jsoninstructions.md

詳細

コスト自動見積もりパイプライン

ビジネスケース

問題点

従来のコスト見積もりには、次の作業が必要です。

  • 価格データベースからの手作業による作業項目の検索
  • 時間のかかる要素の分類
  • 価格基準に関する専門知識
  • 繰り返し発生するデータ入力
解決策

55,000 件以上の作業項目を含むベクトルデータベースと AI(LLM)を使用して、CAD(Revit 2015-2026)ファイルから詳細なコストと工数の見積もりを作成する、無料のオープンソース n8n パイプラインです。

ビジネス価値
従来の役割自動化後
BIM マネージャーが手作業でデータをエクスポートパイプラインが要素を自動分類
ジュニア見積担当者がデータベースを検索ベクトル検索でミリ秒単位で一致項目を検出
シニア見積担当者がアセンブリを対応付けLLM が数量パラメーターを特定
現場監督が労働時間を計算DDC CWICR に記録された基準工数を利用
プロジェクトマネージャーがコストを集計パイプラインがフェーズ別の内訳を出力

処理速度:要素グループごとに 3~10 秒

技術的な実装

パイプラインのアーキテクチャ
┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│ Revit/IFC   │───>│ CAD2DATA    │───>│ Structured  │
│ File        │    │ Converter   │    │ Excel/CSV   │
└─────────────┘    └─────────────┘    └─────────────┘
                                             │
                                             ▼
┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│ Cost Report │<───│ Price Match │<───│ LLM Class.  │
│ HTML/Excel  │    │ DDC CWICR   │    │ + QTO       │
└─────────────┘    └─────────────┘    └─────────────┘
n8n パイプラインの手順
1. ファイル変換ノード
// Execute CAD converter
const filePath = $input.first().json.file_path;
const outputDir = filePath.replace(/\.[^.]+$/, '');

const command = `RvtExporter.exe "${filePath}" complete bbox`;

// Returns: { xlsx_path, dae_path }
2. 要素の読み込み
// Read converted Excel into n8n
const xlsx = $node["Read Binary Files"].json;
const elements = xlsx.sheets["Elements"];

// Group by category for processing
const grouped = elements.reduce((acc, el) => {
  const cat = el.Category;
  if (!acc[cat]) acc[cat] = [];
  acc[cat].push(el);
  return acc;
}, {});

return Object.entries(grouped).map(([category, items]) => ({
  json: {category, items, count: items.length}
}));
3. LLM による分類
// Prompt for Claude/GPT classification
const prompt = `
You are a construction estimator. Given these BIM elements:
Category: ${$input.first().json.category}
Sample elements: ${JSON.stringify($input.first().json.items.slice(0,5))}

1. Identify the construction work type
2. List relevant quantity parameters (Volume, Area, Length, Count)
3. Suggest standard work items from construction norms

Return as JSON:
{
  "work_type": "...",
  "quantity_params": ["Volume", "Area"],
  "suggested_items": ["Concrete foundation", "Formwork"]
}
`;
4. CWICR でのベクトル検索
// Search DDC CWICR database for matching work items
const qdrantClient = require('@qdrant/js-client-rest');

const searchResults = await qdrantClient.search('cwicr_en_v3', {
  vector: await getEmbedding($input.first().json.work_description),
  limit: 10,
  score_threshold: 0.7
});

return searchResults.map(r => ({
  json: {
    work_code: r.payload.work_item_code,
    description: r.payload.description,
    unit: r.payload.unit,
    unit_price: r.payload.unit_price,
    similarity: r.score
  }
}));
5. コストの計算
// Match quantities to prices
const elements = $node["Load Elements"].json;
const prices = $node["Vector Search"].json;

let totalCost = 0;
const breakdown = [];

for (const el of elements.items) {
  const matchedPrice = prices.find(p => p.similarity > 0.8);
  if (matchedPrice) {
    const quantity = el.Volume || el.Area || 1;
    const cost = quantity * matchedPrice.unit_price;
    totalCost += cost;

    breakdown.push({
      element: el.Name,
      quantity: quantity,
      unit: matchedPrice.unit,
      unit_price: matchedPrice.unit_price,
      total: cost
    });
  }
}

return [{json: {totalCost, breakdown}}];
6. レポートの生成
// Create HTML report
const data = $input.first().json;

const html = `
<!DOCTYPE html>
<html>
<head>
  <title>Cost Estimate Report</title>
  <style>
    body { font-family: Arial, sans-serif; margin: 20px; }
    table { border-collapse: collapse; width: 100%; }
    th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
    th { background-color: #4CAF50; color: white; }
    .total { font-size: 1.5em; font-weight: bold; }
  </style>
</head>
<body>
  <h1>Cost Estimate Report</h1>
  <p class="total">Total: $${data.totalCost.toLocaleString()}</p>
  <table>
    <tr><th>Element</th><th>Quantity</th><th>Unit</th><th>Price</th><th>Total</th></tr>
    ${data.breakdown.map(row => `
      <tr>
        <td>${row.element}</td>
        <td>${row.quantity.toFixed(2)}</td>
        <td>${row.unit}</td>
        <td>$${row.unit_price.toFixed(2)}</td>
        <td>$${row.total.toFixed(2)}</td>
      </tr>
    `).join('')}
  </table>
</body>
</html>
`;

return [{json: {html, filename: 'estimate_report.html'}}];

実際の結果

プロジェクト例(rac_basic_sample.rvt):

  • 処理時間:ChatGPT を使用して約 30 分
  • 分析した要素:500 件以上
  • 自動分類の精度:95%
  • 手動レビューが必要なケース:例外的なケースの 5%

コミュニティからの主な見解

「私の個人的な見解ですが、今日、ワークフローの自動化や AI エージェントを無視するプロフェッショナルには、建設業界に取り残されるまでおよそ 5 年しかありません。ツールは無料でオープンです。データもオープンです。残る問いは、誰が最初に使い方を学ぶかだけです。」

前提条件

  • n8n(ローカルまたはホスト型)
  • DDC CAD コンバーター
  • DDC CWICR データベース
  • OpenAI/Anthropic API キー
  • Qdrant ベクトルデータベース

リソース

  • GitHub:cad2data Pipeline リポジトリ
  • データベース:OpenConstructionEstimate-DDC-CWICR
  • コミュニティ:n8n Workflows for Construction(Telegram)

コメント