Sketcher Constrângerea de coincidența punctelor

From FreeCAD Documentation
Revision as of 18:03, 20 March 2022 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

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.