Part API/pl: Difference between revisions

From FreeCAD Documentation
No edit summary
(Created page with "{{APIFunction|__fromPythonOCC__|OCC.Object|Metoda pomocnicza konwersji kształtu pythonocc do kształtu wewnętrznego|A Part.Shape}} {{APIFunction|__sortEdges__|list of edges|...")
Line 10: Line 10:
}}
}}


{{APIFunction|__fromPythonOCC__|OCC.Object|Helper method to convert a pythonocc shape to an internal shape|A Part.Shape}}
{{APIFunction|__fromPythonOCC__|OCC.Object|Metoda pomocnicza konwersji kształtu pythonocc do kształtu wewnętrznego|A Part.Shape}}
{{APIFunction|__sortEdges__|list of edges|Metoda pomocnicza sortująca nieposortowaną listę krawędzi w taki sposób, aby po jej zakończeniu wierzchołki początkowy i końcowy dwóch kolejnych krawędzi były geometrycznie zbieżne. Zwraca ona pojedynczą listę krawędzi, a algorytm zatrzymuje się po pierwszym zestawie połączonych krawędzi, co oznacza, że lista wyjściowa może być mniejsza od wejściowej. Posortowana lista może być użyta do stworzenia linii łamanej.|a list of edges}}
{{APIFunction|__sortEdges__|list of edges|Helper method to sort an unsorted list of edges so that afterwards the start and end vertex of two consecutive edges are geometrically coincident. It returns a single list of edges and the algorithm stops after the first set of connected edges which means that the output list can be smaller than the input list. The sorted list can be used to create a Wire.|a list of edges}}
{{APIFunction|__toPythonOCC__|Part.Shape|Helper method to convert an internal shape to pythonocc shape|an OCC.Shape}}
{{APIFunction|__toPythonOCC__|Part.Shape|Metoda pomocnicza konwersji wewnętrznego kształtu do kształtu pythonocc|an OCC.Shape}}
{{APIFunction|cast_to_shape|Part.Shape|Cast to the actual shape type| }}
{{APIFunction|cast_to_shape|Part.Shape|rzutowanie na rzeczywisty typ kształtu| }}
{{APIFunction|export|list,string|Export a list of objects into a single file.| }}
{{APIFunction|export|list,string|Eksportuj listę obiektów do jednego pliku.| }}
{{APIFunction|getSortedClusters|list of edges|Helper method to sort and cluster a variety of edges| }}
{{APIFunction|getSortedClusters|list of edges|Metoda pomocnicza do sortowania i grupowania różnych krawędzi| }}
{{APIFunction|insert|string,string|Insert the file (path given as first argument) into the given document (second argument).| }}
{{APIFunction|insert|string,string|Wstaw plik ''(ścieżka podana jako pierwszy argument)'' do podanego dokumentu ''(drugi argument)''.| }}
{{APIFunction|makeBox|length,width,height,[pnt,dir]|Makes a box located at pnt with the dimensions (length,width,height). By default pnt is Vector(0,0,0) and dir is Vector(0,0,1)|the created shape}}
{{APIFunction|makeBox|length,width,height,[pnt,dir]|Tworzy pudełko znajdujące się w pnt o wymiarach ''(długość,szerokość,wysokość)''. Domyślnie pnt jest wektorem (0,0,0), a dir wektorem (0,0,1).|the created shape}}
{{APIFunction|makeCircle|radius,[pnt,dir,angle1,angle2]|Makes a circle with a given radius. By default pnt is Vector(0,0,0), dir is Vector(0,0,1), angle1 is 0 and angle2 is 360|the created shape}}
{{APIFunction|makeCircle|radius,[pnt,dir,angle1,angle2]|Tworzy okrąg o zadanym promieniu. Domyślnie pnt jest wektorem (0,0,0), dir jest wektorem (0,0,1), angle1 jest równy 0, a angle2 jest równy 360.|the created shape}}
{{APIFunction|makeCompound|list|Creates a compound out of a list of shapes.|the created shape}}
{{APIFunction|makeCompound|list|Tworzy obiekt złożony z listy kształtów.|the created shape}}
{{APIFunction|makeCone|radius1,radius2,height,[pnt,dir,angle]|Makes a cone with given radii and height. By default pnt is Vector(0,0,0), dir is Vector(0,0,1) and angle is 360|the created shape}}
{{APIFunction|makeCone|radius1,radius2,height,[pnt,dir,angle]|Tworzy stożek o zadanych promieniach i wysokościach. Domyślnie pnt jest wektorem (0,0,0), dir jest wektorem (0,0,1), a angle wynosi 360.|the created shape}}
{{APIFunction|makeCylinder|radius,height,[pnt,dir,angle]|Makes a cylinder with a given radius and height. By default pnt is Vector(0,0,0),dir is Vector(0,0,1) and angle is 360|the created shape}}
{{APIFunction|makeCylinder|radius,height,[pnt,dir,angle]|Tworzy walec o zadanym promieniu i wysokości. Domyślnie pnt jest wektorem (0,0,0), dir jest wektorem (0,0,1), a angle wynosi 360.|the created shape}}
{{APIFunction|makeHelix|pitch,height,radius,[angle,lefthand,heightstyle]|Makes a helix shape with a given pitch, height and radius. Defaults to right-handed cylindrical helix. Non-zero angle parameter produces a conical helix. Lefthand True produces left handed helix. Heightstyle applies only to conical helices. Heightstyle False (default) will cause the height parameter to be interpreted as the length of the side of the underlying frustum. Heightstyle True will cause the height parameter to be interpreted as the vertical height of the helix. Pitch is "metric pitch" (advance/revolution). For conical helix, radius is the minor radius.|the created shape}}
{{APIFunction|makeHelix|pitch,height,radius,[angle,lefthand,heightstyle]|Tworzy kształt spirali o zadanym skoku, wysokości i promieniu. Domyślnie jest to spirala cylindryczna prawoskrętna. Niezerowy parametr angle tworzy spiralę stożkową. Lefthand True tworzy spiralę lewoskrętną. Heightstyle ma zastosowanie tylko do helis stożkowych. Heightstyle {{False}} ''(domyślnie)'' spowoduje, że parametr height będzie interpretowany jako długość boku bazowego frustum. Heightstyle {{True}} spowoduje, że parametr height będzie interpretowany jako pionowa wysokość helisy. Pitch jest "metrycznym skokiem" ''(wyprzedzenie/obrót)''. Dla helisy stożkowej, radius jest promieniem mniejszym.|the created shape}}
{{APIFunction|makeLine|(x1,y1,z1),(x2,y2,z2)|Makes a line of two points|the created shape}}
{{APIFunction|makeLine|(x1,y1,z1),(x2,y2,z2)|Makes a line of two points|the created shape}}
{{APIFunction|makeLoft|shapelist<profiles>,[boolean<solid>,boolean<ruled>]|Creates a loft shape using the list of profiles. Optionally make result a solid (vs surface/shell) or make result a ruled surface.|the created shape}}
{{APIFunction|makeLoft|shapelist<profiles>,[boolean<solid>,boolean<ruled>]|Tworzy wyciągnięty kształt używając listy profili. Opcjonalnie uczyń wynik bryłą ''(vs powierzchnia/powłoka)'' lub uczyń wynik powierzchnią obrobioną.|the created shape}}
{{APIFunction|makePlane|length,width,[pnt,dir]|Makes a plane. By default pnt is Vector(0,0,0) and dir is Vector(0,0,1)|the created shape}}
{{APIFunction|makePlane|length,width,[pnt,dir]|Tworzy płaszczyznę. Domyślnie pnt jest wektorem (0,0,0) a dir jest wektorem (0,0,1).|the created shape}}
{{APIFunction|makePolygon|list|Makes a polygon of a list of Vectors|the created shape}}
{{APIFunction|makePolygon|list|Tworzy wielokąt z listy wektorów|the created shape}}
{{APIFunction|makeRevolution|Curve,[vmin,vmax,angle,pnt,dir]|Makes a revolved shape by rotating the curve or a portion of it around an axis given by (pnt,dir). By default vmin/vmax are set to bounds of the curve,angle is 360,pnt is Vector(0,0,0) and dir is Vector(0,0,1)|the created shape}}
{{APIFunction|makeRevolution|Curve,[vmin,vmax,angle,pnt,dir]|Tworzy obrócony kształt przez obrót krzywej lub jej części wokół osi określonej przez ''(pnt,dir)''. Domyślnie vmin/vmax ustawione na granice krzywej, kąt wynosi 360, pnt jest wektorem (0,0,0), a dir jest wektorem (0,0,1).|the created shape}}
{{APIFunction|makeRuledSurface|Edge or Wire,Edge or Wire|Creates a ruled surface out of two edges or wires. If wires are used then these must have the same number of edges.|the created shape}}
{{APIFunction|makeRuledSurface|Edge or Wire,Edge or Wire|Tworzy powierzchnię obrysowaną z dwóch krawędzi lub linii łamanych. Jeśli używane linie łamane, to muszą one mieć taką samą liczbę krawędzi.|the created shape}}
{{APIFunction|makeShell|list|Creates a shell out of a list of faces. Note: Resulting shell should be manifold. Non-manifold shells are not well supported.|the created shape}}
{{APIFunction|makeShell|list|Tworzy powłokę z listy ścian. Uwaga: Wynikowa powłoka powinna być foremna. Powłoki inne niż foremne nie dobrze obsługiwane.|the created shape}}
{{APIFunction|makeSolid|Part.Shape|Creates a solid out of the shells inside a shape.|the created shape}}
{{APIFunction|makeSolid|Part.Shape|Tworzy bryłę z powłok wewnątrz kształtu.|the created shape}}
{{APIFunction|makeSphere|radius,[center_pnt, axis_dir, V_startAngle, V_endAngle, U_angle]|Makes a sphere (or partial sphere) with a given radius. By default center_pnt is Vector(0,0,0), axis_dir is Vector(0,0,1), V_startAngle is 0, V_endAngle is 90 and U_angle is 360|the created shape}}
{{APIFunction|makeSphere|radius,[center_pnt, axis_dir, V_startAngle, V_endAngle, U_angle]|Tworzy sferę ''(lub częściową sferę)'' o zadanym promieniu. Domyślnie center_pnt jest wektorem (0,0,0), axis_dir jest wektorem (0,0,1), V_startAngle jest równe 0, V_endAngle jest równe 90, a U_angle jest równe 360.|the created shape}}
{{APIFunction|makeTorus|radius1,radius2,[pnt,dir,angle1,angle2,angle]|Makes a torus with a given radii and angles. By default pnt is Vector(0,0,0),dir is Vector(0,0,1),angle1 is 0,angle2 is 360 and angle is 360|the created shape}}
{{APIFunction|makeTorus|radius1,radius2,[pnt,dir,angle1,angle2,angle]|Tworzy torus o zadanych promieniach i kątach. Domyślnie pnt jest wektorem (0,0,0),dir jest wektorem (0,0,1),angle1 jest 0,angle2 jest 360 i angle jest 360.|the created shape}}
{{APIFunction|makeTube|edge,float|Creates a tube.|the created shape}}
{{APIFunction|makeTube|edge,float|Tworzy rurę.|the created shape}}
{{APIFunction|open|string|Creates a new document and load the file into the document.| }}
{{APIFunction|open|string|Tworzy nowy dokument i wczytuje plik do dokumentu.| }}
{{APIFunction|read|string|Loads the file and return the shape.|a shape}}
{{APIFunction|read|string|Wczytuje plik i zwraca kształt.|a shape}}
{{APIFunction|show|shape|Adds the shape to the active document or create one if no document exists.| }}
{{APIFunction|show|shape|Dodaje kształt do aktywnego dokumentu lub tworzy go, jeśli dokument nie istnieje.| }}





