元编程参考文档

CAD 导入

3 个节点

本页内容 3

读取网格

函数

A closed mesh read from a file as an exact solid of flat faces, OpenSCAD's import() of STL, OFF, OBJ and 3MF: corners closer than the tolerance are one corner, triangles in one plane one face, and the faces are built as Cad.Polyhedron builds them - a solid of the kernel's own kind, which the words pick faces of, a fillet rounds and STEP carries. The colours of a 3MF file's triangles are painted on their faces (Cad.Color), and triangles of different colours are never one face. A mesh that does not close round a volume is refused, saying where.

签名
读取网格(路径: 文本, 容差: 数字, 名称: 文本) -> Cad Model
CadModel ReadMesh(
    string path,
    double tolerance = 1E-06,
    string name = "")

参数

名称类型默认值说明
路径文本—The file: .stl (ASCII or binary), .off, .obj or .3mf; every object of a 3MF file is one body.
容差数字1E-06The model's tolerance, in its units: how close corners are to be one.
名称文本—它的组叫什么;留空则用操作的种类,例如 "Box"。组名为这个名称加上部分,例如 "Boss top"。

返回

结果Cad Model
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
CAD 导入
所属包
计算机辅助设计

读取图纸

函数

A flat shape read from a drawing, OpenSCAD's import() of SVG and DXF.

签名
读取图纸 -> Cad Shape
    路径: 文本
    图层: 文本
    每英寸像素: 数字
    容差: 数字
CadShape ReadShape(
    string path,
    string layer = "",
    double dpi = 96,
    double tolerance = 1E-06)

参数

名称类型默认值说明
路径文本—The drawing: .svg or .dxf.
图层文本—For a DXF file, the layer to read; empty for every layer.
每英寸像素数字96For an SVG file, how many of its pixels make an inch.
容差数字1E-06The model's tolerance, in its units.

返回

结果Cad Shape
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
CAD 导入
所属包
计算机辅助设计

读取 STEP

函数

Reads STEP and converts coordinates to the chosen target unit. Preserves free geometry and import warnings.

签名
读取 STEP -> Cad Import Result
    路径: 文本
    目标单位: Length Unit
    容差: 数字
CadImportResult ReadStep(
    string path,
    LengthUnit targetUnit = LengthUnit.Millimeter,
    double tolerance = 1E-06)

参数

名称类型默认值说明
路径文本—
目标单位Length Unit毫米
容差数字1E-06

返回

结果Cad Import Result
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
CAD 导入
所属包
计算机辅助设计