自動推斷
Onshape 草圖編輯器可以自動將限制條件指派至某些圖元中。例如,建立一條直線然後將游標暫留在原點之上的直線端點,會出現虛線表示該端點與原點間的立式垂直推斷。
當繪製草圖時,Onshape 會顯示圖元與原點和/或另一個圖元間的水平與垂直對齊推斷。在某些情況中,只有將游標移動靠近另一個圖元來「喚醒」兩個圖元間的推斷時,推斷才會出現。某些常用的喚醒推斷包括:水平、立式垂直、中點、平行和重合。



Constraints are added to a sketch either through automatic inferencing or manually.
Automatic inferencing is a quick way to add basic constraints while sketching. It applies to items within the active sketch or entities of the face the sketch is on
Hover over one or more sketch entities with the cursor to wake up inference points.
The type of inferred constraint it is suggesting is shown below the cursor. For vertices and midpoints, it indicates with a yellow highlight. For vertical or horizontal constraints, it indicates with an orange dashed line.
Left-click while these indicators are showing to accept the inferred constraint.
Inferencing is enabled by default but can be temporarily disabled by holding down the Shift key.
Releasing the Shift key makes automatic inferencing available again.
Drag existing sketch entities to utilize automatic inferencing after placement.
For example, dragging the center point of a circle vertically to the origin automatically adds a vertical constraint.
You can also make constraints manually. To add one constraint at a time, pre-select the sketch entities to constrain, then click the constraint that you want in the toolbar.
To add multiple constraints of the same type, select the constraint from the toolbar first, then click on the sketch geometry to constrain.
his keeps the constraint active until it is deselected.
To evaluate the sketch’s definition, there are a couple methods for the constraints you have already applied. To show the constraints applied to an individual sketch entity, hover over it with the cursor.
To see what entities a constraint is applied to, hover the cursor over the constraint icon.
This highlights the sketch geometry associated with that constraint.
Press and hold the Shift key while moving the cursor to retain visible constraint icons.
This makes it easier to select them. Show all constraints by checking Show constraints in the sketch dialog.
Remove a constraint by left-clicking the constraint icon in the graphics area and pressing the Delete key.
Constraint icons are generally either blue or white.
A white constraint icon indicates a constraint between entities within the same sketch.
A blue constraint icon indicates a constraint that is associated with something outside of the sketch, such as an origin or edge of a previous sketch or feature.
步驟
- 建立兩條有正交垂直限制條件的直線。
- 將游標靠近直線移動直至「喚醒」推斷。
- 繪製一條直線。
當繪製草圖時,Onshape 會指出與其他草圖圖元的關係。在下方的圖示中,繪製的是下方 (藍色) 的直線。當直線與另一條直線平行時,會變為虛線而另一條直線則以橘色被強調顯示,表示有一關係存在 (在此範立中同時可看到平行限制條件的圖示)。
要抑制自動推斷,請於移動滑鼠時按下 Shift 鍵。