Sketcher ConstrainCoincident/es: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(8 intermediate revisions by 2 users not shown)
Line 2: Line 2:


{{Docnav
{{Docnav
|[[Sketcher_ConstrainCoincidentUnified|Coincident (unified)]]
|[[Sketcher_ToggleConstruction|Construction Mode]]
|[[Sketcher_ConstrainPointOnObject|Point On Object]]
|[[Sketcher_ConstrainPointOnObject|Point on object]]
|[[Sketcher_Workbench|Sketcher]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ToggleConstruction.svg
|IconL=Sketcher_ConstrainCoincidentUnified.svg
|IconR=Constraint_PointOnObject.svg
|IconR=Constraint_PointOnObject.svg
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
Line 16: Line 16:
|Workbenches=[[Sketcher Workbench/es|Sketcher]]
|Workbenches=[[Sketcher Workbench/es|Sketcher]]
|Shortcut=C
|Shortcut=C
|MenuLocation=Sketch → Restricciones de croquis → Restricción de coincidencia|SeeAlso=[[Constraint Lock/es|Restricción de bloqueo]], [[Constraint PointOnObject/es|Punto en objeto]]
|MenuLocation=Sketch → Restricciones de croquis → Restricción de coincidencia|SeeAlso=[[Sketcher_ConstrainLock/es|Restricción de bloqueo]], [[Sketcher_ConstrainPointOnObject/es|Punto en objeto]]
}}
}}
</div>
</div>
Line 22: Line 22:
==Description==
==Description==


The [[Image:Sketcher_ConstrainCoincident.svg|24px]] [[Sketcher_ConstrainCoincident|Sketcher ConstrainCoincident]] tool creates a coincident constraint between points, or ({{Version|0.21}}) a concentric constraint between circles, arcs and/or ellipses (by making their centers coincident).
<div class="mw-translate-fuzzy">
"Crea una restricción de coincidencia en los objetos seleccionados"


{{Version|1.0}}: This tool is replaced by the [[Sketcher_ConstrainCoincidentUnified|Sketcher ConstrainCoincidentUnified]] tool if the '''Unify Coincident and PointOnObject''' option is selected in the [[Sketcher_Preferences#General|preferences]].
==Descripción==


==Usage==
Esta restricción permite hacer dos puntos <em>coincidentes</em>.
</div>


See also: [[Sketcher_Workbench#Drawing_aids|Drawing aids]].
This constraint tool takes two points as its argument and serves to make the two points ''coincident''. (Meaning to make them as-one-point).


===[[Sketcher_Workbench#Continue_modes|Continue mode]]===
In practical terms this constraint tool is useful when there is a break in a profile for example - where two lines end near each other and need to be joined - a coincident constraint on their end-points will close the gap.


# Make sure there is no selection.
==Usage==
# There are several ways to invoke the tool:
#* Press the {{Button|[[Image:Sketcher_ConstrainCoincident.svg|16px]] [[Sketcher_ConstrainCoincident|Constrain coincident]]}} button.
#* Select the {{MenuCommand|Sketch → Sketcher constraints → [[Image:Sketcher_ConstrainCoincident.svg|16px]] Constrain coincident}} option from the menu.
#* Use the keyboard shortcut: {{KEY|C}}.
# The cursor changes to a cross with the tool icon.
# Do one of the following:
#* Select two points.
#* Select two edges of circles, arcs, ellipses or arcs of ellipses.
# A constraint is added.
# Optionally keep creating constraints.
# To finish, right-click or press {{KEY|Esc}}, or start another geometry or constraint creation tool.


===Run-once mode===
<div class="mw-translate-fuzzy">
==Utilización==

#Selecciona dos puntos.
#Selecciona la restricción 'Coincidencia' y los dos puntos pasarán a ser coincidentes.
</div>


# Do one of the following:
{{Emphasis|Note:}} In order to make two points coincident, FreeCAD must out of necessity move one (or both) of the original points.
#* Select two or more points.
#* Select two or more edges of circles, arcs, ellipses or arcs of ellipses.
# Invoke the tool as explained above.
# Depending on the selection one or more constraints are added.


==Notes==
== Alternatives to Coincident constraint ==


* {{Version|1.0}}: Points with Coincident constraints are marked with the '''Constraint symbols''' [[Sketcher_Preferences#Display|color]].
The two constrained items of a [[Sketcher ConstrainCoincident|Coincident]] constraint must be start point or end point vertices, or center points of arcs, circles or ellipses. Some combinations which are not possible with a coincident constraint can be emulated using other constraints:
* The [[File:Sketcher_ConstrainSymmetric.svg|24px]] [[Sketcher ConstrainSymmetric|Symmetric]] constraint can be used to place a start point, end point or center point on the midpoint of a straight line.
* A midpoint-to-midpoint placement of two straight lines can be achieved by creating a new [[File:Sketcher_CreatePoint.svg|24px]] [[Sketcher CreatePoint|Point]] and using two [[File:Sketcher_ConstrainSymmetric.svg|24px]] [[Sketcher ConstrainSymmetric|Symmetric]] constraints so that it lies on the midpoint of both lines.
* A vertex can be constrained to lie along an edge using a [[File:Sketcher_ConstrainPointOnObject.svg|24px]][[Sketcher ConstrainPointOnObject|PointOnObject]] constraint. Note that with this constraint, the point can lie anywhere on the full extension of a segment or curve (i.e. also before the start point or beyond the end point).
* A collinear placement of two straight lines can be obtained by applying a [[File:Sketcher_ConstrainTangent.svg|24px]] [[Sketcher ConstrainTangent|Tangent]] constraint to them, or by combining a [[File:Sketcher_ConstrainPointOnObject.svg|24px]] [[Sketcher ConstrainPointOnObject|PointOnObject]] constraint and a [[File:Sketcher_ConstrainParallel.svg|24px]] [[Sketcher ConstrainParallel|Parallel]] constraint.
* Two edges can be made identical by using two [[File:Sketcher_ConstrainCoincident.svg|24px]] [[Sketcher ConstrainCoincident|Coincident]] constraints, one for each pair of extremities.
* Two circles can be made identical by using a [[File:Sketcher_ConstrainCoincident.svg|24px]] [[Sketcher ConstrainCoincident|Coincident]] constraint to merge the centers, and applying an [[File:Sketcher_ConstrainEqual.svg|24px]] [[Sketcher ConstrainEqual|Equal]] constraint to their edges. For arcs, this will ensure both arcs are part of the same circle, while allowing them to have different start and end points.


==Scripting==
==Scripting==


The constraint can be created from macros and from the python console by using the following command:
The constraint can be created from [[Macros|macros]] and from the [[Python|Python]] console by using the following command:


{{Code|code=Sketch.addConstraint(Sketcher.Constraint('Coincident',LineFixed,PointOfLineFixed,LineMoving,PointOfLineMoving)) }}
{{Code|code=Sketch.addConstraint(Sketcher.Constraint('Coincident',LineFixed,PointOfLineFixed,LineMoving,PointOfLineMoving)) }}
Line 77: Line 79:
</div>
</div>


{{Sketcher Tools navi{{#translation:}}}}
{{Sketcher_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 14:49, 23 April 2024

Restricción de coincidencia

Ubicación en el Menú
Sketch → Restricciones de croquis → Restricción de coincidencia
Entornos de trabajo
Sketcher
Atajo de teclado por defecto
C
Introducido en versión
-
Ver también
Restricción de bloqueo, Punto en objeto

Description

The Sketcher ConstrainCoincident tool creates a coincident constraint between points, or (introduced in version 0.21) a concentric constraint between circles, arcs and/or ellipses (by making their centers coincident).

introduced in version 1.0: This tool is replaced by the Sketcher ConstrainCoincidentUnified tool if the Unify Coincident and PointOnObject option is selected in the preferences.

Usage

See also: Drawing aids.

Continue mode

  1. Make sure there is no selection.
  2. There are several ways to invoke the tool:
    • Press the Constrain coincident button.
    • Select the Sketch → Sketcher constraints → Constrain coincident option from the menu.
    • Use the keyboard shortcut: C.
  3. The cursor changes to a cross with the tool icon.
  4. Do one of the following:
    • Select two points.
    • Select two edges of circles, arcs, ellipses or arcs of ellipses.
  5. A constraint is added.
  6. Optionally keep creating constraints.
  7. To finish, right-click or press Esc, or start another geometry or constraint creation tool.

Run-once mode

  1. Do one of the following:
    • Select two or more points.
    • Select two or more edges of circles, arcs, ellipses or arcs of ellipses.
  2. Invoke the tool as explained above.
  3. Depending on the selection one or more constraints are added.

Notes

Scripting

The constraint can be created from macros and from the Python console by using the following command:

Sketch.addConstraint(Sketcher.Constraint('Coincident',LineFixed,PointOfLineFixed,LineMoving,PointOfLineMoving))

where :

  • Sketch is a sketch object
  • LineFixed is the number of the line, that will not move by applying the constraint
  • PointOfLineFixed indicates which vertex of LineFixed has to fulfill the constraint
  • LineMoving is the number of the line, that will move by applying the constraint
  • PointOfLineMoving indicates which vertex of LineMoving has to fulfill the constraint

As the names LineFixed and LineMoving indicate, if both constrained vertices are free to move in any direction, the first one (first to be selected in the Gui) will remain fixed and the other one will move. In the presence of existing constraints, however, both edges may move.

The Sketcher scripting page explains the values which can be used for LineFixed, PointOfLineFixed, LineMoving and PointOfLineMoving, and contains further examples on how to create constraints from Python scripts.