# 節點的索引

本索引提供此手冊中所用所有節點的附加資訊，以及您可能認為有用的其他元件。這只是 Dynamo 所提供 500 個節點中部分節點的簡介。

## 顯示

### 顏色

|   |                                                                          |   |
| - | ------------------------------------------------------------------------ | - |
|   | 建立                                                                       |   |
|   | <p><strong>Color.ByARGB</strong><br>依 Alpha、紅色、綠色與藍色等組成來建構顏色。</p>        | ! |
| ! | <p><strong>Color Range</strong><br>從開始顏色與結束顏色之間的顏色漸層取得顏色。</p>            |   |
|   | 動作                                                                       |   |
|   | <p><strong>Color.Brightness</strong><br>取得此顏色的亮度值。</p>                   |   |
| ! | <p><strong>Color.Components</strong><br>依照以下順序列示顏色組成：Alpha、紅色、綠色、藍色。</p> | ! |
|   | <p><strong>Color.Saturation</strong><br>取得此顏色的飽和度值</p>                   | ! |
|   | <p><strong>Color.Hue</strong><br>取得此顏色的色相值。</p>                          | ! |
|   | 查詢                                                                       |   |
| ! | <p><strong>Color.Alpha</strong><br>找出顏色的 Alpha 組成 (0 到 255)。</p>         | ! |
|   | <p><strong>Color.Blue</strong><br>找出顏色的藍色組成 (0 到 255)。</p>               | ! |
|   | <p><strong>Color.Green</strong><br>找出顏色的綠色組成 (0 到 255)。</p>              | ! |
|   | <p><strong>Color.Red</strong><br>找出顏色的紅色組成 (0 到 255)。</p>                | ! |

|   |                                                                      |   |
| - | -------------------------------------------------------------------- | - |
|   | 建立                                                                   |   |
|   | <p><strong>GeometryColor.ByGeometryColor</strong><br>使用顏色顯示幾何圖形。</p> | ! |

### Watch

|   |                                                        |   |
| - | ------------------------------------------------------ | - |
|   | 動作                                                     |   |
| ! | <p><strong>View\.Watch</strong><br>視覺化節點的輸出。</p>       | ! |
| ! | <p><strong>View\.Watch 3D</strong><br>展示幾何圖形的動態預覽。</p> | ! |

## 輸入

|   |                                                                |   |
| - | -------------------------------------------------------------- | - |
|   | 動作                                                             |   |
|   | <p><strong>Boolean</strong><br>在 true 與 false 之間進行選取。</p>      | ! |
| ! | <p><strong>Code Block</strong><br>允許直接編寫 DesignScript 程式碼。</p> | ! |
| ! | <p><strong>Directory Path</strong><br>可讓您選取系統上的目錄，以取得其路徑</p>   | ! |
| ! | <p><strong>File Path</strong><br>可讓您選取系統中的檔案，以取得其檔名</p>        | ! |
| ! | <p><strong>Integer Slider</strong><br>產生整數值的滑棒。</p>            | ! |
|   | <p><strong>Number</strong><br>建立數字。</p>                        |   |
| ! | <p><strong>Number Slider</strong><br>產生數值的滑棒。</p>              | ! |
|   | <p><strong>String</strong><br>建立字串。</p>                        | ! |
| ! | <p><strong>Object.IsNull</strong><br>判定給定物件是否為空值。</p>          | ! |

## 清單

