Draft Polygon

From FreeCAD Documentation
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page is a translated version of the page Draft Polygon and the translation is 3% complete.
Outdated translations are marked like this.

Draft_Polygon

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

Description

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.

A Draft Polygon can be switched from inscribed to circumscribed by changing its DataDraw Mode property. The corners of a Draft Polygon can be filleted (rounded) or chamfered by changing its DataFillet Radius or DataChamfer Size respectively.

Usage

See also: Draft Tray, Draft Snap and Draft Constrain.

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.
  • Polygonen kan visas som en yta eller som en trådmodell, genom att ändra dess visningsläge.

Options

The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts (for version 0.22).

  • To manually enter the coordinates for the center enter the X, Y and Z component, and press Enter after each. Or you can press the Enter point button when you have the desired values. It is advisable to move the pointer out of the 3D view before entering coordinates.
  • Press G or click the Global checkbox to toggle global mode. If global mode is on, coordinates are relative to the global coordinate system, else they are relative to the working plane coordinate system. introduced in version 0.20
  • Press F or click the Filled checkbox to toggle filled mode. If filled mode is on, the created polygon will have DataMake Face set to true and will have a filled face.
  • Press N or click the Continue checkbox to toggle continue mode. If continue mode is on, the command will restart after finishing, allowing you to continue creating polygons.
  • Press S to switch Draft snapping on or off.
  • Press Esc or the Close button to abort the command.

Notes

  • A Draft Polygon can be edited with the Draft Edit command.

Preferences

See also: Preferences Editor and Draft Preferences.

  • If the Edit → Preferences... → Draft → General → Create Part primitives if possible option is checked, the command will create a Part RegularPolygon instead of a Draft Polygon.

Properties

See also: Property editor.

A Draft Polygon object is derived from a Part Part2DObject and inherits all its properties. It also has the following additional properties:

Data

Draft

  • DataArea (Area): (read-only) specifies the area of the face of the polygon. The value will be 0.0 if DataMake Face if false.
  • DataChamfer Size (Length): specifies the length of the chamfers at the corners of the polygon.
  • DataDraw Mode (Enumeration): specifies if the polygon is inscribed in a circle or circumscribed around a circle.
  • DataFaces Number (Integer): specifies the number of sides of the polygon.
  • DataFillet Radius (Length): specifies the radius of the fillets at the corners of the polygon.
  • DataMake Face (Bool): specifies if the polygon makes a face or not. If it is true a face is created, otherwise only the perimeter is considered part of the object.
  • DataRadius (Length): specifies the radius of the circle that defines the polygon.

View

Draft

  • VyPattern (Enumeration): specifies the Draft Pattern with which to fill the face of the polygon. This property only works if DataMake Face is true and if VyDisplay Mode is Flat Lines.
  • VyPattern Size (Float): specifies the size of the Draft Pattern.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To create a Draft Polygon use the make_polygon method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makePolygon method.

polygon = make_polygon(nfaces, radius=1, inscribed=True, placement=None, face=None, support=None)
  • Creates a polygon object with the given number of faces (nfaces), and based on a circle of radius in millimeters.
  • If inscribed is True, the polygon is inscribed in the circle, otherwise it will be circumscribed.
  • If placement is None the polygon is created at the origin and one of its vertices will lie on the X axis.
  • If face is True, the polygon will make a face, that is, it will appear filled.

Example:

import FreeCAD as App
import Draft

doc = App.newDocument()

polygon1 = Draft.make_polygon(4, radius=500)
polygon2 = Draft.make_polygon(5, radius=750)

zaxis = App.Vector(0, 0, 1)
p3 = App.Vector(1000, 1000, 0)
place3 = App.Placement(p3, App.Rotation(zaxis, 90))

Polygon3 = Draft.make_polygon(6, radius=1450, placement=place3)

doc.recompute()