Part Ellipsoid/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "==Tworzenie skryptów==")
(Created page with "Zobacz również: [https://freecad.github.io/SourceDoc/ Dokumentacja API generowana automatycznie] oraz Skrypty w środowisku Część i Podstawy pisania skryptów dla FreeCAD.")
Line 65: Line 65:
==Tworzenie skryptów==
==Tworzenie skryptów==


See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
Zobacz również: [https://freecad.github.io/SourceDoc/ Dokumentacja API generowana automatycznie] oraz [[Part_scripting/pl|Skrypty w środowisku Część]] i [[FreeCAD_Scripting_Basics/pl|Podstawy pisania skryptów dla FreeCAD]].


A Part Ellipsoid can be created with the {{Incode|addObject()}} method of the document:
A Part Ellipsoid can be created with the {{Incode|addObject()}} method of the document:

Revision as of 16:30, 23 June 2023

Część Elipsoida

Lokalizacja w menu
Część → Utwórz geometrie pierwotne → Elipsoida
Środowisko pracy
Część, OpenSCAD
Domyślny skrót
brak
Wprowadzono w wersji
-
Zobacz także
Utwórz geometrię pierwotną

Opis

A Part Ellipsoid is a parametric solid that can be created with the Part Primitives command. In the coordinate system defined by its DANEPlacement property, the axes of the ellipsoid are aligned with the X, Y and Z axes, and therefore its center is positioned at the origin.

Elipsoida środowiska pracy Część może być obcięta u góry i/lub u dołu przez zmianę jej właściwości DANEKąt1 i/lub DANEKąt2. Można ją przekształcić w segment sfery, zmieniając jej właściwość DANEKąt3.

Użycie

Zobacz stronę Geometrie pierwotne.

Przykład

Elipsoida środowiska pracy Część na przykładzie skryptu

Poniżej pokazano obiekt Elipsoidy utworzony za pomocą przykładowego skryptu.

Właściwości

Zobacz również stronę: Edytor właściwości.

Obiekt Elipsoida wywodzi się z obiektu Część: Cecha i dziedziczy wszystkie jego właściwości. Posiada on również następujące dodatkowe właściwości:

Dane

Dołączenie

Obiekt ten ma takie same właściwości dołączania jak Part: Part2DObject.

Elipsoida

  • DANERadius1 (Length): The radius of the ellipsoid in its Z direction. The default is 2mm.
  • DANERadius2 (Length): The radius of the ellipsoid in its X direction. The default is 4mm.
  • DANERadius3 (Length): The radius of the ellipsoid in its Y direction. The default is 4mm.
  • DANEAngle1 (Angle): The start angle of the elliptical sides of the ellipsoid. Valid range: -90° <= value < 90°. Must be smaller than DANEAngle2. The default is -90°.
  • DANEAngle2 (Angle): The end angle of the elliptical sides of the ellipsoid. Valid range: -90° < value <= 90°. Must be larger than DANEAngle1. The default is 90°. If the total angle of the elliptical sides is smaller than 180° the ellipsoid will be truncated and have a flat face at the top and/or bottom.
  • DANEAngle3 (Angle): The total angle of the ellipsoid in its XY plane. Valid range: 0° < value <= 360°. The default is 360°. If it is smaller than 360° the resulting solid will be a segment of an ellipsoid.

Tworzenie skryptów

Zobacz również: Dokumentacja API generowana automatycznie oraz Skrypty w środowisku Część i Podstawy pisania skryptów dla FreeCAD.

A Part Ellipsoid can be created with the addObject() method of the document:

ellipsoid = FreeCAD.ActiveDocument.addObject("Part::Ellipsoid", "myEllipsoid")
  • Where "myEllipsoid" is the name for the object.
  • The function returns the newly created object.

Example:

import FreeCAD as App

doc = App.activeDocument()

ellipsoid = doc.addObject("Part::Ellipsoid", "myEllipsoid")
ellipsoid.Radius1 = 2
ellipsoid.Radius2 = 4
ellipsoid.Radius3 = 6
ellipsoid.Angle1 = -90
ellipsoid.Angle2 = 50
ellipsoid.Angle3 = 300
ellipsoid.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(15, 0, 20))

doc.recompute()