Sure, here’s the translation: “我可以使用Python创建.mdl模型吗?”

huangapple go评论57阅读模式
英文:

Can I create .mdl models using python?

问题

我应该使用Python创建或至少组装现有的.mdl模型。

这是否可行,如果是,有人能帮助我吗?

我进行了一些研究,但没有找到有用的信息。

英文:

I am supposed to create or at least assemble existing .mdl models using python.

Is that possible and if yes, could someone help me out.

I did some research, but didnt find anything helpful.

答案1

得分: 0

Nik,我在你的另一篇帖子中看到这是一个学校项目。我不知道你有多少时间,但STK认证培训在线是免费的,可以确保你掌握了基础知识。如果你想直接深入学习,这个链接部分介绍了与STK的Python集成:https://help.agi.com/stk/index.htm#training/StartPython.htm

关于STK中的.mdl文件,这些在STK在线帮助中有描述:https://help.agi.com/stk/#vo/models-01.htm?TocPath=How%2520to%2520Use%2520STK%257CVisualization%257C3D%2520Graphics%2520(Globe)%2520Window%257CUsing%2520Models%257CCreating%2520an%2520MDL%2520Model%257C_____0

你可以通过从3D基本形状(圆柱体、立方体、球等)构建来创建.mdl格式的对象。通常情况下,完整的STK安装包含大量的mdl模型,你可以使用或学习(mdl文件是纯文本)。我的STK安装路径是C:\Program Files\AGI\STK 12\STKData\VO\Models

以编程方式与STK进行交互的流程大致如下:

  1. 连接到STK
  2. 创建新的场景或附加到已打开的场景
  3. 添加新对象(在你的情况下可能是卫星,根据你在另一个问题中提到的)
  4. 有用于设置3D模型(.mdl)的属性,你需要提供文件路径。

如果你在STK界面中创建了场景并插入了对象,那么应该能够认出这个流程。

在线AGI帮助中有很多示例。我的本地STK安装还附带了一个位于C:\Program Files\AGI\STK 12\CodeSamples\CodeSamples.zip 的ZIP文件,其中包含了6种不同编程语言的示例,包括Python。

英文:

Nik, I see in your other post that this is for a school project. I don't know how much time you have, but the STK certification training online is free and would make sure you have the fundamentals. If you want to jump right into the middle, this link is part way through the level 2 path and talks about working with Python integration with STK: https://help.agi.com/stk/index.htm#training/StartPython.htm

Regarding .mdl files in STK, those are described in the STK online help: https://help.agi.com/stk/#vo/models-01.htm?TocPath=How%2520to%2520Use%2520STK%257CVisualization%257C3D%2520Graphics%2520(Globe)%2520Window%257CUsing%2520Models%257CCreating%2520an%2520MDL%2520Model%257C_____0

You can make an object in mdl format by building up from 3D primitives (cylinders, cubes, sphere's etc.). A full STK install usually has a treasure trove of mdl models you can use or study (mdl files are plain text). My STK install has them at C:\Program Files\AGI\STK 12\STKData\VO\Models

The flow of programmatically interfacing with STK is something like this:

  1. Connect to STK
  2. Make a new scenario or attach to an open one
  3. Add a new object (a satellite in your case I think you said in your other question)
  4. There are properties for setting the 3D model (.mdl) where you provide the file path to the file.

If you've created scenarios and inserted objects in the STK UI, then you should recognize this flow.

There are a lot of examples in the online AGI help. My local STK installation also came with a zip file at C:\Program Files\AGI\STK 12\CodeSamples\CodeSamples.zip which has subfolders for 6 different languages, including Python.

huangapple
  • 本文由 发表于 2023年4月11日 01:00:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/75979053.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定