Część: Sfera

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

Part: Kula

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

Opis

Tworzy prostą parametryczną sferę o parametrach położenie, kąt1, kąt2, kąt3 i promień.

A Part Sphere can be truncated at the top and/or bottom by changing its DANEAngle1 and/or DANEAngle2 properties. It can be turned into a segment of a sphere by changing its DANEAngle3 property.

Użycie

  1. Przełącz się na środowisko pracy Część
  2. Istnieje kilka sposobów na wywołanie polecenia:
    • Naciśnij przycisk Utwórz sferę na pasku narzędzi.
    • Wybierz polecenie Część → Bryła pierwotna → Sfera z paska menu.

Przykład

Part Sphere from the scripting example

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

Notes

  • A Part Sphere 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 Sphere 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.

Kula

  • DANEPromień: Promień sfery
  • DANEKąt 1: wartość pierwszego kąta do cięcia / definiowania sfery
  • DANEKąt 2: wartość drugiego kąta do cięcia / definiowania sfery
  • DANEKąt 3: wartość trzeciego kąta do cięcia / definiowania sfery

Tworzenie skryptów

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

Sferę środowiska pracy Część można utworzyć przy pomocy następującej funkcji:

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

Przykład:

import FreeCAD as App

doc = App.activeDocument()

sphere = doc.addObject("Part::Sphere", "mySphere")
sphere.Radius = 20
sphere.Angle1 = -30
sphere.Angle2 = 45
sphere.Angle3 = 90
sphere.Placement = App.Placement(App.Vector(3, 9, 11), App.Rotation(75, 60, 30))

doc.recompute()