Sketcher ConstrainCoincident/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 50: Line 50:
== Alternatives to Coincident constraint ==
== Alternatives to Coincident constraint ==


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 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.
* 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 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 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.
* 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 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.
* 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.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 63: Line 63:
</div>
</div>


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)) }}

Revision as of 15:43, 24 January 2021

Sketcher ConstrainCoincident

poziția meniului
Sketch → Sketcher constraints → Constrain coincident
Ateliere
Sketcher
scurtătură
C
Prezentat în versiune
-
A se vedea, de asemenea,
Constrain Lock, Constrain Point onto Object

Description

Descriere

Creați o constrângere de coincidență asupra elementului selectat

Acest instrument de constrângere ia două puncte ca argument pentru a face ca cele două puncte să coincident. (Însemnând să le faceți să devină ca un singur punct).

În termeni practici, acest instrument de constrângere este util atunci când există o ruptură într-un profil, de exemplu - unde două linii se termină aproape una de alta și trebuie să fie unite - o constrângere de coincidență asupra punctelor lor finale va închide spațiul.

Usage

Cum se folosește

După cum sa menționat mai sus, acest instrument are două argumente - ambele sunt puncte.

  1. În primul rând este necesar să evidențiem două puncte distincte. (Rețineți că acest lucru nu va funcționa dacă, de exemplu, doriți să selectați punctul inițial și cel final din aceeași linie).
  2. Evidențiarea unui element de desen este realizată prin mutarea mouse-ului peste element și făcând clic pe butonul stânga al mouse-ului.
  3. Un element selectat își va schimba culoarea în verde.
  4. Următoarele elemente pot fi evidențiate prin repetarea procedurilor de mai sus. NOTĂ: Nu este necesar să țineți apăsată o tastă specială, cum ar fi Ctrl, pentru a selecta mai multe elemente dintr-un desen.
  5. Odată ce ați selectat două puncte, faceți clic stânga pe 'PointOnPoint' constrângerea va face ca cele două puncte să devină coincident și să fie înlocuite de un singur punct.

NOTĂ: Pentru a face două puncte coincide, FreeCAD trebuie să se mute în mod necesar unul sau ambele puncte originale.

Alternatives to Coincident constraint

The two constrained items of a 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 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 Point and using two Symmetric constraints so that it lies on the midpoint of both lines.
  • A vertex can be constrained to lie along an edge using a 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 Tangent constraint to them, or by combining a PointOnObject constraint and a Parallel constraint.
  • Two edges can be made identical by using two Coincident constraints, one for each pair of extremities.
  • Two circles can be made identical by using a Coincident constraint to merge the centers, and applying an 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.

General scripting

Constrângerea poate fi creată din macrocomenzi și din consola Python folosind următoarea comandă:

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))

unde :

  • Sketch este un obiect sketch
  • LineFixed este numărul liniei care nu se mișcă prin aplicarea constrângerii
  • PointOfLineFixed este numărul liniei liniei Fixed care trebuie să îndeplinească constrângerea
  • LineMoving este numărul liniei care se va deplasa prin aplicarea constrângerii
  • PointOfLineMoving este numărul liniei este LineMoving, care trebuie să îndeplinească constrângerea

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.