Revision as of 18:00, 19 April 2021

Template:VeryImportantMessage/pl

Moduł Część jest bezpośrednim połączeniem pomiędzy programem FreeCAD a jądrem OpenCasCade. Dostarcza on głównie kształty topologiczne, który jest głównym typem obiektu używanym przez OpenCascade. Moduł Część zawiera również wiele funkcji ułatwiających tworzenie i manipulowanie kształtami topologicznymi. Przykład:

import Part
mycube = Part.makeBox(2,2,2)
Part.show(mycube)
__fromPythonOCC__(OCC.Object)

Description: Metoda pomocnicza konwersji kształtu pythonocc do kształtu wewnętrznego

Returns: A Part.Shape

__sortEdges__(list of edges)

Description: Metoda pomocnicza sortująca nieposortowaną listę krawędzi w taki sposób, aby po jej zakończeniu wierzchołki początkowy i końcowy dwóch kolejnych krawędzi były geometrycznie zbieżne. Zwraca ona pojedynczą listę krawędzi, a algorytm zatrzymuje się po pierwszym zestawie połączonych krawędzi, co oznacza, że lista wyjściowa może być mniejsza od wejściowej. Posortowana lista może być użyta do stworzenia linii łamanej.

Returns: a list of edges

__toPythonOCC__(Part.Shape)

