フィードバックのお願い:3D ポリラインのモデル変換の最適化

Screenshot of a software interface displaying details about a polyline with multiple vertices, highlighting vertex handles and workflows for property coordinates and metadata.

上図はデータワークフローの比較です。Model Derivative API の変換で生成される Property Database(右) は冗長な頂点ハンドルを除去するために最適化されていて、Render Geometry(左) は標準的で影響を受けない座標抽出手法として使われ続けています。

オートデスクでは、Model Derivative API を含む Autodesk Platform Services(APS) のパフォーマンスと効率の向上に常に取り組んでいます。DWG ソースファイル内の 3Dポリライン(3DPOLY /AcDb3dPolyline) の処理方法に関して大幅な最適化を実施しています。

この変更は、特に Autodesk Construction Cloud(ACC) プロパティブラウザ内、および API 利用者向けに、不要なデータの肥大化の抑止と応答性の向上に焦点を当てています。

変更点:頂点ハンドル抽出の中止

Model Derivative の Property Database(properties.db) への個別の頂点ハンドル プロパティの抽出は中止します。

理由

3D ポリラインを含む DWG を変換処理すると、各頂点が Property Database 内に独自の「Handle」エントリを生成します。頂点が 1,000 個あるポリラインの場合、"Vertex - 1: Handle: <ID>""Vertex - 2: Handle: <ID>" などのように、1,000 個の冗長なメタデータエントリを作成します。

この「プロパティの肥大化」はメタデータのインデックス作成やクエリー時のパフォーマンスを著しく低下させます。

実例:

6 つの頂点を持つ単一の 3D ポリラインを含むテスト図面は、合計 19 のプロパティを生成します。6 つの頂点ハンドル エントリを取り除くと、プロパティ数は 13 に減少し、31.6% の減少になります。数百から数千の 3D ポリラインと各それぞれの頂点を持つモデルでは、この最適化により大幅な性能向上が得られます。


Model Derivative API エンドポイントへの影響

以下の API エンドポイントは、3D ポリラインの頂点ハンドルプロパティをもはや返しません。

終着点影響概要
GET /modelderivative/v2/designdata/{urn}/metadata/{guid}/properties🔴 直接すべてのプロパティエンドポイント – 頂点ハンドルがレスポンス コレクションから削除されます。
POST /modelderivative/v2/designdata/{urn}/metadata/{guid}/properties:query🔴 直接クエリー プロパティ エンドポイント – オブジェクトをクエリーすると、返されるプロパティには頂点ハンドルが含まれなくなります。頂点ハンドルプロパティに基づくフィルターも失敗します。
GET /modelderivative/v2/designdata/{urn}/metadata/{guid}🟡 間接的オブジェクト ツリー/メタデータ – ツリーノードは欠落したプロパティ エントリを参照することがあります。
model.getProperties(dbId, callback)🟡 間接的Viewer API – 内部で Property Database 利用し、頂点ハンドルは返しません。

🔴 直接的な影響:API レスポンス構造の変更
🟡 間接的影響:Property Database に依存しつつ、頂点ハンドルを明示的に表示しないメソッド


例:API レスポンスの変更

この変更前後における Model Derivative API レスポンスは次の通りです:

❌ 現在の対応(GET /プロパティ)

{
"data": {
"collection": [
{
"objectid": 134,
"name": "Polyline [2C1]",
"properties": {
"General": {
"Handle": "2c1",
"Layer": "0",
"Vertex - 1: Handle": "2c3", ← REMOVED
"Vertex - 2: Handle": "2c4", ← REMOVED
"Vertex - 3: Handle": "2c5", ← REMOVED
"Name": "3D Polyline"
},
"Geometry": {
"Length": "3765.836 mm"
}
}
}
]
}
}

✅ 新しいレスポンス(最適化済み)

{
"data": {
"collection": [
{
"objectid": 134,
"name": "Polyline [2C1]",
"properties": {
"General": {
"Handle": "2c1", ← RETAINED
"Layer": "0", ← RETAINED
"Name": "3D Polyline" ← RETAINED
},
"Geometry": {
"Length": "3765.836 mm" ← RETAINED
}
}
}
]
}
}

結果:この特定の 3D ポリラインは 6 つの頂点を持ち、6 つの頂点ハンドルプロパティを生成しました。これらを削除するとプロパティ数が 19 から 13 に減少し(31.6% の減少)、数百頂点を含むポリラインを持つ複雑なモデルでは、性能向上が大きく増加します。


API 利用例(Node.js)

もし Model Derivative API を直接使っている場合、コードは次の影響を受けることになります:

⚠️ 影響あり:GET /propertiesで Property Database をクエリーする場合

// ❌ This code will break - vertex handles won't exist
const response = await axios.get(
`https://developer.api.autodesk.com/modelderivative/v2/designdata/${urn}/metadata/${guid}/properties`,
{ headers: { Authorization: `Bearer ${token}` } }
);
const props = response.data.data.collection[0].properties.General;
// These properties will no longer exist:
console.log(props["Vertex - 1: Handle"]); // undefined
console.log(props["Vertex - 2: Handle"]); // undefined

⚠️ 影響あり:POST /properties:query を使用

