元編程參考文件

CAD 匯出

6 個節點

本頁內容 6

寫入 3MF

函數

Writes a 3MF package (3D Manufacturing Format, the core specification's model with base materials), the format slicers read colour from: each body one object, a closed mesh tessellated as CadExport.WriteStl tessellates, each triangle in the colour of the face it was cut from, with its alpha. Faces never painted are left in no material and the object takes the slicer's own colour. Unit declares the units of the unchanged coordinates.

簽名
寫入 3MF
    模型: Cad Model
    路徑: 文字
    單位: Length Unit
    質量: Cad Preview Options
void Write3mf(
    CadModel model,
    string path,
    LengthUnit unit = LengthUnit.Millimeter,
    CadPreviewOptions quality)

參數

名稱型別預設值說明
模型Cad Model—The bodies; each must be a closed solid, as 3MF requires.
路徑文字—Where to write, overwritten if it is there.
單位Length Unit毫米What one model unit is.
質量Cad Preview Options—How finely to tessellate; null for the preview's.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
CAD 匯出
所屬包
電腦輔助設計

寫入 DXF

函數

Writes a flat shape as a DXF drawing, as OpenSCAD exports a 2D object: its boundaries as lines, arcs and polylines on one layer, curves other than lines and arcs followed by polylines within the tolerance (the kernel's DxfWriter).

簽名
寫入 DXF(形狀: Cad Shape, 路徑: 文字, 容差: 數字)
void WriteDxf(
    CadShape shape,
    string path,
    double tolerance = 1E-06)

參數

名稱型別預設值說明
形狀Cad Shape—The shape.
路徑文字—Where to write, overwritten if it is there.
容差數字1E-06How far polylines standing in for other curves may stray from them.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
CAD 匯出
所屬包
電腦輔助設計

寫入 OFF

函數

Writes the bodies as one OFF file (Object File Format, which OpenSCAD reads and writes), tessellated as CadExport.WriteStl tessellates, each body a closed mesh of shared corners, its faces counter-clockwise seen from outside.

簽名
寫入 OFF(模型: Cad Model, 路徑: 文字, 質量: Cad Preview Options)
void WriteOff(
    CadModel model,
    string path,
    CadPreviewOptions quality)

參數

名稱型別預設值說明
模型Cad Model—The bodies.
路徑文字—Where to write, overwritten if it is there.
質量Cad Preview Options—How finely to tessellate; null for the preview's.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
CAD 匯出
所屬包
電腦輔助設計

寫入 STEP

函數

Writes all exact B-reps to STEP, retaining disconnected bodies. Unit declares the units of the unchanged coordinates; it does not rescale them.

簽名
寫入 STEP
    模型: Cad Model
    路徑: 文字
    單位: Length Unit
    容差: 數字
void WriteStep(
    CadModel model,
    string path,
    LengthUnit unit = LengthUnit.Millimeter,
    double tolerance = 1E-06)

參數

名稱型別預設值說明
模型Cad Model—
路徑文字—
單位Length Unit毫米
容差數字1E-06
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
CAD 匯出
所屬包
電腦輔助設計

寫入 STL

函數

Writes an explicitly tessellated binary STL. STL has no unit metadata; choose model units before modeling. With no quality given, the model is tessellated as its preview is, at its own scale: chords within 0.1% of its bounding diagonal, 20° between normals.

簽名
寫入 STL(模型: Cad Model, 路徑: 文字, 質量: Cad Preview Options)
void WriteStl(
    CadModel model,
    string path,
    CadPreviewOptions quality)

參數

名稱型別預設值說明
模型Cad Model—
路徑文字—
質量Cad Preview Options—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
CAD 匯出
所屬包
電腦輔助設計

寫入 SVG

函數

Writes a flat shape as an SVG drawing, as OpenSCAD exports a 2D object: one filled path, even-odd so that holes stay holes, in millimetres with Y running up the page as it does in the model, on a page that is the shape's box. Lines, arcs and Béziers are written exactly - lines as lines, arcs as SVG arcs, curves of degree three or less as Béziers - and other curves as lines within the tolerance. An SVG's coordinates are its page's, so read back (CadImport.ReadShape) the shape stands with its box's lower-left corner at the origin; DXF keeps the model's coordinates.

簽名
寫入 SVG(形狀: Cad Shape, 路徑: 文字, 容差: 數字)
void WriteSvg(
    CadShape shape,
    string path,
    double tolerance = 1E-06)

參數

名稱型別預設值說明
形狀Cad Shape—The shape.
路徑文字—Where to write, overwritten if it is there.
容差數字1E-06How far lines standing in for other curves may stray from them.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
CAD 匯出
所屬包
電腦輔助設計