Inférences automatiques
L'éditeur d'esquisse Onshape a la possibilité d'attribuer automatiquement des contraintes à certaines entités. Par exemple, créez une ligne et placez l'un des points d'extrémité au-dessus de l'origine et une ligne pointillée apparaît indiquant une inférence verticale entre ce point d'extrémité et l'origine.
En cours d'esquisse, Onshape affiche des inférences pour l'alignement horizontal et vertical entre une entité et l'origine et/ou une autre entité. Dans certains cas, l'inférence ne se produit que lorsque le curseur est placé près d'une autre entité pour « activer » l'inférence entre les deux entités. Les inférences couramment utilisées qui peuvent s'activer sont : horizontales, verticales, médianes, parallèles et coïncidentes.



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.
Étapes
- Créez deux lignes avec une contrainte perpendiculaire entre elles.
- Déplacez le curseur près de la ligne jusqu'à ce que l'inférence « s'active ».
- Tracez une ligne.
En cours d'esquisse, Onshape indique des relations avec d'autres entités d'esquisse. Dans l'illustration ci-dessous, la ligne inférieure (bleue) est celle en cours d'esquisse. Lorsqu'elle est parallèle à l'autre ligne, elle se transforme en ligne pointillée et l'autre est surlignée en orange pour montrer qu'il y a une relation existante. (L'icône de contrainte parallèle est également visible dans cet exemple.)
Pour supprimer les inférences automatiques, appuyez sur la touche Maj tout en utilisant la souris.