/*!
\page create_sketcher_page 2D Sketcher
The 2D Sketcher allows you to draw 2D shapes on a working plane. You can create on this plane:
- A \b profile made of connected curves of 2 types: line segments and \b arcs.
\b or
- A \b rectangle
The \b Result is a \b Wire
\n Example:
\image html sketch_example.png
To create a 2D Sketch:
- In the main menu select New Entity -> Basic -> 2D Sketch or click on \image html sketch.png
- Select the \b plane or the planar face 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 combobox and can be selected as reference coordinate system.
- 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:
- Select a start point. By default the start point of the curve is located at the point of
origin of the reference coordinate system.
- Create curve portions and click on \b Apply after each step.
- Select either \b Close or Sketch Closure if you want to close the profile before closing the window.
\n To create a \b Segment:
- In the Element Type part of the dialog box select:
\image html line_icon.png
- You can define the segment by either it's end point or a \b direction and a \b length. The direction is defined relatively to the tangent at the last point of the sketch. It can be:
- Tangent (colinear to the tangent at the last point)
- Perpendicular
- Defined by an angle
- Defined by a vector (Vx, Vy)
\n To create an \b Arc:
- In the Element Type part of the dialog box select \image html arc_icon.png
- You can define the segment by either it's end point or a \b direction a \b radius and an \b angle.
- In case of an end point the arc can be built in three different ways:
- From the end point only. The arc is \b tangential to the end of the sketch.
- 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).
- 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.
- The direction is defined relatively to the tangent at the last point of the sketch. It can be:
- Tangent (colinear to the tangent at the last point)
<
- Perpendicular
- Defined by an angle
- Defined by a vector (Vx, Vy)
\note For the first segment or arc of the sketch the reference direction is the X direction of the reference coordinate system.
\n Dialog Box:
\image html sketcher_dlg.png
\n Arguments:
- Coordinate system (Existing Local CS or Global CS can be selected)
- A plane or a planar face to define a new Local Coordinate System
- Element type (segment, arc or rectangle).
- Destination type (point or direction).
- Destination point by means of:
- absolute coordinates X,Y;
- relative coordinates DX, DY (with respect to the current point);
- selection of an existing point.
- Destination direction by means of:
- angle between the new segment and the previous one;
- perpendicular to the previous segment (same as previous, but angle
is predefined and is equal to 90 degrees);
- tangent to the previous segment;
- vector components DX, DY.
- Parameters of an element (for segment : length or target X or Y coordinate value, for arc : radius, angle or center coordinates).
\b Buttons:
"Restore" button orientates the viewer correspondingly to the chosen working plane and fits the scene to show all its objects.
\n "Close" button applies the wire, only the red part will be built.
\n "Sketch Closure" will close the Sketch by straight line from last red part and apply it.
\n To draw a \b rectangle:
- In the Element Type part of the dialog box select \image html rectangle_icon.png
- Draw a rectangle with the mouse directly in the view or fill in the coordinates of two opposite vertices of the rectangle.
- Apply and Close
\n Dialog Box:
\image html sketcher_dlg2.png
\n Arguments:
- Coordinate system (Existing Local CS or Global CS can be selected)
- A plane or a planar face to define a new Local Coordinate System
- Element type (segment, arc or rectangle).
- The X,Y coordinates of two opposite vertices of the rectangle
\n TUI Command: geompy.MakeSketcherOnPlane(Command, WorkingPlane)
\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 WorkingPlane can be a Local CS, a plane, or a planar face.
Our TUI Scripts provide you with useful examples of the use of
\ref tui_sketcher_page "Sketcher".
*/