mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-14 17:48:34 +05:00
171 lines
5.8 KiB
Plaintext
171 lines
5.8 KiB
Plaintext
/*!
|
|
|
|
\page create_sketcher_page 2D Sketcher
|
|
|
|
The 2D Sketcher allows you to draw 2D shapes on a working plane. You
|
|
can create sketches of two types:
|
|
|
|
<ul>
|
|
<li> \b Profile made of connected curves of 2 types: <b>line segments</b> and \b arcs.
|
|
|
|
\b or
|
|
|
|
<li> \b Rectangle
|
|
</ul>
|
|
|
|
The \b Result is a \b Wire
|
|
|
|
\n <b>Example:</b>
|
|
|
|
\image html sketch_example.png
|
|
|
|
To create a <b> 2D Sketch</b>:
|
|
|
|
<ol>
|
|
<li>In the main menu select <b>New Entity -> Basic -> 2D Sketch</b> or click on \image html sketch.png </li>
|
|
|
|
<li> Select the \b plane or the <b>planar face</b> on which to create the sketch.
|
|
\note By default the sketch is created on the XOY plane of the global coordinate system.
|
|
If Local Coordinate Systems have been created in the study they appear
|
|
in the combo-box and can be selected as a reference coordinate system.</li>
|
|
|
|
<li> Choose a \b segment or an \b arc element to start a \b profile or choose \b rectangle to draw a rectangle.
|
|
|
|
\n If you draw a \b profile:
|
|
|
|
<li> Select a start point. By default the start point of the curve is located at the point of
|
|
origin of the reference coordinate system.</li>
|
|
|
|
<li> Create curve portions and click on \b Apply after each step.</li>
|
|
|
|
<li> Select either \b Close or <b>Sketch Closure</b> if you want to close the profile before closing the window.</li>
|
|
</ol>
|
|
|
|
\n To create a \b Segment:
|
|
|
|
<ol>
|
|
<li> In the <b>Element Type</b> part of the dialog box select:
|
|
|
|
\image html line_icon.png </li>
|
|
|
|
<li> You can define the segment by either its <b>end point</b> or \b direction and \b length. The direction is defined relatively to the tangent at the last point of the sketch. It can be:
|
|
<ul>
|
|
<li> Tangent (collinear to the tangent at the last point)</li>
|
|
<li> Perpendicular</li>
|
|
<li> Defined by an angle</li>
|
|
<li> Defined by a vector (Vx, Vy)</li>
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ol>
|
|
|
|
\n To create an \b Arc:
|
|
|
|
<ol>
|
|
<li> In the <b>Element Type</b> part of the dialog box select \image html arc_icon.png </li>
|
|
|
|
<li> You can define the segment by either its <b>end point</b> or \b direction \b radius and \b angle. </li>
|
|
|
|
<ul>
|
|
<li>In case of an end point the arc can be built in three different ways:</li>
|
|
<ul>
|
|
<li>From the end point only. The arc is \b tangential to the end of the sketch.</li>
|
|
<li>From the end point and a \b radius. (The radius must be greater than half of the distance between the last point and the end point of the arc).</li>
|
|
<li>From the \b center of the circle and the end point. The constraint on the center is first taken into account.
|
|
The destination point is only used to define the angle of the arc and won't lie on the arc in the general case.</li>
|
|
</ul>
|
|
|
|
<li>The direction is defined relatively to the tangent at the last point of the sketch. It can be:</li>
|
|
|
|
<ul>
|
|
<li>Tangent (colinear to the tangent at the last point)</li><
|
|
<li>Perpendicular</li>
|
|
<li>Defined by an angle</li>
|
|
<li>Defined by a vector (Vx, Vy)</li>
|
|
</ul>
|
|
</ul>
|
|
|
|
</ol>
|
|
|
|
\note For the first segment or arc of the sketch the reference direction is the X direction of the reference coordinate system.
|
|
|
|
\n <b>Dialog Box:</b>
|
|
|
|
\image html sketcher_dlg.png
|
|
|
|
\n <b>Arguments:</b>
|
|
<ol>
|
|
<li>Coordinate system (Existing Local CS or Global CS can be selected)</li>
|
|
<li>A plane or a planar face to define a new Local Coordinate System
|
|
<li>Element type (segment, arc or rectangle).</li>
|
|
<li>Destination type (point or direction).</li>
|
|
<li>Destination point by means of:</li>
|
|
<ul>
|
|
<li>absolute coordinates X,Y;</li>
|
|
<li>relative coordinates DX, DY (with respect to the current point);</li>
|
|
<li>selection of an existing point.</li>
|
|
</ul>
|
|
<li>Destination direction by means of:</li>
|
|
<ul>
|
|
<li>angle between the new segment and the previous one;</li>
|
|
<li>perpendicular to the previous segment (same as previous, but the angle
|
|
is predefined and is equal to 90 degrees);</li>
|
|
<li>tangent to the previous segment;</li>
|
|
<li>vector components DX, DY.</li>
|
|
</ul>
|
|
<li>Parameters of an element (for segment : length or target X or Y coordinate value, for arc : radius, angle or center coordinates).</li>
|
|
</ol>
|
|
|
|
\b Buttons:
|
|
|
|
<b>"Restore"</b> button orientates the viewer correspondingly to the chosen working plane and fits the scene to show all its objects.
|
|
\n <b>"Close"</b> button applies the wire, only the red part will be built.
|
|
\n <b>"Sketch Closure"</b> will close the Sketch by a straight line
|
|
from the last red part and apply it.
|
|
|
|
\n To draw a \b rectangle:
|
|
|
|
<ol>
|
|
<li> In the <b>Element Type</b> part of the dialog box select \image html rectangle_icon.png </li>
|
|
|
|
<li> Draw a rectangle with the mouse directly in the view or fill in the coordinates of two opposite vertices of the rectangle.</li>
|
|
<li> <b>Apply and Close</b> </li>
|
|
</ol>
|
|
|
|
\n <b>Dialog Box:</b>
|
|
|
|
\image html sketcher_dlg2.png
|
|
|
|
\n <b>Arguments:</b>
|
|
<ol>
|
|
<li>Coordinate system (Existing Local CS or Global CS can be selected)</li>
|
|
<li>A plane or a planar face to define a new Local Coordinate System
|
|
<li>Element type (segment, arc or rectangle).</li>
|
|
<li>The X,Y coordinates of two opposite vertices of the rectangle</li>
|
|
</ol>
|
|
|
|
|
|
\n <b>TUI Command:</b> <em>geompy.MakeSketcherOnPlane(Command, WorkingPlane)</em>
|
|
\n This algorithm creates a sketcher (wire or face), following the
|
|
textual description, passed through the Command argument. The edges of
|
|
the resulting wire or face will be arcs of circles and/or linear
|
|
segments.
|
|
\n \em Command is a string, defining the sketcher by the coordinates of
|
|
points in the current LCS.
|
|
\n <em>WorkingPlane</em> can be a Local CS, a plane, or a planar face.
|
|
|
|
\n Another way to create the 2D Sketcher in TUI is using Sketcher2D
|
|
interface.
|
|
|
|
<b>TUI Command:</b> <em>sk = geompy.Sketcher2D()</em>
|
|
|
|
Returns an instance of Sketcher2D interface <i>sk</i>.
|
|
|
|
Use the below examples and see the \ref gsketcher.Sketcher2D "Sketcher2D"
|
|
interface documentation for more information.
|
|
|
|
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
|
\ref tui_sketcher_page "2D Sketcher".
|
|
*/
|