Part Box/pl: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 20: Line 20:
==Opis==
==Opis==


<div class="mw-translate-fuzzy">
Polecenie '''Prostopadłościan''' ze środowiska prazy [[Part_Workbench/pl|Część]] wstawia parametryczny [http://en.wikipedia.org/wiki/Cuboid#Rectangular_cuboid prostokątny prostopadłościan], jako geometryczną bryłę pierwotną do aktywnego dokumentu. Domyślnie, polecenie Prostopadłościan wstawia sześcian o wymiarach 10 x 10 x 10mm, umieszczony w punkcie początkowym, z etykietą "sześcian". Parametry te mogą być modyfikowane po dodaniu obiektu.
Polecenie '''Prostopadłościan''' ze środowiska prazy [[Part_Workbench/pl|Część]] wstawia parametryczny [http://en.wikipedia.org/wiki/Cuboid#Rectangular_cuboid prostokątny prostopadłościan], jako geometryczną bryłę pierwotną do aktywnego dokumentu. Domyślnie, polecenie Prostopadłościan wstawia sześcian o wymiarach 10 x 10 x 10mm, umieszczony w punkcie początkowym, z etykietą "sześcian". Parametry te mogą być modyfikowane po dodaniu obiektu.
</div>


[[Image:Part_Box.jpg|400px|Part_Box]]
[[Image:Part_Box_Example.png|400px]]


==Użycie==
==Użycie==


# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Part_Box.svg|16px]] [[Part_Box|Part Box]]}} button.
#* Select the {{MenuCommand|PartPrimitives → [[Image:Part_Box.svg|16px]] Cube}} option from the menu.
# The box is created.
# Optionally change the dimensions and {{PropertyData|Placement}} of the box by doing one of the following:
#* Double-click the object in the [[Tree_view|Tree view]]:
#*# The {{MenuCommand|Geometic Primitives}} task panel opens.
#*# Change one or more properties.
#*# The object is dynamically updated in the [[3D_view|3D view]].
#*# Press the {{Button|OK}} button.
#* Change the properties in the [[Property_editor|Property editor]].
#* Change the {{PropertyData|Placement}} with the [[Image:Std_TransformManip.svg|16px]] [[Std_TransformManip|Std TransformManip]] command.


== Example ==
# Przełącz się na środowisko pracy [[Image:Workbench_Part.svg|16px]] [[Part_Workbench/pl|Część]]
# Istnieje kilka sposobów na wywołanie polecenia:
#* Naciśnij przycisk {{Button|[[Image:Part_Box.svg|16px]] Utwórz prostopadłościan}} na pasku narzędzi.
#* Wybierz polecenie {{MenuCommand|CzęśćBryła pierwotna → [[Image:Part_Box.svg|16px]] Prostopadłościan}} z paska menu.


[[Image:Part_Box_Scripting_Example.png|thumb|Part Box from the scripting example]]
'''Wynik:''' Domyślnym wynikiem jest sześcian o długości, szerokości i wysokości, wynoszącej 10mm. Jest on dołączony do globalnej płaszczyzny XY, a jedna jego krawędź pokrywa się z globalną osią Z.


A Part Box object created with the [[#Scripting|scripting example]] below is shown here.
Właściwości sześcianu mogą być później korygowane w edytorze właściwości lub przez podwójne kliknięcie na sześcian w drzewie modelu.

== Notes ==

* A Part Box can also be created with the [[Image:Part_Primitives.svg|16px]] [[Part_Primitives|Part Primitives]] command. With that command you can specify the dimensions and placement at creation time.


==Właściwości==
==Właściwości==


See also: [[Property_editor|Property editor]].

A Part Box object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:

=== Data ===

{{TitleProperty|Attachment}}

The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].

<div class="mw-translate-fuzzy">
{{Properties_Title|Prostopadłościan}}
{{Properties_Title|Prostopadłościan}}
</div>


<div class="mw-translate-fuzzy">
*{{PropertyData/pl|Długość}}: Parametr ''długość'' jest wymiarem bryły w kierunku X.
*{{PropertyData/pl|Długość}}: Parametr ''długość'' jest wymiarem bryły w kierunku X.
*{{PropertyData/pl|Szerokość}}: Parametr ''szerokość'' jest wymiarem bryły w kierunku Y.
*{{PropertyData/pl|Szerokość}}: Parametr ''szerokość'' jest wymiarem bryły w kierunku Y.
*{{PropertyData/pl|Wysokość}}: Parametr ''wysokość'' jest wymiarem bryły w kierunku Z.
*{{PropertyData/pl|Wysokość}}: Parametr ''wysokość'' jest wymiarem bryły w kierunku Z.
</div>


==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]].

<div class="mw-translate-fuzzy">
Prostopadłościan można utworzyć przy pomocy następującej funkcji:
Prostopadłościan można utworzyć przy pomocy następującej funkcji:
</div>


{{Code|code=
{{Code|code=
Line 55: Line 88:
* Zwraca nowo utworzony obiekt typu prostopadłościan.
* Zwraca nowo utworzony obiekt typu prostopadłościan.


Example:
Możesz uzyskać dostęp i modyfikować atrybuty obiektu {{Incode|Prostopadłościanu}}. Na przykład, można zmienić parametry długości, szerokości i wysokości.


{{Code|code=
{{Code|code=
import FreeCAD as App
box.Length = 25
box.Width = 15
box.Height = 30
}}


doc = App.activeDocument()
Możesz zmienić jego umiejscowienie za pomocą:


box = doc.addObject("Part::Box", "myBox")
{{Code|code=
box.Length = 4
box.Placement = FreeCAD.Placement(FreeCAD.Vector(4, 6, 3), FreeCAD.Rotation(30, 45, 10))
box.Width = 8
box.Height = 12
box.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(75, 60, 30))

doc.recompute()
}}
}}


Line 79: Line 114:
}}
}}


