Część: Walec

From FreeCAD Documentation
Revision as of 15:14, 4 March 2022 by Kaktus (talk | contribs) (Created page with "Przykład:")

Część: Walec

Lokalizacja w menu
Część → Bryła pierwotna → Walec
Środowisko pracy
Część
Domyślny skrót
brak
Wprowadzono w wersji
-
Zobacz także
Bryły pierwotne

Opis

Narzędzie Walec środowiska Część, tworzy parametryczną bryłę walca. Powstaje ona w wyniku wyciągnięcia łuku koła wzdłuż prostej ścieżki. W układzie współrzędnych zdefiniowanym przez właściwość DANEUmiejscowienie kolista ścieżka torusa leży na płaszczyźnie XY, a jej środek znajduje się w punkcie odniesienia położenia.

A Part Cylinder can be turned into a segment of a cylinder by changing its DANEAngle property.

Użycie

  1. Otwórz środowisko pracy Część.
  2. Istnieje kilka sposobów na wywołanie polecenia:
    • Naciśnij przycisk Walec na pasku narzędzi,
    • Użyj pozycji menu głównego Część → Bryła pierwotna → Walec.

Przykład

Part Cylinder from the scripting example

A Part Cylinder object created with the scripting example below is shown here.

Uwagi

  • A Part Cylinder can also be created with the Part Primitives command. With that command you can specify the dimensions and placement at creation time.

Właściwości

See also: Property editor.

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

Dane

Attachment

The object has the same attachment properties as a Part Part2DObject.

Cylinder

  • DANEKąt: Jest to kąt obrotu, który umożliwia utworzenie części walca (domyślnie ustawiony jest na 360°).
  • DANEWysokość: Wysokość to odległość w kierunku osi z.
  • DANEPromień: Promień definiuje płaszczyznę w płaszczyźnie x-y.
  • DANEKąt pierwszy: Kąt w pierwszym kierunku dostępne w wersji 0.20.
  • DANEKąt drugi: Kąt w drugim kierunku dostępne w wersji 0.20.

Prism

  • DANEFirst Angle (Angle): The angle between the extrusion direction of the cylinder and its positive Z axis, measured around its Y axis. The angle is positive towards its positive X axis. Valid range: 0° <= value < 90°. The default is . introduced in version 0.20
  • DANESecond Angle (Angle): The angle between the extrusion direction of the cylinder and its positive Z axis, measured around its X axis. The angle is positive towards its positive Y axis. Valid range: 0° <= value < 90°. The default is . introduced in version 0.20

Tworzenie skryptów

See also: Autogenerated API documentation, Part scripting and FreeCAD Scripting Basics.

Walec środowiska pracy Część jest tworzony za pomocą metody dokumentu addObject().

cylinder = FreeCAD.ActiveDocument.addObject("Part::Cylinder", "myCylinder")
  • Gdzie parametr "myCylinder" jest etykietą dla obiektu.
  • Funkcja zwraca nowo utworzony obiekt.

Przykład:

import FreeCAD as App

doc = App.activeDocument()

cylinder = doc.addObject("Part::Cylinder", "myCylinder")
cylinder.Radius = 10
cylinder.Height = 50
cylinder.Placement = App.Placement(App.Vector(5, 10, 15), App.Rotation(75, 60, 30))

doc.recompute()