128 lines
10 KiB
HTML
128 lines
10 KiB
HTML
<html><head><title>Constraint InternalAngle/sv</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Constraint InternalAngle/sv</h1></div>
|
|
|
|
<div id="mw-content-text" lang="sv" dir="ltr" class="mw-content-ltr"><hr/><div class="mw-parser-output"><table class="fcinfobox wikitable ct" >
|
|
<tr>
|
|
<td class="ctTitle">
|
|
<h3><span class="mw-headline" id="Constraint_InternalAngle"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Constraint_InternalAngle.png" class="image"><img alt="Constraint InternalAngle.png" src="32px-Constraint_InternalAngle.png" width="32" height="32" srcset="/wiki/images/thumb/7/75/Constraint_InternalAngle.png/48px-Constraint_InternalAngle.png 1.5x, /wiki/images/7/75/Constraint_InternalAngle.png 2x" /></a> Constraint InternalAngle</span></h3>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Menyplacering
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven">Sketch → Sketcher constraints → Constrain angle
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Arbetsbänk(ar)
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Sketcher_Workbench/sv" title="Sketcher Workbench/sv">Sketcher</a>, <a href="https://www.freecadweb.org/wiki/index.php?title=PartDesign_Workbench/sv" title="PartDesign Workbench/sv">PartDesign</a>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Standard genväg
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven">A
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Se även
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven"><a href="https://www.freecadweb.org/wiki/index.php?title=Constraint_Length/sv" title="Constraint Length/sv">Constraint Length</a>, <a href="https://www.freecadweb.org/wiki/index.php?title=Constraint_Perpendicular/sv" title="Constraint Perpendicular/sv">Constraint Perpendicular</a>
|
|
</td></tr>
|
|
<tr>
|
|
<td class="ctToc"><br /><div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
|
|
<ul>
|
|
<li class="toclevel-1"><a href="#Constraint_InternalAngle"><span class="tocnumber">1</span> <span class="toctext">Constraint InternalAngle</span></a></li>
|
|
<li class="toclevel-1 tocsection-1"><a href="#Description"><span class="tocnumber">2</span> <span class="toctext">Description</span></a></li>
|
|
<li class="toclevel-1 tocsection-2"><a href="#How_to_use"><span class="tocnumber">3</span> <span class="toctext">How to use</span></a></li>
|
|
<li class="toclevel-1 tocsection-3"><a href="#Constraint_modes"><span class="tocnumber">4</span> <span class="toctext">Constraint modes</span></a>
|
|
<ul>
|
|
<li class="toclevel-2 tocsection-4"><a href="#line_slope_angle"><span class="tocnumber">4.1</span> <span class="toctext">line slope angle</span></a></li>
|
|
<li class="toclevel-2 tocsection-5"><a href="#arc_span_.28v0.15.29"><span class="tocnumber">4.2</span> <span class="toctext">arc span (v0.15)</span></a></li>
|
|
<li class="toclevel-2 tocsection-6"><a href="#between_lines"><span class="tocnumber">4.3</span> <span class="toctext">between lines</span></a></li>
|
|
<li class="toclevel-2 tocsection-7"><a href="#between_curves_at_intersection_.28angle-via-point.29_.28v0.15.29"><span class="tocnumber">4.4</span> <span class="toctext">between curves at intersection (angle-via-point) (v0.15)</span></a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toclevel-1 tocsection-8"><a href="#Scripting"><span class="tocnumber">5</span> <span class="toctext">Scripting</span></a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
</td></tr></table>
|
|
<p><br />
|
|
</p>
|
|
<h2><span class="mw-headline" id="Description">Description</span></h2>
|
|
<p>Angle constraint is a <a href="/wiki/Sketcher_Workbench#Sketcher_Constraints" title="Sketcher Workbench">datum constraint</a> 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.
|
|
</p>
|
|
<h2><span class="mw-headline" id="How_to_use">How to use</span></h2>
|
|
<p>There are four different ways the constraint can be applied:
|
|
</p>
|
|
<ol><li> to individual lines</li>
|
|
<li> between lines</li>
|
|
<li> to intersections of curves</li>
|
|
<li> to arcs of circles</li></ol>
|
|
<p>To apply angle constraint, one should the follow the steps:
|
|
</p>
|
|
<ul><li> Select one, two or three entities in the sketch. The mode will be chosen depending on the selection.</li>
|
|
<li> 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.</li>
|
|
<li> 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.</li></ul>
|
|
<p>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.
|
|
</p>
|
|
<h2><span class="mw-headline" id="Constraint_modes">Constraint modes</span></h2>
|
|
<h3><span class="mw-headline" id="line_slope_angle">line slope angle</span></h3>
|
|
<p><b>Accepted selection:</b> line
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_ConsraintAngle_mode1.png" class="image"><img alt="Sketcher ConsraintAngle mode1.png" src="600px-Sketcher_ConsraintAngle_mode1.png" width="600" height="205" srcset="/wiki/images/thumb/a/ae/Sketcher_ConsraintAngle_mode1.png/900px-Sketcher_ConsraintAngle_mode1.png 1.5x, /wiki/images/a/ae/Sketcher_ConsraintAngle_mode1.png 2x" /></a>
|
|
</p><p>The constraint sets the polar angle of line's direction. It is the angle between the line and X axis of the sketch.
|
|
</p>
|
|
<h3><span class="mw-headline" id="arc_span_.28v0.15.29">arc span (v0.15)</span></h3>
|
|
<p><b>Accepted selection:</b> arc of circle
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_ConsraintAngle_mode2.png" class="image"><img alt="Sketcher ConsraintAngle mode2.png" src="600px-Sketcher_ConsraintAngle_mode2.png" width="600" height="204" srcset="/wiki/images/thumb/0/0d/Sketcher_ConsraintAngle_mode2.png/900px-Sketcher_ConsraintAngle_mode2.png 1.5x, /wiki/images/0/0d/Sketcher_ConsraintAngle_mode2.png 2x" /></a>
|
|
</p><p>In this mode, the constraint fixes angular span of a circular arc.
|
|
</p>
|
|
<h3><span class="mw-headline" id="between_lines">between lines</span></h3>
|
|
<p><b>Accepted selection:</b> line + line
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_ConsraintAngle_mode3.png" class="image"><img alt="Sketcher ConsraintAngle mode3.png" src="600px-Sketcher_ConsraintAngle_mode3.png" width="600" height="206" srcset="/wiki/images/thumb/7/79/Sketcher_ConsraintAngle_mode3.png/900px-Sketcher_ConsraintAngle_mode3.png 1.5x, /wiki/images/7/79/Sketcher_ConsraintAngle_mode3.png 2x" /></a>
|
|
</p><p>In this mode, the constraint sets the angle between two lines. It is not required that the lines intersect.
|
|
</p>
|
|
<h3><span class="mw-headline" id="between_curves_at_intersection_.28angle-via-point.29_.28v0.15.29">between curves at intersection (angle-via-point) (v0.15)</span></h3>
|
|
<p><b>Accepted selection:</b> any line/curve + any line/curve + any point
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_ConsraintAngle_mode4.png" class="image"><img alt="Sketcher ConsraintAngle mode4.png" src="600px-Sketcher_ConsraintAngle_mode4.png" width="600" height="208" srcset="/wiki/images/thumb/e/ec/Sketcher_ConsraintAngle_mode4.png/900px-Sketcher_ConsraintAngle_mode4.png 1.5x, /wiki/images/e/ec/Sketcher_ConsraintAngle_mode4.png 2x" /></a>
|
|
</p><p>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.
|
|
</p><p>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 (<a href="Sketcher_helper_constraint.html" title="Sketcher helper constraint">helper constraints</a> will be added, if necessary), and the angle between curves will be constrained at the point. These <a href="Sketcher_helper_constraint.html" title="Sketcher helper constraint">helper constraints</a> 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.
|
|
</p>
|
|
<h2><span class="mw-headline" id="Scripting">Scripting</span></h2>
|
|
<p>Angle Constraint can be created from <a href="Macros.html" title="Macros">macros</a> and from the python console by using the following:
|
|
</p>
|
|
<pre># 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)) </pre>
|
|
<p>where:
|
|
</p>
|
|
<dl><dd><ul><li> <tt>Sketch</tt> is a sketch object</li>
|
|
<li> <tt>iline, iline1, iline2</tt> are integers specifying the lines by their ordinal numbers in <tt>Sketch</tt>.</li>
|
|
<li> <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.</li>
|
|
<li> <tt>geoidpoint</tt> and <tt>pointpos</tt> in AngleViaPoint are the indexes specifying the point of intersection.</li>
|
|
<li> <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>)</li></ul></dd></dl>
|
|
<div style="clear:both"></div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div><div class="printfooter">
|
|
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Constraint_InternalAngle/sv&oldid=179106">http://www.freecadweb.org/wiki/index.php?title=Constraint_InternalAngle/sv&oldid=179106</a>"</div>
|
|
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
|
|
</div>
|
|
</div>
|
|
<div id="mw-navigation">
|
|
<h2>Navigation menu</h2>
|
|
|
|
</body></html> |