{{Part Tools navi{{#translation:}}}}
{{Part_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Revision as of 09:47, 3 March 2022

Część: Prostopadłościan

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

Opis

Polecenie Prostopadłościan ze środowiska prazy Część wstawia parametryczny prostokątny prostopadłościan, jako geometryczną bryłę pierwotną do aktywnego dokumentu. Domyślnie, polecenie Prostopadłościan wstawia sześcian o wymiarach 10 x 10 x 10mm, umieszczony w punkcie początkowym, z etykietą "sześcian". Parametry te mogą być modyfikowane po dodaniu obiektu.

Użycie

  1. There are several ways to invoke the command:
    • Press the Part Box button.
    • Select the Part → Primitives → Cube option from the menu.
  2. The box is created.
  3. Optionally change the dimensions and DANEPlacement of the box by doing one of the following:
    • Double-click the object in the Tree view:
      1. The Geometic Primitives task panel opens.
      2. Change one or more properties.
      3. The object is dynamically updated in the 3D view.
      4. Press the OK button.
    • Change the properties in the Property editor.
    • Change the DANEPlacement with the Std TransformManip command.

Example

Part Box from the scripting example

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

Notes

  • A Part Box 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 Box object is derived from a Part Feature object and inherits all its properties. It also has the following additional properties:

Data

Attachment

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

Prostopadłościan

  • DANEDługość: Parametr długość jest wymiarem bryły w kierunku X.
  • DANESzerokość: Parametr szerokość jest wymiarem bryły w kierunku Y.
  • DANEWysokość: Parametr wysokość jest wymiarem bryły w kierunku Z.

Tworzenie skryptów

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

Prostopadłościan można utworzyć przy pomocy następującej funkcji:

box = FreeCAD.ActiveDocument.addObject("Part::Box", "myBox")
  • Gdzie parametr myBox jest etykietą dla obiektu prostopadłościanu.
  • Zwraca nowo utworzony obiekt typu prostopadłościan.

Example:

import FreeCAD as App

doc = App.activeDocument()

box = doc.addObject("Part::Box", "myBox")
box.Length = 4
box.Width = 8
box.Height = 12
box.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(75, 60, 30))

doc.recompute()