操作限制條件
當建立草圖或開啟草圖來編輯時,才會提供並顯示限制條件。

套用至兩個草圖中圖元間的限制條件 (例如,當您 [使用] 來自一個草圖的圖元至另一個草圖中) 會以藍色的背景來區隔。可能可以手動套用限制條件,某些限制條件會於您繪製草圖幾何時建立。當移動游標暫留時,所參考限制條件的背景是深藍色的:
如上所示的使用限制條件 (藍色背景) 將矩形草圖的頂點限制在圓草圖中圓的圓心上。



「限制條件」草圖工具可讓您在建立草圖或開啟草圖來編輯時檢視與修改限制條件。套用至兩個草圖中圖元間的限制條件 (例如,當您使用來自一個草圖的圖元至另一個草圖中) 會以藍色的背景來區隔。可能可以手動套用限制條件,某些限制條件會於您繪製草圖幾何時建立。當移動游標暫留時,所參考限制條件的背景是深藍色的。
可用的限制條件如下:重合、同心、平行、相切、水平、立式垂直、正交垂直、等長、中點、垂直、貫穿、對稱、固定與曲率。可以使用推斷來將限制條件自動加入草圖中,或使用工具列來手動加入。
在這個範例中,於垂直建構線與圓之間加入了中點限制條件。 先選擇圓的中點,然後選擇建構線。按一下草圖工具列中的「中點」限制條件。這個操作過程適用於不同的限制條件。另一個方法是您可以先從草圖工具列中選擇「中點」限制條件,然後再選擇建構線與圓。

若要套用工程圖限制條件,您可以使用下列方法之一:
-
從功能表中選擇限制條件 (或使用相對應的快速鍵),然後在草圖中選擇要套用限制的圖元。
-
選擇草圖圖元,然後按一下工具列限制條件功能表中的限制條件。
工具列限制條件功能表中提供下列的限制條件:
-
重合 - 使兩或多個草圖圖元共享草圖中的同一位置。
-
同心 - 使任何點與弧心或圓心重合。同時讓選取的弧與圓共享中心點。
-
平行 - 使兩或多條直線互為平行。
-
相切 - 使兩個草圖圖元間,或一個草圖圖元與一平面間有相切的限制條件。
-
水平 - 將一或多條直線或一組點限制為水平的。
-
立式垂直 - 將一或多條直線或一組點限制為立式垂直的。
-
正交垂直 - 使兩條直線互為垂直。
-
等長 - 使得多條線等長,或多個弧有相同的半徑。
-
中點 - 將一個草圖點限制在直線或弧的中點上。
-
垂直 - 使一曲線與直線,或一曲線與一平面垂直。
-
貫穿 - 使草圖圖元與使用中草圖平面外的另一圖元重合。
-
對稱 - 使相同類型的兩個圖元相對於一直線、平面或線性邊線對稱。
-
固定 - 將草圖圖元鎖於草圖平面上使其無法移動。
-
曲率 - 建立草圖樣條或圓錐與相鄰幾何間的曲率連續轉換。

在草圖是開啟的情況下,移動游標暫留至一草圖圖元上,例如直線或弧來查看該圖元的限制條件。當您移動滑鼠暫留至圖元上時,僅會出現強調顯示圖元的限制條件。若要保持所有的限制條件都顯示可見,移動滑鼠時請使用 Shift 鍵。
移動游標暫留時圖元會以橘色被強調顯示,例外的情況是參考的限制條件會有藍色的背景,移動暫留時會是深藍色的。當您選擇一個限制條件時,相關的圖元會以黃色強調顯示,對等的圖元也會被強調顯示。

並未在工具列的「限制條件」部分提供這些限制條件,但會在如下所述的特定操作過程中自動建立:
-
四分之一圓 - 將一個點限制為與橢圓以及該橢圓的主軸或副軸重合。可藉由推斷、拖曳項目至橢圓上各點或將項目放置在橢圓上各點來建立此限制條件。
-
使用 - 將在一個草圖中的草圖圖元限制為在另一個草圖中的草圖圖元。可以藉由選擇「使用」該工具,然後在原始的草圖或特徵中選擇一個圖元 (草圖圖元、面或邊線) 來建立此限制條件。
-
相交 - 將開放曲線的端點 (使用相交工具所產生而來) 限制為貫穿的限制條件
,使得端點落在相交面的邊線上;對於封閉的曲線,會使用相交限制條件來限制草圖圖元。

The color of sketch entities indicate its constrained status:
- Blue means under-constrained.
- Black means fully constrained.
- Red means a constraint problem (over-constrained).
The color of a constraint icon indicates its constrained status:
- Black on gray means well-defined.
- White on red indicates a problem.
- When selecting, non-fully constrained sketch points (blue and red) are prioritized over any overlapping, fully constrained sketch points (black).
Adding more dimensions or constraints will further constrain the sketch. Dragging entities may help you understand what constraints or dimensions you may want to add.

View and filter the sketch constraints and dimensions in order to analyze them and correct any sketch constraint errors.
Accessing the Constraint manager
From the Sketch dialog:
-
Click the Show sketch diagnostic tools icon (
).
-
Click Constraint manager.
The Constraint manager dialog opens:
Using the Constraint manager
From the Constraint manager dialog, you can do the following:
-
Filters - Collapse/Expand all dialog sections at once (Type, Mode, Status).
-
Automatically select constraints - When toggled on (default), any constraint selected in the Constraint manager dialog places a yellow bounding box around corresponding constraints in the sketch. When off, constraints will not have a bounding box placed around them (they are not selected).
This option is useful if you want to select only those constraints from a specific part of the sketch. For example, toggle this option off. Select the constraints Type you want to locate in the portion of your sketch (for example, coincident constraints in the example below). Then create a selection box around a portion of your sketch (a rectangle in the example below). Only constraints for that section display bounding boxes around them and are available from the Entities and constraints list (see below).
Disabling "Automatically select constraints" and then box-selecting the rectangle in the sketch (left). Once selected, the filters only apply to the selected sketch entity. In the example here, coincident constraints are only shown for the previously-selected rectangle (right).
-
Type - Select from a list of available constraints. For example, selecting Coincident places a yellow bounding box around all coincident constraints in the sketch (provided Automatically select constraints is enabled).
-
Mode - Select from the following 3 modes:
-
Internal - Selects constraints from the current sketch.
-
External - Selects constraints from external sources.
-
In context - Selects constraints referenced in context
-
-
Status - Select from the following 3 statuses:
-
Driven - Driven constraints. When selected, driven constraints are highlighted yellow. If they are under-constrained, they are highlighted a darker blue.
-
Solved - Solved constraints. When selected, solved constraints are highlighted yellow. If they are under-constrained, they are highlighted a darker blue.
-
Errors - Constraints in error. When selected, constraints in error are highlighted a darker red,
-
-
Sort by constraint - Sorts the Entities and constraints list below by constraint first, then entity second.
-
Sort by entity - Sorts the Entities and constraints list below by entity first, then constraint second.
-
Entities and constraints list - Displays all selected constraints, depending on the filter selections in the dialog. Hovering over a constraint or entity in the list highlights it in the sketch. From this list, you can:
-
Delete constraint (
) - Deletes the constraint from the sketch.
-
Remove selection (
) - Removes the constraint from the Entities and constraints list.
Sort by constraint (left); Sort by entity (right)
Right-click on a constraint or entity in the Entities and constraints list to access the following commands:
-
Delete constraint/entity - Deletes the selection (constraint or entity)
-
Zoom to selection - Zooms in to the selection (constraint or entity)
-
Hide external references - Hides all externally referenced constraints
-
Clear all - Clears all constraints from the Entities and constraints list
-
-
-
Delete all button - Deletes all selected constraints from the sketch.
Turning Constraint manager off
To turn off the Constraint manager, either:
-
Click X at the top right corner of the Constraint manager dialog.
-
Click the Show sketch diagnostic tools icon (
) and select Turn constraint manager off:
Tips
-
Select as many types, modes and statuses from the dialog to filter the constraints to what is selected. These filters can be used in any combination.
-
If Show constraints and Show errors are disabled in the Sketch dialog, hovering over the constraint in the Entities and constraints list displays only that constraint (and related entities) in the sketch:
-
Selecting an entity in the Entities and constraints list highlights the entity in light yellow:
-
Constraint manager also works with sketches in the Sheet metal flat pattern view:

您可以在限制條件圖示上使用的互動操作:
- 按一下並拖曳一個圖示或一組圖示至不同的位置。
- 在一個限制條件上暫留來查看哪些圖元被強調顯示,表示套用了限制條件於其上。
- 刪除限制條件:按一下一個限制條件然後按下 Delete,或從環境選單中選擇 [刪除]。
- 在草圖對話方塊中,核取顯示限制條件來顯示為草圖定義的所有限制條件。
- 衝突的限制條件會以紅色背景中的白色符號出現。
當繪製草圖時,如果曲線抓到推斷,限制條件指標會出現在滑鼠游標旁。

新增、套用與編輯限制條件來在 Onshape 中定義零件。當正在建立草圖或開啟草圖以編輯時,限制條件會列於草圖對話方塊中。
可以將限制條件套用至一個草圖的圖元之間,或套用至兩或多個草圖的圖元之間 (例如,當您使用來自一個草圖的圖元至另一個草圖中)。可以手動套用限制條件,某些限制條件會於您繪製草圖幾何時建立。關自動建立的限制條件的詳細資訊,請參考自動推斷。
在草圖對話方塊中,輕觸清單中的限制條件以強調顯示相關的草圖幾何。例如,如果將兩條直線限制為互為水平,則當您輕觸水平限制條件時,會同時強調顯示兩條直線。
新增、套用與編輯限制條件來在 Onshape 中定義零件。僅當建立草圖或開啟草圖來編輯時,才會提供並顯示限制條件。
關於在行動裝置上使用特定限制條件的資訊,請參考各個特定限制條件的主題。