本文介绍了如何使用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#)提取2d文件几何的方法吗?

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.

推荐答案

从该错误看来,您的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视图,您可以在或通过此示例()。

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

编辑

看来,您正在尝试从中提取.obj。 2D DWG中的单个objectId。这不会触发错误,但是它可能会返回空文件,因为OBJ格式适用于3D形状。您可以使用代码中使用的完整 POST作业更新您的问题吗?确保 modelGuid objectIds 参数正确。

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中提取几何位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 01:31