// ❌ Query results won't include vertex handles
const response = await axios.post(
`https://developer.api.autodesk.com/modelderivative/v2/designdata/${urn}/metadata/${guid}/properties:query`,
{
fields: ["objectid", "name", "properties"],
query: { "$in": ["objectid", 134] } // Query for object with ID 134
},
{ headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" } }
);
const props = response.data.data.collection[0].properties.General;
// Vertex handles no longer in query results:
console.log(props["Vertex - 1: Handle"]); // undefined (was "2c3" before)
console.log(props["Vertex - 2: Handle"]); // undefined (was "2c4" before)
// ❌ Can't filter by vertex handles either
const badQuery = {
query: { "$eq": ["properties.General['Vertex - 1: Handle']", "2c3"] }
};
// This query will return no results after the change

✅ 安全:残存するプロパティ

// ✅ These properties continue to work
const response = await axios.get(
`https://developer.api.autodesk.com/modelderivative/v2/designdata/${urn}/metadata/${guid}/properties`,
{ headers: { Authorization: `Bearer ${token}` } }
);
const props = response.data.data.collection[0].properties;
// All other properties remain available:
console.log(props.General["Handle"]); // ✓ Still works
console.log(props.General["Layer"]); // ✓ Still works
console.log(props.Geometry["Length"]); // ✓ Still works

影響の有無?- 2 つのワークフローの説明

✅ Workflow A:Viewer(SAFE) を通じたジオメトリ アクセス

このワークフローには影響はありません。

ほとんどの開発者は、APS Viewer のフラグメント ジオメトリ(生のレンダリングバッファ) から直接 3D ポリライン座標を抽出しています。この方法は GPU がレンダリングに使用する高度に最適化されたデータを基に動作します。

// Best Practice: Accessing coordinates via Viewer Geometry API
function get3DPolylineCoordinates(viewer, dbId) {
const model = viewer.model;
const instanceTree = model.getInstanceTree();
instanceTree.enumNodeFragments(dbId, (fragId) => {
const renderProxy = viewer.impl.getRenderProxy(model, fragId);
const geometry = renderProxy.geometry;
const matrix = renderProxy.matrixWorld; // World transform
// Direct access to vertex buffer
const positions = geometry.vb;
const stride = geometry.vbstride || 3;
for (let i = 0; i < positions.length; i += stride) {
let point = new THREE.Vector3(
positions[i], // X
positions[i + 1], // Y
positions[i + 2] // Z
);
point.applyMatrix4(matrix); // Apply world transform
console.log(`Point: x: ${point.x.toFixed(3)}, y: ${point.y.toFixed(3)}, z: ${point.z.toFixed(3)}`);
}
});
}

この方法を利用していれば、問題は発生しません。3D ポリラインは正しくレンダリングされ、その空間データはジオメトリ バッファを通じて完全にアクセス可能です。


⚠️ Workflow B:Property Database から頂点ハンドルをクエリーする(影響あり)

このワークフローには影響があります。

アプリが Model Derivative の Property Database(GET /properties、POST /properties:query または model.getProperties() 経由)を明示的にクエリして特定の Vertex - N: Handle エントリを検索する場合、これらのプロパティは利用出来なくなります。

// ⚠️ THIS CODE WILL BREAK
model.getProperties(dbId, (result) => {
result.properties.forEach(prop => {
if (prop.displayName.startsWith("Vertex -") &&
prop.displayName.endsWith(": Handle")) {
// This property will no longer exist after the change!
storeVertexHandle(prop.displayValue);
}
});
});

カスタム自動化、QA ツール、または外部データベースリンクが、3D ポリライン用の特定の Vertex - N: Handleエントリの解析に依存している場合、統合をViewer Geometry API を使用するように更新する必要があります。


変わらないもの

  • 3D ポリライン レンダリング:3D ポリラインは引き続き APS Viewer で正しく表示されます。
  • 頂点座標:Viewer のジオメトリ バッファ(推奨方法) からアクセス可能です。
  • その他のプロパティ:一般的な属性(レイヤー、色、線種、ハンドル番号) およびジオメトリの合計(長さ) は完全に抽出されまます。
  • 2D ポリライン頂点のプロパティ:2D ポリラインの頂点特有のプロパティ(例:セグメント幅)は影響を受けません。

皆さんのご意見をお待ちしています!

SaaS 製品として、APS の変更は世界中に展開されます。潜在的な影響を理解することが極めて重要です。

もしお手持ちのアプリが  Vertex - N: Handleに依存している場合(Property Database オブジェクトの Property Database から、あるいは /properties/エンドポイントや properties:query エンドポイント経由で抽出されたプロパティを処理している場合)、ご連絡をお願いします。具体的な使用例を  APS Developer Support Team まで共有ください。すべての開発者にとって円滑な移行を実現するためには、皆様からのフィードバックが不可欠です。

参考文献

この記事の画像には C2PA のメタデータが含まれており、AI 支援による可視化であることが確認されており、技術コミュニケーションにおける完全な透明性を確保しています。

※ 本記事は 📢 Call for Feedback: Optimizing Model Derivative Extraction for 3D Polylines | Autodesk Platform Services から転写・意訳・補足したものです。