Sketcher ConstrainAngle: Difference between revisions
(fixed links in GuiCommand, typo) |
No edit summary |
||
(27 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
{{GuiCommand|Name=Constraint InternalAngle|Workbenches=[[Sketcher Workbench|Sketcher]], [[PartDesign Workbench|PartDesign]]|MenuLocation=Sketch → Sketcher constraints → Constrain angle|SeeAlso=[[Constraint Length]], [[Constraint Perpendicular]]}} |
|||
<translate> |
|||
<!--T:25--> |
|||
{{Docnav |
|||
|[[Sketcher_ConstrainDiameter|Constraint Diameter]] |
|||
|[[Sketcher ConstrainSnellsLaw|Snell's Law]] |
|||
|[[Sketcher_Workbench|Sketcher]] |
|||
|IconL=Sketcher ConstrainDiameter.svg |
|||
|IconC=Workbench_Sketcher.svg |
|||
|IconR=Constraint_SnellsLaw.svg |
|||
}} |
|||
<!--T:1--> |
|||
====Description==== |
|||
{{GuiCommand |
|||
|Name=Sketcher ConstrainAngle |
|||
|Workbenches=[[Sketcher Workbench|Sketcher]] |
|||
|Shortcut={{KEY|A}} |
|||
|MenuLocation=Sketch → Sketcher constraints → Constrain angle |
|||
|SeeAlso=[[Sketcher ConstrainDistance|Sketcher Constrain distance]], [[Sketcher ConstrainPerpendicular|Sketcher Constraint Perpendicular]] |
|||
}} |
|||
==Description== <!--T:30--> |
|||
This tool constrains the angle between two selected lines in a sketch to be a specified value. By default, the internal angle, the smaller of the angles formed at the intersection of two lines (or their extensions) is constrained. |
|||
<!--T:4--> |
|||
If a single line is selected, the angle is constrained relative to the horizontal axis of the selected sketcher plane |
|||
Angle constraint is a [[Sketcher_Workbench#Sketcher Constraints|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. |
|||
==Usage== <!--T:5--> |
|||
====Operation==== |
|||
<!--T:29--> |
|||
Select any two lines in the sketch by clicking on them in sequence. They will change colour to dark green when selected. The direction of the line form the first point created to the end point is significant in calculation of the angle between the lines. |
|||
There are four different ways the constraint can be applied: |
|||
* to individual lines |
|||
* between lines |
|||
* to intersections of curves |
|||
* to arcs of circles |
|||
<!--T:6--> |
|||
[[File:ConstrainAngle1.png|256px|<span title="Selected lines"></span>]] |
|||
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 using several methods: |
|||
#* Pressing the {{Button|[[File:Sketcher_ConstrainAngle.svg|16px]] [[Sketcher_ConstrainAngle|Constrain angle]]}} button in the toolbar. |
|||
#* Using the {{KEY|A}} keyboard shortcut. ('''A''' is for '''A'''ngle) |
|||
#* Using the {{MenuCommand|Sketch → Sketcher constraints → [[File:Sketcher_ConstrainAngle.svg|16px]] Constrain angle}} form the top menu entry |
|||
# A datum edit dialog box pops up. |
|||
# Modify the angle if necessary. '''Note:''' The angle can be entered as an expression that will be evaluated and the result will be stored. |
|||
# Click {{Button|OK}} |
|||
<!--T:7--> |
|||
Then click on the ConstraintAngle icon([[Image:Constraint_InternalAngle.png|16px]]) in the Sketcher or Part Design toolbar or select the ConstrainAngle menu item from the Sketcher constraints sub menu of either the Sketcher (Sketcher workbench) or Part Design (Part Design workbench)menu item to add the constraint. |
|||
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== <!--T:8--> |
|||
The constraint is initially set to the current internal angle between the lines and the Constraint is added to the Tasks tab in the Combo View panel. |
|||
===Line slope angle=== <!--T:31--> |
|||
[[File:ConstrainAngle2.png|256px|<span title="Constraint applied"></span>]] |
|||
<!--T:32--> |
|||
Doubleclicking on the Constraint in the Tasks tab will bring up a pop-up dialog box in which this value may be edited to set it to a desired value. Alternatively, the datum text in the 3D view may be double clicked to bring up the pop-up dialog to set the value. |
|||
'''Accepted selection:''' line |
|||
<!--T:9--> |
|||
[[File:ConstrainAngle3.png|256px|<span title="Editing value"> |
|||
[[Image:Sketcher ConsraintAngle mode1.png|600px]] |
|||
</span>]] |
|||
<!--T:10--> |
|||
[[File:ConstrainAngle4.png|256px|<span title="Constraint applied"></span>]] |
|||
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)=== <!--T:33--> |
|||
The value can be set to values greater than 180 (or even 360), in which case it becomes a constraint on the external angle and the angle is interpreted as modulo 360 degrees. |
|||
<!--T:11--> |
|||
The absolute mode is invoked by only selecting one line before applying the constraint. |
|||
'''Accepted selection:''' arc of circle |
|||
<!--T:12--> |
|||
[[File:ConstrainAngle5.png|256px|<span title="Constraint applied"></span>]] |
|||
[[Image:Sketcher ConsraintAngle mode2.png|600px]] |
|||
<!--T:13--> |
|||
Applying the constraint, the angle is constrained relative to the horizontal axis of the selected sketch plane. |
|||
In this mode, the constraint fixes angular span of a circular arc. |
|||
===Between lines=== <!--T:34--> |
|||
[[File:ConstrainAngle6.png|256px|<span title="Constraint applied"></span>]] |
|||
<!--T:14--> |
|||
Selecting the second line which was drawn from the upper right to lower left. |
|||
'''Accepted selection:''' line + line |
|||
<!--T:15--> |
|||
[[File:ConstrainAngle7.png|256px|<span title="Constraint applied"></span>]] |
|||
[[Image:Sketcher ConsraintAngle mode3.png|600px]] |
|||
<!--T:16--> |
|||
And applying the constraint as before, |
|||
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)=== <!--T:35--> |
|||
[[File:ConstrainAngle8.png|256px|<span title="Constraint applied"> |
|||
</span>]] |
|||
<!--T:17--> |
|||
the line is now constrained to have a value relative to the direction of the horizontal axis in the clockwise direction (angle values are restricted to 180 degrees anticlockwise or clockwise). |
|||
'''Accepted selection:''' any line/curve + any line/curve + any point |
|||
<!--T:18--> |
|||
As before by double clicking on the constraint in either the Tasks tab of the Combo view or on the constraint in the 3D view will allow editing of the value of the constrained angle. |
|||
[[Image:Sketcher ConsraintAngle mode4.png|600px]] |
|||
<!--T:19--> |
|||
{{languages | {{es|Constraint_InternalAngle/es}} }} |
|||
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. |
|||
<!--T:20--> |
|||
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. |
|||
==Scripting== <!--T:21--> |
|||
<!--T:22--> |
|||
Angle Constraint can be created from [[macros]] and from the python console by using the following: |
|||
</translate> |
|||
{{Code|code= |
|||
# 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)) |
|||
}} |
|||
<translate> |
|||
<!--T:23--> |
|||
where: |
|||
:* {{incode|Sketch}} is a sketch object |
|||
:* {{incode|iline, iline1, iline2}} are integers specifying the lines by their ordinal numbers in {{incode|Sketch}}. |
|||
:* {{incode|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. |
|||
:* {{incode|geoidpoint}} and {{incode|pointpos}} in {{incode|AngleViaPoint}} are the indexes specifying the point of intersection. |
|||
:* {{incode|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. {{incode|App.Units.Quantity('45 deg')}}) |
|||
<!--T:26--> |
|||
{{Docnav |
|||
|[[Sketcher_ConstrainDiameter|Constraint Diameter]] |
|||
|[[Sketcher ConstrainSnellsLaw|Snell's Law]] |
|||
|[[Sketcher_Workbench|Sketcher]] |
|||
|IconL=Sketcher ConstrainDiameter.svg |
|||
|IconC=Workbench_Sketcher.svg |
|||
|IconR=Constraint_SnellsLaw.svg |
|||
}} |
|||
</translate> |
|||
{{Sketcher Tools navi{{#translation:}}}} |
|||
{{Userdocnavi{{#translation:}}}} |
|||
{{clear}} |
Revision as of 14:36, 26 September 2020
Sketcher ConstrainAngle |
Menu location |
---|
Sketch → Sketcher constraints → Constrain angle |
Workbenches |
Sketcher |
Default shortcut |
A |
Introduced in version |
- |
See also |
Sketcher Constrain distance, Sketcher 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.
Usage
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:
- Select one, two or three entities in the sketch. The mode will be chosen depending on the selection.
- Invoke the constraint using several methods:
- Pressing the Constrain angle button in the toolbar.
- Using the A keyboard shortcut. (A is for Angle)
- Using the Sketch → Sketcher constraints → Constrain angle form the top menu entry
- A datum edit dialog box pops up.
- Modify the angle if necessary. Note: 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 objectiline, iline1, iline2
are integers specifying the lines by their ordinal numbers inSketch
.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
andpointpos
inAngleViaPoint
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')
)
- General: Create sketch, Edit sketch, Map sketch to face, Reorient sketch, Validate sketch, Merge sketches, Mirror sketch, Leave sketch, View sketch, View section, Toggle grid, Toggle snap, Configure rendering order, Stop operation
- Sketcher geometries: Point, Line, Arc, Arc by 3 points, Circle, Circle by 3 points, Ellipse, Ellipse by 3 points, Arc of ellipse, Arc of hyperbola, Arc of parabola, B-spline by control points, Periodic B-spline by control points, B-spline by knots, Periodic B-spline by knots, Polyline, Rectangle, Centered rectangle, Rounded rectangle, Triangle, Square, Pentagon, Hexagon, Heptagon, Octagon, Regular polygon, Slot, Fillet, Corner-preserving fillet, Trim, Extend, Split, External geometry, Carbon copy, Toggle construction geometry
- Sketcher constraints:
- Geometric constraints: Coincident, Point on object, Vertical, Horizontal, Parallel, Perpendicular, Tangent, Equal, Symmetric, Block
- Dimensional constraints: Lock, Horizontal distance, Vertical distance, Distance, Radius or weight, Diameter, Auto radius/diameter, Angle, Refraction (Snell's law)
- Constraint tools: Toggle driving/reference constraint, Activate/deactivate constraint
- Sketcher tools: Select unconstrained DoF, Select associated constraints, Select associated geometry, Select redundant constraints, Select conflicting constraints, Show/hide internal geometry, Select origin, Select horizontal axis, Select vertical axis, Symmetry, Clone, Copy, Move, Rectangular array, Remove axes alignment, Delete all geometry, Delete all constraints
- Sketcher B-spline tools: Show/hide B-spline degree, Show/hide B-spline control polygon, Show/hide B-spline curvature comb, Show/hide B-spline knot multiplicity, Show/hide B-spline control point weight, Convert geometry to B-spline, Increase B-spline degree, Decrease B-spline degree, Increase knot multiplicity, Decrease knot multiplicity, Insert knot, Join curves
- Sketcher virtual space: Switch virtual space
- Additional: Sketcher Dialog, Preferences, Sketcher scripting
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub