Draft Polygon/sv: Difference between revisions

From FreeCAD Documentation
(Created page with "{{GuiCommand/sv|Name=Draft_Polygon|Workbenches=Skiss|MenuLocation=Draft -> Polygon}} ====Beskrivning==== Detta verktyg frågar användaren efter en centr...")
 
(Updating to match new version of source page)
Line 1: Line 1:
{{GuiCommand/sv|Name=Draft_Polygon|Workbenches=[[Draft Module/sv|Skiss]]|MenuLocation=Draft -> Polygon}}
{{GuiCommand|Name=Draft Polygon|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Polygon|Shortcut=P G}}


====Beskrivning====
==Description==
The polygon tool creates a regular polygon by picking two points, the center and a second point defining a radius. It takes the [[Draft Linestyle|linewidth and color]] previously set on the Tasks tab.


[[Image:Draft_polygon_example.jpg|400px]]
Detta verktyg frågar användaren efter en centrumpunkt och en radie. Du kan sedan specificera antalet sidor, och en regelbunden polygon kommer att skapas inuti den givna radiens cirkel. Antalet sidor och om polygonen är inskriven eller omskriven cirkeln kan ändras när som helst i objektets egenskaper. Den nyss skapade polygonen kommer att ha nuvarande linkefärg och -tjocklek.


==How to use==
Punkterna kan markeras med musen i 3D vyn eller genom att mata in koordinater med tangentbordet.
# Press the {{KEY|[[Image:Draft Polygon.png|16px]] [[Draft Polygon]]}} button, or press {{KEY|P}} then {{KEY|G}} keys
# Click a first point on the 3D view, or type a [[Draft_Coordinates|coordinate]] to indicate the center
# Adjust the desired number of sides in the options dialog,
# Click another point on the 3D view, or type a radius value to define the polygon radius. The polygon will also be a face, even if it appears as wireframe.


====Bruk====
==Options==
* To enter coordinates manually, simply enter the numbers, then press {{KEY|ENTER}} between each X, Y and Z component.
* Press {{KEY|T}} or click the checkbox to check/uncheck the {{KEY|'''Continue'''}} button. If continue mode is on, the Polygon tool will restart after you finish or close it, allowing you to draw another one without pressing the Polygon button again.
* Press {{KEY|CTRL}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance.
* Press {{KEY|SHIFT}} while drawing to [[Draft_Constrain|constrain]] your next point horizontally or vertically in relation to the last one.
* Press {{KEY|I}} or the {{KEY|'''Filled'''}} button to have the polygon to appear as a face after it has been closed. This simply sets the View->Property of the Rectangle to "Flat lines" or "Wireframe", so it can easily be changed later.
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current command.


==Properties==
* Markera en punkt på ett tomt område i 3D vyn, eller på ett existerande objekt.
* {{PropertyData|Radius}}: The radius of the defining circle
* Om du håller ned {{KEY|CTRL}} så kommer din punkt att [[Draft_Snap/sv|snäppa]] till tillgängliga snäpp platser.
* {{PropertyData|Draw Mode}}: Specifies if the polygon is inscribed or circumscribed around the defining circle
* Om du håller ned{{KEY|SKIFT}} så kommer din punkt att [[Draft_Constrain/sv|begränsas]] i relation till den sista punkten.
* {{PropertyData|Faces Number}}: The number of sides of the polygon
* Skriv in siffror för att [[Draft_Coordinates|mata in en koordinat manuellt]]
* {{PropertyData|Fillet Radius}}: Specifies a curvature radius to give to the corners of the rectangle
* Om du trycker ned {{KEY|ESC}} så kommer operationen att avbrytas.
* Den nyss skapade tråden kommer att anta gällande [[Draft_Linestyle/sv|linjestil]].
* Polygonen kan visas som en yta eller som en trådmodell, genom att ändra dess visningsläge.


==Scripting==
The Polygon tool can by used in [[macros]] and from the python console by using the following function:


<syntaxhighlight>
'''makePolygon(nfaces,[radius],[inscribed],[placement],[face])'''
</syntaxhighlight>
* Creates a polygon object with the given number of faces and the radius.
* If inscribed is False, the polygon is circumscribed around a circle with the given radius, otherwise it is inscribed.
* If face is True, the resulting shape is displayed as a face, otherwise as a wireframe.
* Returns the newly created object.


Example:

<syntaxhighlight>
{{Languages/sv | {{en|Draft_Polygon}} {{es|Draft_Polygon/es}} {{fr|Draft_Polygon/fr}} }}
import Draft
Draft.makePolygon(5,radius=3)
</syntaxhighlight>
{{clear}}
<languages/>

Revision as of 20:53, 11 January 2014

Draft Polygon

Menu location
Draft -> Polygon
Workbenches
Draft, Arch
Default shortcut
P G
Introduced in version
-
See also
None

Description

The polygon tool creates a regular polygon by picking two points, the center and a second point defining a radius. It takes the linewidth and color previously set on the Tasks tab.

How to use

  1. Press the Draft Polygon button, or press P then G keys
  2. Click a first point on the 3D view, or type a coordinate to indicate the center
  3. Adjust the desired number of sides in the options dialog,
  4. Click another point on the 3D view, or type a radius value to define the polygon radius. The polygon will also be a face, even if it appears as wireframe.

Options

  • To enter coordinates manually, simply enter the numbers, then press ENTER between each X, Y and Z component.
  • Press T or click the checkbox to check/uncheck the Continue button. If continue mode is on, the Polygon tool will restart after you finish or close it, allowing you to draw another one without pressing the Polygon button again.
  • Press CTRL while drawing to force snapping your point to the nearest snap location, independently of the distance.
  • Press SHIFT while drawing to constrain your next point horizontally or vertically in relation to the last one.
  • Press I or the Filled button to have the polygon to appear as a face after it has been closed. This simply sets the View->Property of the Rectangle to "Flat lines" or "Wireframe", so it can easily be changed later.
  • Press ESC or the Cancel button to abort the current command.

Properties

  • DataRadius: The radius of the defining circle
  • DataDraw Mode: Specifies if the polygon is inscribed or circumscribed around the defining circle
  • DataFaces Number: The number of sides of the polygon
  • DataFillet Radius: Specifies a curvature radius to give to the corners of the rectangle

Scripting

The Polygon tool can by used in macros and from the python console by using the following function:

 '''makePolygon(nfaces,[radius],[inscribed],[placement],[face])'''
  • Creates a polygon object with the given number of faces and the radius.
  • If inscribed is False, the polygon is circumscribed around a circle with the given radius, otherwise it is inscribed.
  • If face is True, the resulting shape is displayed as a face, otherwise as a wireframe.
  • Returns the newly created object.

Example:

 import Draft
 Draft.makePolygon(5,radius=3)