Description: Metoda pomocnicza konwersji wewnętrznego kształtu do kształtu pythonocc

Returns: an OCC.Shape

cast_to_shape(Part.Shape)

Description: rzutowanie na rzeczywisty typ kształtu

Returns:

export(list,string)

Description: Eksportuj listę obiektów do jednego pliku.

Returns:

getSortedClusters(list of edges)

Description: Metoda pomocnicza do sortowania i grupowania różnych krawędzi

Returns:

insert(string,string)

Description: Wstaw plik (ścieżka podana jako pierwszy argument) do podanego dokumentu (drugi argument).

Returns:

makeBox(length,width,height,[pnt,dir])

Description: Tworzy pudełko znajdujące się w pnt o wymiarach (długość,szerokość,wysokość). Domyślnie pnt jest wektorem (0,0,0), a dir wektorem (0,0,1).

Returns: the created shape

makeCircle(radius,[pnt,dir,angle1,angle2])

Description: Tworzy okrąg o zadanym promieniu. Domyślnie pnt jest wektorem (0,0,0), dir jest wektorem (0,0,1), angle1 jest równy 0, a angle2 jest równy 360.

Returns: the created shape

makeCompound(list)

Description: Tworzy obiekt złożony z listy kształtów.

Returns: the created shape

makeCone(radius1,radius2,height,[pnt,dir,angle])

