Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 35 additions & 62 deletions wiki/Sketcher_CreatePolyline.wikitext
Original file line number Diff line number Diff line change
@@ -1,81 +1,54 @@
<languages/>
<translate>

<!--T:10-->
{{Docnav
|[[Sketcher_CreatePoint|Point]]
|[[Sketcher_CreateLine|Line]]
|[[Sketcher_CreateArc|Create Arc]]
|[[Sketcher_CreateArcBy3Points|Create Arc by 3 Points]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_CreatePoint.svg
|IconR=Sketcher_CreateLine.svg
|IconL=Sketcher_CreateArc.svg
|IconC=Workbench_Sketcher.svg
|IconR=Sketcher_CreateArcBy3Points.svg
}}

<!--T:1-->
{{GuiCommand
|Name=Sketcher CreatePolyline
|MenuLocation=Sketch → Geometries → Polyline
|Workbenches=[[Sketcher_Workbench|Sketcher]]
|Shortcut={{KEY|G}} {{KEY|M}}
|SeeAlso=[[Sketcher_CreateLine|Sketcher CreateLine]]
}}
==Description==

This tool creates a polyline (a series of lines and arcs connected by their endpoints) in the sketch.

==Description== <!--T:2-->
==Usage==

<!--T:3-->
The [[Image:Sketcher_CreatePolyline.svg|24px]] [[Sketcher_CreatePolyline|Sketcher CreatePolyline]] tool creates a series of line and arc segments connected by their endpoints. The tool has several modes.
# Click the '''[[Image:Sketcher_CreatePolyline.svg|24px]]''' '''Create Polyline''' button.
# Click in the 3D view to define the starting point of the first segment.
# Click again to define the endpoint of the first segment, which is also the starting point of the next segment.
# Continue clicking to add more segments.
# Press {{KEY|Esc}} to finish the polyline, or click on the starting point to close it.

</translate>
[[Image:Sketcher_PolylineExample1.png]]
<translate>
==Options==

<!--T:4-->
{{Caption|Polyline started with a line, a tangent arc, a perpendicular arc then a tangent line.}}
* While creating a segment, press {{KEY|M}} to switch between line and arc mode.
* Press {{KEY|Ctrl}} while clicking to constrain the point to existing geometry.
* Press {{KEY|Shift}} while clicking to create a construction geometry segment.

==Usage== <!--T:5-->
==Notes==

<!--T:14-->
See also: [[Sketcher_Workbench#Drawing_aids|Drawing aids]].
* A polyline is essentially a series of connected [[Sketcher_CreateLine|lines]] and [[Sketcher_CreateArc|arcs]].
* Each segment of the polyline is a separate constraint entity.
* The polyline tool is useful for quickly creating complex sketches.

<!--T:15-->
# There are several ways to invoke the tool:
#* Press the {{Button|[[Image:Sketcher_CreatePolyline.svg|16px]] [[Sketcher_CreatePolyline|Polyline]]}} button.
#* Select the {{MenuCommand|Sketch → Geometries → [[Image:Sketcher_CreatePolyline.svg|16px]] Polyline}} option from the menu.
#* Right-click in the [[3D_View|3D View]] and select the {{MenuCommand|[[Image:Sketcher_CreatePolyline.svg|16px]] Polyline}} option from the context menu.
#* Use the keyboard shortcut: {{KEY|G}} then {{KEY|M}}.
# The cursor changes to a cross with the tool icon.
# The modes of the tool require a previous segment. Do one of the following:
#* Pick two points to define a line segment.
#* Pick the endpoint of an existing line or arc segment ([[Sketcher_Workbench#Auto_constraints|Auto constraints]] must be enabled).
# Optionally press the {{KEY|M}} key one or more times to cycle through the modes for the next segment. The available modes are:
#* Line perpendicular to the previous segment.
#* Line tangential to the previous segment (this is the initial mode if the previous segment is an arc).
#* Arc tangential to the previous segment.
#* Arc perpendicular (left) to the previous segment.
#* Arc perpendicular (right) to the previous segment.
#* Line only connected to the previous segment.
# While in any of the arc modes, optionally hold down the {{KEY|Ctrl}} key to snap the arc to increments of 45° relative to the previous segment.
# Pick the endpoint of the segment.
# Optionally repeat this to create more segments.
# To finish the input do one of the following:
#* Snap to the start point to create a closed polyline.
#* Right-click or press {{KEY|Esc}} to create an open polyline.
# The polyline segments have been created and applicable constraints have been added.
# If the tool runs in [[Sketcher_Workbench#Continue_modes|continue mode]]:
## Optionally keep creating polylines.
## To finish, right-click or press {{KEY|Esc}}, or start another geometry or constraint creation tool.
==Scripting==

The Sketcher CreatePolyline tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:

{{Code|code=
sketch.addGeometry(Part.LineSegment(App.Vector(x1,y1,0), App.Vector(x2,y2,0)), False)
sketch.addGeometry(Part.Arc(App.Vector(x1,y1,0), App.Vector(xm,ym,0), App.Vector(x2,y2,0)), False)
}}

<!--T:11-->
{{Docnav
|[[Sketcher_CreatePoint|Point]]
|[[Sketcher_CreateLine|Line]]
|[[Sketcher_CreateArc|Create Arc]]
|[[Sketcher_CreateArcBy3Points|Create Arc by 3 Points]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_CreatePoint.svg
|IconR=Sketcher_CreateLine.svg
|IconL=Sketcher_CreateArc.svg
|IconC=Workbench_Sketcher.svg
|IconR=Sketcher_CreateArcBy3Points.svg
}}

</translate>
{{Sketcher_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Sketcher Tools navi}}

{{Userdocnavi}}
Loading