英文:
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进行交互的流程大致如下:
- 连接到STK
- 创建新的场景或附加到已打开的场景
- 添加新对象(在你的情况下可能是卫星,根据你在另一个问题中提到的)
- 有用于设置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:
- Connect to STK
- Make a new scenario or attach to an open one
- Add a new object (a satellite in your case I think you said in your other question)
- 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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论