CST 2020 使用 Python 3.6 设置四面体网格
使用 Python 3.6 和 CST 2020 设置四面体网格的代码示例。
sCommand = ['With CSTApplication',
'.Reset',
'.SetActiveTool 'Mesh'',
'.Reset',
'End With',
'With CSTApplication.Selection',
'.MeshType 2',
'End With']
sCommand = line_break.join(sCommand)
modeler.add_to_history("set tet mesh", sCommand)
该代码首先使用 .SetActiveTool 将 CST 的当前工具设置为 'Mesh',然后使用 .Reset 进行重置。接下来,使用 CSTApplication.Selection 对象来进行网格设置,并使用 .MeshType 2 将网格类型设置为四面体网格。
请注意,虽然这段代码在 CST 2020 中应该能够正确设置网格类型,但具体操作可能还取决于你的 CST 版本和所需操作的复杂性。如果你遇到任何问题,建议查阅 CST 的 API 文档或咨询相关技术支持以获得更准确的指导。
感谢你的理解!
原文地址: http://www.cveoy.top/t/topic/B0Y 著作权归作者所有。请勿转载和采集!