vb.net 中的 3D 文件
我知道这将是一个困难的问题,所以我不一定要寻找直接的答案,但可能是一个教程或正确方向的一个点。
我正在做的是对一个由远程操作员控制的机器人进行编程。 我们在 SolidWorks 中绘制了机器人的 3D 渲染图。 我想要做的是将 3D 文件导入 VB(可能使用 DX9)并能够使用代码对其进行操作,以便远程操作员更好地了解机器人正在做什么。 操作员还会有实时视频可供观看,但这对于这个问题来说并不重要。
任何帮助将不胜感激。 谢谢!
I know this will be a difficult question, so I am not necessarily looking for a direct answer but maybe a tutorial or a point in the right direction.
What I am doing is programing a robot that will be controlled by a remote operator. We have a 3D rendering of the robot in SolidWorks. What I am looking to do is get the 3D file into VB (probably using DX9) and be able to manipulate it using code so that the remote operator will have a better idea of what the robot is doing. The operator will also have live video to look at, but that doesn't really matter for this question.
Any help would be greatly appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定真正的问题是什么,但我怀疑您想要做的是能够通过某种手动输入来操纵机器人的软件模型。 假设这是正确的问题,有两个方面需要注意:
1)Solidworks 模块:一旦机器人模型在 SW 中正常工作,就可以在 VB.Net 中编写一个程序来操纵机器人模型。每个关节的位置配合。 同样使用 VB,可以使用滑动条等对窗口进行编程,这将使操作员能够“远程”控制机器人。 完成此操作后,就有很好的机会设置一个可以存储顺序步骤的表。 完成后,可以进一步开发 VB 程序,以允许机器人“循环”执行一系列动作。 如果模型中还添加了任何障碍物,这将是碰撞检测和离线训练的一个很好的工具。
2) 如果问题还包括物理操作员的加入,则有许多潜在的解决方案。 希望机器人软件能够提供一个 VB 库,用于以编程方式通信和命令机器人。 如果是这种情况,那么可以使用“运行”模式来开发 VB 代码,其中 SW 机器人由悬挂操作员控制,而不是由 VB 窗口中的控件控制(如上所述)。 这将允许操作员使用虚拟机器人“离线”工作。
希望这可以帮助。
I'm not sure what the real question is but what I suspect that you are trying to do is to be able to manipulate a SW model of a robot with some sort of a manual input. Assuming that this is the correct question, there are two aspects that need to be dwelt with:
1) The Solidworks module: Once the model of the robot is working properly in SW, a program can be written in VB.Net that can manipulate the positional mates for each of the joints. Also using VB, a window can be programmed with slide bars etc. that will allow the operator to be able to "remotely" control the robot. Once this is done, there is a great opportunity to setup a table that could store the sequencial steps. When completed, the VB program could be further developed to allow the robot to "cycle" through a sequence of moves. If any obstacles are also added to the model, this would be a great tool for collission detection and training off line.
2) If the question also includes the incorporation of a physical operator pendent there are a number of potential solutions for this. It would be hoped that the robot software would provide a VB library for communicating and commanding the Robot programatically. If this is the case, then the VB code could then be developed with a "run" mode where the SW robot is controlled by the operator pendent, instead of the controls in the VB window, (as mentioned above). This would then allow the opertor to work "offline" with a virtual robot.
Hope this helps.
听起来是一个很难实施的想法。 好吧,对于 VB,您只能使用 MDX 1.1(附带 DirectX SDK)或 SlimDX(或其他第 3 方托管 DirectX 包装器)。 最新的 XNA(MDX 1.1/2.0b 的替代品)仅适用于 C# 编码器。 您可以尝试一些解决方法,但不推荐,您也不会这样做得到社会各界的大力支持。 这些是让 VB 显示一些 3D 内容所需的最少内容。
如果你想省点麻烦,你可以使用现成的游戏引擎来简化你的工作。 尝试Ogre,它是托管包装MOgre。 它是我的项目的候选者之一。 但由于 Ogre 不能很好地支持视频,我最终选择了 SlimDX。 但既然视频不是你的要求,你真的可以考虑一下。 大多数示例也是 C# 语言,因此您需要转换为 VB.Net 才能使用。 这不会很难。
更困难的部分来了,您需要将从 SolidWorks 导出的模型导出为 DirectX 格式 (*.x)。 我在谷歌上进行了快速搜索,只找到了一些付费工具来做到这一点。 您可能需要花一些时间或者花更多时间寻找免费的转换器工具。
就是这样。 如果您还有更多问题,请再次发帖。 祝你好运
Sounds like a tough idea to implement. Well, for VB you are stuck with MDX 1.1(Comes with DirectX SDK) or SlimDX (or other 3rd party Managed DirectX wrapper). The latest XNA (replacement for MDX 1.1/2.0b) is only available for C# coder. You can try some workaround but it's not recommended and you won't get much community support. These are the least you need to get your VB to display some 3d stuffs.
If you want to save some trouble, you could use ready made game engine to simplified you job. Try Ogre, and it's managed wrapper MOgre. It was one of the candidate for my project. But I ended up with SlimDX due to Ogre not supporting video very well. But since video is not your requirement, you can really consider it. Most sample would be in C# also, so you need to convert to VB.Net to use. It won't be hard.
Here comes the harder part, you need to export your model exported from SolidWorks to DirectX Format (*.x). I did a quick search in google and only found a few paid tools to do that. You might need to spend a bit on that or spend more time looking for free converter tools.
That's about it. If you have more question, post again. Good Luck