|   |                                                                                              |   |
| - | -------------------------------------------------------------------------------------------- | - |
|   | 建立                                                                                           |   |
| ! | <p><strong>List.Create</strong><br>從給定的輸入製作新清單。</p>                                          | ! |
| ! | <p><strong>List.Combine</strong><br>將結合器套用至兩個序列中的每個元素</p>                                    | ! |
|   | <p><strong>Number Range</strong><br>建立指定範圍內的一系列數字</p>                                        |   |
|   | <p><strong>Number Sequence</strong><br>建立一系列數字。</p>                                          | ! |
|   | 動作                                                                                           |   |
| ! | <p><strong>List.Chop</strong><br>將一個清單細分為一組清單 (其中每個清單包含指定數量的項目)。</p>                         | ! |
|   | <p><strong>List.Count</strong><br>傳回給定清單中儲存的項目數目。</p>                                        | ! |
| ! | <p><strong>List.Flatten</strong><br>依特定數量展開清單的巢狀清單。</p>                                      | ! |
| ! | <p><strong>List.FilterByBoolMask</strong><br>查看個別布林清單中的對應索引來篩選順序。</p>                        | ! |
| ! | <p><strong>List.GetItemAtIndex</strong><br>取得給定清單中位於指定索引處的項目。</p>                            | ! |
|   | <p><strong>List.Map</strong><br>將函數套用至清單的所有元素，從結果產生新清單</p>                                   | ! |
|   | <p><strong>List.Reverse</strong><br>建立新的清單，其中包含給定清單的項目，但以逆向順序排列</p>                          | ! |
| ! | <p><strong>List.ReplaceItemAtIndex</strong><br>取代給定清單中位於指定索引處的項目。</p>                        | ! |
| ! | <p><strong>List.ShiftIndices</strong><br>將清單中的索引向右移動給定數量</p>                                 | ! |
| ! | <p><strong>List.TakeEveryNthItem</strong><br>在給定的偏移之後，擷取給定清單中索引是給定值倍數的項目。</p>                | ! |
| ! | <p><strong>List.Transpose</strong><br>在清單的清單中交換列與欄。如果某些列短於其他列，會在結果陣列中插入空值作為預留位置，以便其永遠為矩形</p> | ! |

## 邏輯

|                                                                                                                                                                                                   |                                                                                      |   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | - |
|                                                                                                                                                                                                   | 動作                                                                                   |   |
| ![](https://1226582865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmuqshfgEG0ZvIFN5DRfA%2Fuploads%2Fgit-blob-7309f56b92340e49cf9390a21ead106bcb987a0d%2FIf.jpg?alt=media) | <p><strong>If</strong><br>條件陳述式。檢查測試輸入的布林值。如果測試輸入為 true，結果會輸出真實的輸入，否則結果會輸出虛假的輸入。</p> | ! |

## 數學

|   |                                                                       |   |
| - | --------------------------------------------------------------------- | - |
|   | 動作                                                                    |   |
| ! | <p><strong>Math.Cos</strong><br>計算角度的餘弦值。</p>                         | ! |
| ! | <p><strong>Math.DegreesToRadians</strong><br>將以度表示的角度轉換為以弳度表示的角度。</p> | ! |
| ! | <p><strong>Math.Pow</strong><br>計算數值的指定次方。</p>                        | ! |
| ! | <p><strong>Math.RadiansToDegrees</strong><br>將以弳度表示的角度轉換為以度表示的角度。</p> | ! |
| ! | <p><strong>Math.RemapRange</strong><br>調整數字清單的範圍，同時保留分配比率。</p>        | ! |
| ! | <p><strong>Math.Sin</strong><br>計算角度的正弦值。</p>                         | ! |
|   | <p><strong>Map</strong><br>將值對映到輸入範圍</p>                              | ! |

## 字串

|   |                                                                            |   |
| - | -------------------------------------------------------------------------- | - |
|   | 動作                                                                         |   |
| ! | <p><strong>String.Concat</strong><br>將多個字串連接成單一字串。</p>                     | ! |
| ! | <p><strong>String.Contains</strong><br>判定給定的字串是否包含給定的子字串。</p>              | ! |
| ! | <p><strong>String.Join</strong><br>將多個字串連接成單一字串，同時在接合的每個字串之間插入給定的分隔符號。</p> | ! |
| ! | <p><strong>String.Split</strong><br>將單一字串分割為字串清單，分割位置由給定的分隔符號字串決定。</p>     | ! |
| ! | <p><strong>String.ToNumber</strong><br>將字串轉換為整數或倍精數。</p>                   | ! |

## 幾何圖形

### 圓

|   |                                                                                               |   |
| - | --------------------------------------------------------------------------------------------- | - |
|   | 建立                                                                                            |   |
| ! | <p><strong>Circle.ByCenterPointRadius</strong><br>使用輸入中心點和世界 XY 平面中的半徑，並以世界 Z 為法線，來建立一個圓。</p> | ! |
| ! | <p><strong>Circle.ByPlaneRadius</strong><br>在輸入平面建立一個中心點在輸入平面原點 (根)、具有給定半徑的圓。</p>             | ! |

|   |                                                                                                   |   |
| - | ------------------------------------------------------------------------------------------------- | - |
|   | 建立                                                                                                |   |
| ! | <p><strong>CoordinateSystem.ByOrigin</strong><br>建立一個原點在輸入點、X 與 Y 軸分別設定為 WCS X 軸與 Y 軸的座標系統</p>    | ! |
|   | <p><strong>CoordinateSystem.ByCylindricalCoordinates</strong><br>以相對於指定座標系統的指定圓柱座標參數，建立一個座標系統</p> | ! |

### 立方體

|   |                                                                                                    |   |
| - | -------------------------------------------------------------------------------------------------- | - |
|   | 建立                                                                                                 |   |
| ! | <p><strong>Cuboid.ByLengths</strong><br>建立一個中心點在 WCS 原點，且具有長度、寬度、高度的立方體。</p>                       | ! |
|   | <p><strong>Cuboid.ByLengths</strong> (origin)</p><p>建立一個中心點在輸入點，具有指定寬度、長度及高度的立方體。</p>              | ! |
|   | <p><strong>Cuboid.ByLengths</strong> (coordinateSystem)</p><p>建立一個中心點在 WCS 原點，且具有長度、寬度、高度的立方體。</p> | ! |
|   | <p><strong>Cuboid.ByCorners</strong></p><p>建立一個從低點跨距到高點的立方體。</p>                                   | ! |
| ! | <p><strong>Cuboid.Length</strong></p><p>傳回立方體的輸入尺寸，而不是實際世界的空間尺寸。</p>                               | ! |
|   | <p><strong>Cuboid.Width</strong></p><p>傳回立方體的輸入尺寸，而不是實際世界的空間尺寸。</p>                                | ! |
|   | <p><strong>Cuboid.Height</strong></p><p>傳回立方體的輸入尺寸，而不是實際世界的空間尺寸。</p>                               | ! |
| ! | <p><strong>BoundingBox.ToCuboid</strong></p><p>取得邊界框做為實體立方體</p>                                    | ! |

{% hint style="warning" %}
\*\*換句話說，如果您建立一個立方體寬度 (X 軸) 長度為 10，然後將其轉換為 X 軸 2 倍比例的座標系統，則寬度仍為 10。ASM 不允許您以任何可預測的順序擷取本體的頂點，因此在轉換後無法決定尺寸。
{% endhint %}

### 曲線

|   |                                                                                                        |   |
| - | ------------------------------------------------------------------------------------------------------ | - |
|   | 動作                                                                                                     |   |
| ! | <p><strong>Curve.Extrude</strong> (distance)<br>在法線向量的方向擠出曲線。</p>                                      | ! |
| ! | <p><strong>Curve.PointAtParameter</strong><br>取得曲線上位於 StartParameter() 與 EndParameter() 之間指定參數處的點。</p> | ! |

### 幾何圖形修改子

|   |                                                                           |   |
| - | ------------------------------------------------------------------------- | - |
|   | 動作                                                                        |   |
| ! | <p><strong>Geometry.DistanceTo</strong><br>取得此幾何圖形距其他幾何圖形的距離。</p>         | ! |
| ! | <p><strong>Geometry.Explode</strong><br>將複合元素或非單獨元素分開為組成部分</p>            | ! |
| ! | <p><strong>Geometry.ImportFromSAT</strong><br>匯入的幾何圖形的清單</p>              | ! |
| ! | <p><strong>Geometry.Rotate</strong> (basePlane)<br>繞平面原點及法線將物件旋轉指定度數。</p> | ! |
| ! | <p><strong>Geometry.Translate</strong><br>將任何幾何圖形類型在給定方向平移給定距離。</p>       | ! |

### 直線

|   |                                                                                       |   |
| - | ------------------------------------------------------------------------------------- | - |
|   | 建立                                                                                    |   |
| ! | <p><strong>Line.ByBestFitThroughPoints</strong><br>建立一條與點的散射圖最近似的線。</p>               | ! |
| ! | <p><strong>Line.ByStartPointDirectionLength</strong><br>建立一條從某點開始，沿向量方向延伸指定長度的直線。</p> | ! |
| ! | <p><strong>Line.ByStartPointEndPoint</strong><br>在兩個輸入點之間建立一條直線。</p>                  | ! |
| ! | <p><strong>Line.ByTangency</strong><br>建立一條在輸入曲線的參數點位置與輸入曲線相切的線。</p>                  | ! |
|   | 查詢                                                                                    |   |
| ! | <p><strong>Line.Direction</strong><br>曲線的方向。</p>                                      | ! |

### NurbsCurve

|   |                                                                               |   |
| - | ----------------------------------------------------------------------------- | - |
|   | 建立                                                                            |   |
| ! | <p><strong>NurbsCurve.ByControlPoints</strong><br>使用明確控制點建立 BSplineCurve。</p> | ! |
| ! | <p><strong>NurbsCurve.ByPoints</strong><br>透過在點之間進行內插來建立 BSplineCurve</p>     | ! |

### NurbsSurface

|   |                                                                                                   |   |
| - | ------------------------------------------------------------------------------------------------- | - |
|   | 建立                                                                                                |   |
| ! | <p><strong>NurbsSurface.ByControlPoints</strong><br>使用明確控制點建立一個具有指定 U 與 V 次數的 NurbsSurface。</p>   | ! |
| ! | <p><strong>NurbsSurface.ByPoints</strong><br>建立一個具有指定內插點及 U 與 V 次數的 NurbsSurface。產生的曲面將通過所有點。</p> | ! |

### 平面

|   |                                                                         |   |
| - | ----------------------------------------------------------------------- | - |
|   | 建立                                                                      |   |
| ! | <p><strong>Plane.ByOriginNormal</strong><br>建立一個中心點在根點，具有輸入法線向量的平面。</p> | ! |
| ! | <p><strong>Plane.XY</strong><br>在世界 XY 建立一個平面</p>                       | ! |

### 點

|   |                                                                                     |   |
| - | ----------------------------------------------------------------------------------- | - |
|   | 建立                                                                                  |   |
| ! | <p><strong>Point.ByCartesianCoordinates</strong><br>在有 3 個直角座標的給定座標系統中產生一點</p>      | ! |
| ! | <p><strong>Point.ByCoordinates</strong> (2d)<br>在 XY 平面中給定 2 個直角座標產生一點。Z 分量是 0。</p> | ! |
| ! | <p><strong>Point.ByCoordinates</strong> (3d)<br>給定 3 個直角座標產生一點。</p>                 | ! |
| ! | <p><strong>Point.Origin</strong><br>取得原點 (0,0,0)</p>                                | ! |
|   | 動作                                                                                  |   |
| ! | <p><strong>Point.Add</strong><br>對點加入向量。與 Translate (Vector) 相同。</p>                | ! |
|   | 查詢                                                                                  |   |
| ! | <p><strong>Point.X</strong><br>取得點的 X 分量</p>                                        | ! |
| ! | <p><strong>Point.Y</strong><br>取得點的 Y 分量</p>                                        | ! |
| ! | <p><strong>Point.Z</strong><br>取得點的 Z 分量</p>                                        | ! |

### Polycurve

|   |                                                                                                   |   |
| - | ------------------------------------------------------------------------------------------------- | - |
|   | 建立                                                                                                |   |
| ! | <p><strong>Polycurve.ByPoints</strong><br>根據連接點的一系列線建立 PolyCurve。若要取得封閉的曲線，最後一個點應該與起點位於相同的位置。</p> | ! |

### 矩形

|   |                                                                                                                |   |
| - | -------------------------------------------------------------------------------------------------------------- | - |
|   | 建立                                                                                                             |   |
| ! | <p><strong>Rectangle.ByWidthLength</strong> (Plane)<br>建立一個中心點在輸入平面根，具有輸入寬度 (平面 X 軸長度) 與長度 (平面 Y 軸長度) 的矩形。</p> | ! |

### 圓球

|   |                                                                                |   |
| - | ------------------------------------------------------------------------------ | - |
|   | 建立                                                                             |   |
| ! | <p><strong>Sphere.ByCenterPointRadius</strong><br>建立一個中心點在輸入點，具有給定半徑的實體圓球。</p> | ! |

### 曲面

|   |                                                                        |   |
| - | ---------------------------------------------------------------------- | - |
|   | 建立                                                                     |   |
| ! | <p><strong>Surface.ByLoft</strong><br>透過在輸入斷面曲線之間進行斷面混成來建立曲面</p>       | ! |
| ! | <p><strong>Surface.ByPatch</strong><br>透過填滿輸入曲線所定義之封閉邊界的內部來建立曲面。</p>   |   |
|   | 動作                                                                     |   |
| ! | <p><strong>Surface.Offset</strong><br>沿曲面法線方向，將曲面偏移指定的距離</p>           | ! |
|   | <p><strong>Surface.PointAtParameter</strong><br>傳回指定的 U 與 V 參數處的點。</p> | ! |
|   | <p><strong>Surface.Thicken</strong><br>將曲面增厚為實體，沿曲面法線的方向朝曲面兩側擠出。</p>   | ! |

### UV

|   |                                                          |   |
| - | -------------------------------------------------------- | - |
|   | 建立                                                       |   |
| ! | <p><strong>UV.ByCoordinates</strong><br>從兩個倍精數建立 UV。</p> | ! |

### 向量

|   |                                                                   |   |
| - | ----------------------------------------------------------------- | - |
|   | 建立                                                                |   |
| ! | <p><strong>Vector.ByCoordinates</strong><br>由 3 個歐幾里得座標形成一個向量</p> | ! |
|   | <p><strong>Vector.XAxis</strong><br>取得標準 X 軸向量 (1,0,0)</p>        | ! |
|   | <p><strong>Vector.YAxis</strong><br>取得標準 Y 軸向量 (0,1,0)</p>        | ! |
|   | <p><strong>Vector.ZAxis</strong><br>取得標準 Z 軸向量 (0,0,1)</p>        | ! |
|   | 動作                                                                |   |
| ! | <p><strong>Vector.Normalized</strong><br>取得向量的正規化版本</p>           | ! |

## 座標系統

|   |                                                                                                   |   |
| - | ------------------------------------------------------------------------------------------------- | - |
|   | 建立                                                                                                |   |
| ! | <p><strong>CoordinateSystem.ByOrigin</strong><br>建立一個原點在輸入點、X 與 Y 軸分別設定為 WCS X 軸與 Y 軸的座標系統</p>    | ! |
|   | <p><strong>CoordinateSystem.ByCylindricalCoordinates</strong><br>以相對於指定座標系統的指定圓柱座標參數，建立一個座標系統</p> | ! |

## 運算子

|   |                                                    |   |
| - | -------------------------------------------------- | - |
| ! | <p><strong>+</strong><br>加</p>                     | ! |
| ! | <p><strong>-</strong><br>減</p>                     | ! |
| ! | <p><strong>\*</strong><br>乘</p>                    | ! |
| ! | <p><strong>/</strong><br>分區</p>                    | ! |
|   | <p><strong>%</strong><br>模除會計算第一個輸入除以第二個輸入後的餘數</p> | ! |
|   | <p><strong><</strong><br>小於</p>                    | ! |
| ! | <p><strong>></strong><br>大於</p>                    | ! |
| ! | <p><strong>==</strong><br>相等性會測試兩個值是否相等。</p>       | ! |
