如何使用 Forge AutoDesk API 从 2d .dwg 中提取几何位置? [英] How to extract geometric positions from 2d .dwg using Forge AutoDesk APIs?

查看:34
本文介绍了如何使用 Forge AutoDesk API 从 2d .dwg 中提取几何位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用模型派生 API,我能够获得 3d dwg 文件的几何属性,但对于 2d dwg,我在提取几何属性时遇到了问题(无法恢复的退出代码:-1073741831).

Using Model derivative API I am able to get geometric properties of 3d dwg file but for 2d dwg I am facing the issue(Unrecoverable exit code from extractor: -1073741831) on extracting geometric properties.

我也了解模型衍生 API 不支持提取 2d 几何图形.

I also understand that model derivative API doesn't provide a support for extracting 2d geometries.

还有其他方法可以使用编程 API(c#) 提取二维文件的几何形状吗?

Is any other way to extract geometry of 2d file using programming API(c#)?

编辑

我在以下 GitHub 链接中添加了 ObjectTree JSON 文件和将选定对​​象的几何提取到 OBJ 文件中"的 POST URL.

I have added ObjectTree JSON file and POST URL of "Extract Geometry for Selected Objects into an OBJ File" in the following GitHub link.

https://github.com/Jothipandiyan-jp1/Autodesk

推荐答案

从这个错误来看,你的 2D 绘图似乎有问题,或者没有正确上传.或者是垂直文件,如 Plant 3D 或 Map 3D?

From the error, it seems that your 2D drawing is somehow broken, or not uploaded right. Or is it a vertical file, like Plant 3D or Map 3D?

模型衍生工具应该提取 2D 视图,您可以在 A360 Viewer 或通过此示例 (C# 源代码).

The Model Derivative should extract the 2D View, you can try the file on A360 Viewer or via API at this sample (C# source).

编辑

根据评论,您似乎正在尝试从 2D DWG 中的单个 objectId 中提取 .obj.这不应触发错误,但它可能会返回空文件,因为 OBJ 格式适用于 3D 形状.您能否使用代码中使用的完整 POST 作业 更新您的问题?确保 modelGuidobjectIds 参数正确.

From the comments, it seems you are trying to extract the .obj from a single objectId in the 2D DWG. This should not trigger errors, but it may return empty file as the OBJ format is intended for 3D shapes. Can you update your question with the full POST job used on your code? Make sure the modelGuid and objectIds parameters are correct.

这篇关于如何使用 Forge AutoDesk API 从 2d .dwg 中提取几何位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