/*!
\page create_sketcher_page 2D Sketcher
The 2D Sketcher allows you to create a profile made of curves of 2 types: line segments and arcs.
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 plane or the planar face on which to create the sketch. 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.
- Select a start point. By default the start point of the curve is located at the point of
origin of the reference coordinate system and the curve lies in the
plane XOY.
- 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.
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 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)
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)
For the first segment or arc of the sketch the reference direction is the X direction of the reference coordinate system.
\n The Result of the operation will be a \b Wire.
\n Dialog Box:
\image html sketcher_dlg.png
\n Arguments:
- Coordinate system (Local or Global CS can be selected)
- Element type (segment or arc).
- 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 "Sketch Validation" button applies the wire, only red part will be built by "Sketch Validation".
\n "Sketch Closure" will close the Sketch by straight line from last red part and apply it.
\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".
*/