Sketcher ConstrainAngle/it: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 1: Line 1:
{{GuiCommand/it|Name=Constraint InternalAngle|Name/it=Angolo interno|Workbenches=[[Sketcher Workbench/it|Schizzo]], [[PartDesign Workbench/it|PartDesign]]|Shortcut=A|MenuLocation=PartDesignSchizzoAngolo interno|SeeAlso=[[Constraint Length/it|Lunghezza]], [[Constraint Perpendicular/it|Perpendicolare]]}}
{{GuiCommand|Name=Constraint InternalAngle|Workbenches=[[Sketcher Workbench|Sketcher]], [[PartDesign Workbench|PartDesign]]|Shortcut=A|MenuLocation=SketchSketcher constraintsConstrain angle|SeeAlso=[[Constraint Length|Constraint Length]], [[Constraint Perpendicular|Constraint Perpendicular]]}}


==Description==
Questo strumento vincola a un valore specifico l'angolo tra due linee selezionate in un disegno. Per default, viene vincolato l'angolo interno, il minore degli angoli formati dall'incrocio di due linee (o loro estensioni). Se viene selezionata una sola linea, l'angolo è vincolato rispetto all'asse orizzontale del piano di schizzo selezionato
Angle constraint is a [[Sketcher Datum Constraint|datum constraint]] intended to fix angles in sketch. It is capable of setting slopes of individual lines, angles between lines, angles of intersections of curves, and angle spans of circular arcs.


==How to use==
Selezionare le due linee del disegno cliccando su di esse in sequenza. Esse assumono il colore verde scuro quando sono selezionate.
There are four different ways the constraint can be applied:
# to individual lines
# between lines
# to intersections of curves
# to arcs of circles


To apply angle constraint, one should the follow the steps:
La direzione della linea (la direzione in cui è stata creata, dal suo primo punto verso il suo punto finale) è significativa nel calcolo dell'angolo tra le linee.
* Select one, two or three entities in the sketch. The mode will be chosen depending on the selection.
* Invoke the constraint by clicking its icon on the toolbar, or selecting the menu item, or using keyboard shortcut. A datum edit dialog box pops up.
* Modify the angle if necessary. The angle can be entered as an expression that will be evaluated and the result will be stored. Click OK.


As with any datum constraint, it is possible to change the angle value later by double-clicking the constraint in constraint list or 3d view. Entering a negative value will cause the angle direction to flip.
[[File:ConstrainAngle1.png|256px|<span title="Selected lines"></span>]]


==Constraint modes==
Quindi fare clic sull'icona [[Image:Constraint_InternalAngle.png|16px]] nella barra degli strumenti di vincolo o selezionare il vincolo Angolo dal sottomenu dell'ambiente Schizzo (o quello dell'ambiente Part Design) per aggiungere il vincolo.
===line slope angle===
'''Accepted selection:''' line


[[Image:Sketcher ConsraintAngle mode1.png|600px]]
Il vincolo è inizialmente impostato al valore dell'angolo corrente interno tra le linee e viene aggiunto alla scheda Azioni → Vincoli nel pannello Vista Combinata.


The constraint sets the polar angle of line's direction. It is the angle between the line and X axis of the sketch.
[[File:ConstrainAngle2.png|256px|<span title="Constraint applied"></span>]]


===arc span (v0.15)===
Un doppio clic sul vincolo nella scheda Azioni → Vincoli apre una finestra di dialogo pop-up in cui li valore dell'angolo può essere modificato e impostato sul valore desiderato.
'''Accepted selection:''' arc of circle


[[Image:Sketcher ConsraintAngle mode2.png|600px]]
In alternativa, per aprire il pop-up di dialogo e impostare il valore, si può fare doppio clic direttamente sul testo del dato nella vista 3D.


In this mode, the constraint fixes angular span of a circular arc.
[[File:ConstrainAngle3.png|256px|<span title="Editing value"></span>]]


===between lines===
[[File:ConstrainAngle4.png|256px|<span title="Constraint applied"></span>]]
'''Accepted selection:''' line + line


[[Image:Sketcher ConsraintAngle mode3.png|600px]]
Il valore può essere impostato a valori superiori a 180 (o anche a 360), nel qual caso diventa un vincolo sull'angolo esterno e l'angolo viene interpretato come modulo 360 gradi.


In this mode, the constraint sets the angle between two lines. It is not required that the lines intersect.
Il modo 'valore assoluto' viene richiamato selezionando solo una linea prima di applicare il vincolo.


===between curves at intersection (angle-via-point) (v0.15)===
[[File:ConstrainAngle5.png|256px|<span title="Constraint applied"></span>]]
'''Accepted selection:''' any line/curve + any line/curve + any point


[[Image:Sketcher ConsraintAngle mode4.png|600px]]
Applicando il vincolo, l'angolo viene vincolato rispetto all'asse orizzontale del piano di disegno selezionato.


In this mode, angle between two curves is constrained at the point of their intersection. The intersection point can be on curves' extensions. The point should be specified explicitly, since curves typically intersect in more than one point.
[[File:ConstrainAngle6.png|256px|<span title="Constraint applied"></span>]]


For the constraint to work correctly, the point must be on both curves. So, as the constraint is invoked, the point will be automatically constrained onto both curves ([[Sketcher helper constraint|helper constraints]] will be added, if necessary), and the angle between curves will be constrained at the point. These [[Sketcher helper constraint|helper constraints]] are plain regular constraints. They can be added manually, or deleted. There are no helper constraints on the example picture above, because the point selected is already the intersection of curves.
Selezionando la seconda riga, che è stata costruita dalla parte superiore destra verso il basso a sinistra,


==Scripting==
[[File:ConstrainAngle7.png|256px|<span title="Constraint applied"></span>]]


Angle Constraint can be created from [[macros]] and from the python console by using the following:
e applicando il vincolo come prima,
{{Code|code=
# line slope angle
Sketch.addConstraint(Sketcher.Constraint('Angle',iline,angle))


# angular span of arc
[[File:ConstrainAngle8.png|256px|<span title="Constraint applied"></span>]]
Sketch.addConstraint(Sketcher.Constraint('Angle',iarc,angle))


# angle between lines
la linea viene vincolata al valore dell'angolo relativo alla direzione dell'asse orizzontale in senso orario (valori angolari sono limitati a 180 gradi in senso antiorario od orario).
Sketch.addConstraint(Sketcher.Constraint('Angle',iline1,pointpos1,iline2,pointpos2,angle))


# angle-via-point (no helper constraints are added automatically when from python)
Come in precedenza, facendo doppio clic sul vincolo nella scheda Azioni → Vincoli della Vista Combinata o direttamente sul vincolo nella vista 3D, consente di modificare il valore dell'angolo vincolato.
Sketch.addConstraint(Sketcher.Constraint('AngleViaPoint',icurve1,icurve2,geoidpoint,pointpos,angle))
}}
where:
:* <tt>Sketch</tt> is a sketch object
:* <tt>iline, iline1, iline2</tt> are integers specifying the lines by their ordinal numbers in <tt>Sketch</tt>.
:* <tt>pointpos1, pointpos2</tt> should be 1 for start point and 2 for end point. The choice of endpoints allows to set internal angle (or external), and it affects how the constraint is drawn on the screen.
:* <tt>geoidpoint</tt> and <tt>pointpos</tt> in AngleViaPoint are the indexes specifying the point of intersection.
:* <tt>angle</tt> is the angle value in radians. The angle is counted between tangent vectors in counterclockwise direction. Tangent vectors are pointing from start to end for the lines (or vice versa if ending point is supplied in angle between lines mode), and along counterclockwise direction for circles, arcs and ellipses. Quantity is also accepted as an angle (e.g. <tt>App.Units.Quantity('45 deg')</tt>)


{{clear}}
<languages/>
<languages/>

Revision as of 07:52, 18 January 2015

Constraint InternalAngle

Menu location
Sketch → Sketcher constraints → Constrain angle
Workbenches
Sketcher, PartDesign
Default shortcut
A
Introduced in version
-
See also
Constraint Length, Constraint Perpendicular

Description

Angle constraint is a datum constraint intended to fix angles in sketch. It is capable of setting slopes of individual lines, angles between lines, angles of intersections of curves, and angle spans of circular arcs.

How to use

There are four different ways the constraint can be applied:

  1. to individual lines
  2. between lines
  3. to intersections of curves
  4. to arcs of circles

To apply angle constraint, one should the follow the steps:

  • Select one, two or three entities in the sketch. The mode will be chosen depending on the selection.
  • Invoke the constraint by clicking its icon on the toolbar, or selecting the menu item, or using keyboard shortcut. A datum edit dialog box pops up.
  • Modify the angle if necessary. The angle can be entered as an expression that will be evaluated and the result will be stored. Click OK.

As with any datum constraint, it is possible to change the angle value later by double-clicking the constraint in constraint list or 3d view. Entering a negative value will cause the angle direction to flip.

Constraint modes

line slope angle

Accepted selection: line

The constraint sets the polar angle of line's direction. It is the angle between the line and X axis of the sketch.

arc span (v0.15)

Accepted selection: arc of circle

In this mode, the constraint fixes angular span of a circular arc.

between lines

Accepted selection: line + line

In this mode, the constraint sets the angle between two lines. It is not required that the lines intersect.

between curves at intersection (angle-via-point) (v0.15)

Accepted selection: any line/curve + any line/curve + any point

In this mode, angle between two curves is constrained at the point of their intersection. The intersection point can be on curves' extensions. The point should be specified explicitly, since curves typically intersect in more than one point.

For the constraint to work correctly, the point must be on both curves. So, as the constraint is invoked, the point will be automatically constrained onto both curves (helper constraints will be added, if necessary), and the angle between curves will be constrained at the point. These helper constraints are plain regular constraints. They can be added manually, or deleted. There are no helper constraints on the example picture above, because the point selected is already the intersection of curves.

Scripting

Angle Constraint can be created from macros and from the python console by using the following:

# line slope angle
Sketch.addConstraint(Sketcher.Constraint('Angle',iline,angle))

# angular span of arc
Sketch.addConstraint(Sketcher.Constraint('Angle',iarc,angle))

# angle between lines
Sketch.addConstraint(Sketcher.Constraint('Angle',iline1,pointpos1,iline2,pointpos2,angle))

# angle-via-point (no helper constraints are added automatically when from python)
Sketch.addConstraint(Sketcher.Constraint('AngleViaPoint',icurve1,icurve2,geoidpoint,pointpos,angle))

where:

  • Sketch is a sketch object
  • iline, iline1, iline2 are integers specifying the lines by their ordinal numbers in Sketch.
  • pointpos1, pointpos2 should be 1 for start point and 2 for end point. The choice of endpoints allows to set internal angle (or external), and it affects how the constraint is drawn on the screen.
  • geoidpoint and pointpos in AngleViaPoint are the indexes specifying the point of intersection.
  • angle is the angle value in radians. The angle is counted between tangent vectors in counterclockwise direction. Tangent vectors are pointing from start to end for the lines (or vice versa if ending point is supplied in angle between lines mode), and along counterclockwise direction for circles, arcs and ellipses. Quantity is also accepted as an angle (e.g. App.Units.Quantity('45 deg'))