跳到主要内容

export_stl

类型: 函数
领域: 建模与几何
推荐导入: from cadflow import export_stl

签名

def export_stl(shapes: 'Union[AnyShape, Sequence[AnyShape]]', filename: 'str') -> 'None'

功能说明

export_stl 是 CadFlow 建模与几何领域的公共函数。

原始 API 说明

Export shapes to STL.

其他公共导入路径

  • from cadflow import to_stl

参数

名称类型必需默认值源码说明
shapes'Union[AnyShape, Sequence[AnyShape]]'-A single Compound, Solid, or Face, or any nested sequence of those. Lists of Solid are supported directly, including pattern or explicitly collected multi-shape results.
filename'str'-Output STL file path.

返回值

类型: 'None'

None: Writes the provided shapes into one STL file.

Usage: Use this function when you want to export one compound, solid, or face into the same STL file. Passing List[Solid] is valid for pattern outputs or explicit shape collections. Boolean operations return a single Solid.

异常

源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。

行为与约束

  • 该操作会写入外部产物。交付前应验证返回路径或输出文件。

导入检查

from cadflow import export_stl

相关内容