Draft Polygon/sv: Difference between revisions

From FreeCAD Documentation
(Created page with "====Bruk==== * Markera en punkt på ett tomt område i 3D vyn, eller på ett existerande objekt. * Om du håller ned {{KEY|CTRL}} så kommer din punkt att [[Draft_Snap/sv|sn...")
(Updating to match new version of source page)
Line 26: Line 26:
* 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|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.
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current command.
* Polygons, when in "Flat Lines" display mode, can display a hatch pattern, by setting their "Pattern" property below.


==Properties==
==Properties==
Line 31: Line 32:
* {{PropertyData|Draw Mode}}: Specifies if the polygon is inscribed or circumscribed around the defining circle
* {{PropertyData|Draw Mode}}: Specifies if the polygon is inscribed or circumscribed around the defining circle
* {{PropertyData|Faces Number}}: The number of sides of the polygon
* {{PropertyData|Faces Number}}: The number of sides of the polygon
* {{PropertyData|Chamfer Size}}: Specifies the size of chamfered corners
* {{PropertyData|Fillet Radius}}: Specifies a curvature radius to give to the corners of the rectangle
* {{PropertyData|Fillet Radius}}: Specifies a curvature radius to give to the corners of the rectangle
* {{PropertyView|Pattern}}: Specifies a hatch pattern to fill the wire with
* {{PropertyView|Pattern Size}}: Specifies the size of the hatch pattern


==Scripting==
==Scripting==
Line 37: Line 41:


<syntaxhighlight>
<syntaxhighlight>
'''makePolygon(nfaces,[radius],[inscribed],[placement],[face])'''
makePolygon(nfaces,[radius],[inscribed],[placement],[face])
</syntaxhighlight>
</syntaxhighlight>
* Creates a polygon object with the given number of faces and the radius.
* Creates a polygon object with the given number of faces and the radius.

Revision as of 21:40, 3 June 2014

Draft_Polygon

Menyplacering
Draft -> Polygon
Arbetsbänkar
Skiss
Standard genväg
Ingen
Introducerad i version
-
Se även
Ingen

Beskrivning

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.

Punkterna kan markeras med musen i 3D vyn eller genom att mata in koordinater med tangentbordet.

Bruk

  • Markera en punkt på ett tomt område i 3D vyn, eller på ett existerande objekt.
  • Om du håller ned CTRL så kommer din punkt att snäppa till tillgängliga snäpp platser.
  • Om du håller nedSKIFT så kommer din punkt att begränsas i relation till den sista punkten.
  • Skriv in siffror för att mata in en koordinat manuellt
  • Om du trycker ned ESC så kommer operationen att avbrytas.
  • Den nyss skapade tråden kommer att anta gällande linjestil.
  • Polygonen kan visas som en yta eller som en trådmodell, genom att ändra dess visningsläge.

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.
  • Polygons, when in "Flat Lines" display mode, can display a hatch pattern, by setting their "Pattern" property below.

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
  • DataChamfer Size: Specifies the size of chamfered corners
  • DataFillet Radius: Specifies a curvature radius to give to the corners of the rectangle
  • VyPattern: Specifies a hatch pattern to fill the wire with
  • VyPattern Size: Specifies the size of the hatch pattern

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)