Description: Tworzy stożek o zadanych promieniach i wysokościach. Domyślnie pnt jest wektorem (0,0,0), dir jest wektorem (0,0,1), a angle wynosi 360.

Returns: the created shape

makeCylinder(radius,height,[pnt,dir,angle])

Description: Tworzy walec o zadanym promieniu i wysokości. Domyślnie pnt jest wektorem (0,0,0), dir jest wektorem (0,0,1), a angle wynosi 360.

Returns: the created shape

makeHelix(pitch,height,radius,[angle,lefthand,heightstyle])

Description: Tworzy kształt spirali o zadanym skoku, wysokości i promieniu. Domyślnie jest to spirala cylindryczna prawoskrętna. Niezerowy parametr angle tworzy spiralę stożkową. Lefthand True tworzy spiralę lewoskrętną. Heightstyle ma zastosowanie tylko do helis stożkowych. Heightstyle false (domyślnie) spowoduje, że parametr height będzie interpretowany jako długość boku bazowego frustum. Heightstyle true spowoduje, że parametr height będzie interpretowany jako pionowa wysokość helisy. Pitch jest "metrycznym skokiem" (wyprzedzenie/obrót). Dla helisy stożkowej, radius jest promieniem mniejszym.

Returns: the created shape

makeLine((x1,y1,z1),(x2,y2,z2))

Description: Makes a line of two points

Returns: the created shape

makeLoft(shapelist<profiles>,[boolean<solid>,boolean<ruled>])

Description: Tworzy wyciągnięty kształt używając listy profili. Opcjonalnie uczyń wynik bryłą (vs powierzchnia/powłoka) lub uczyń wynik powierzchnią obrobioną.

Returns: the created shape

makePlane(length,width,[pnt,dir])

Description: Tworzy płaszczyznę. Domyślnie pnt jest wektorem (0,0,0) a dir jest wektorem (0,0,1).

Returns: the created shape

makePolygon(list)

Description: Tworzy wielokąt z listy wektorów

Returns: the created shape

makeRevolution(Curve,[vmin,vmax,angle,pnt,dir])

Description: Tworzy obrócony kształt przez obrót krzywej lub jej części wokół osi określonej przez (pnt,dir). Domyślnie vmin/vmax są ustawione na granice krzywej, kąt wynosi 360, pnt jest wektorem (0,0,0), a dir jest wektorem (0,0,1).

Returns: the created shape

makeRuledSurface(Edge or Wire,Edge or Wire)

Description: Tworzy powierzchnię obrysowaną z dwóch krawędzi lub linii łamanych. Jeśli używane są linie łamane, to muszą one mieć taką samą liczbę krawędzi.

Returns: the created shape

makeShell(list)

Description: Tworzy powłokę z listy ścian. Uwaga: Wynikowa powłoka powinna być foremna. Powłoki inne niż foremne nie są dobrze obsługiwane.

Returns: the created shape

makeSolid(Part.Shape)

Description: Tworzy bryłę z powłok wewnątrz kształtu.

Returns: the created shape

makeSphere(radius,[center_pnt, axis_dir, V_startAngle, V_endAngle, U_angle])

Description: Tworzy sferę (lub częściową sferę) o zadanym promieniu. Domyślnie center_pnt jest wektorem (0,0,0), axis_dir jest wektorem (0,0,1), V_startAngle jest równe 0, V_endAngle jest równe 90, a U_angle jest równe 360.

Returns: the created shape

makeTorus(radius1,radius2,[pnt,dir,angle1,angle2,angle])

Description: Tworzy torus o zadanych promieniach i kątach. Domyślnie pnt jest wektorem (0,0,0),dir jest wektorem (0,0,1),angle1 jest 0,angle2 jest 360 i angle jest 360.

Returns: the created shape

makeTube(edge,float)

Description: Tworzy rurę.

Returns: the created shape

open(string)

Description: Tworzy nowy dokument i wczytuje plik do dokumentu.

Returns:

read(string)

Description: Wczytuje plik i zwraca kształt.

Returns: a shape

show(shape)

Description: Dodaje kształt do aktywnego dokumentu lub tworzy go, jeśli dokument nie istnieje.

Returns: