Arch Space/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "==Tworzenie skryptów==")
(Created page with "{{Emphasis|Zobacz również:}} API: Architektura i Podstawy tworzenia skryptów FreeCAD.")
Line 81: Line 81:
==Tworzenie skryptów==
==Tworzenie skryptów==


{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
{{Emphasis|Zobacz również:}} [[Arch_API/pl|API: Architektura]] i [[FreeCAD_Scripting_Basics/pl|Podstawy tworzenia skryptów FreeCAD]].


The Space tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:
The Space tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:

Revision as of 18:43, 3 May 2024

Architektura:

Lokalizacja w menu
Architektura → Przestrzeń
Środowisko pracy
Architektura
Domyślny skrót
S P
Wprowadzono w wersji
0.14
Zobacz także
Ściana, Konstrukcja

Opis

Narzędzie Przestrzeń pozwala zdefiniować pustą objętość, opierając ją na bryle, definiując jej granice lub łącząc oba te sposoby. Jeśli jest on oparty wyłącznie na granicach, objętość jest obliczana poprzez rozpoczęcie od obwiedni wszystkich podanych granic i odjęcie przestrzeni za każdą z nich. Obiekt Przestrzeń zawsze definiuje objętość bryły. Można również wyświetlić powierzchnię podłogi obiektu przestrzeni, obliczoną przez przecięcie płaszczyzny poziomej w środku masy objętości przestrzeni.

Obiekt przestrzenny utworzony z istniejącego obiektu bryłowego, a następnie dodane dwie ściany jako granice.

Użycie

  1. Select an existing solid object, or faces on boundary objects.
  2. Invoke the Arch Space command using several methods:
    • Pressing the Arch Space button in the toolbar.
    • Using the S then P keyboard keys
    • Using the Arch → Space entry from the top menu

Limitations

Properties

  • DANEBase: The base object, if any (must be a solid)
  • DANEBoundaries: A list of optional boundary elements
  • DANEArea: The computed floor area of this space
  • DANEFinishFloor: The finishing of the floor of this space
  • DANEFinishWalls: The finishing of the walls of this space
  • DANEFinishCeiling: The finishing of the ceiling of this space
  • DANEGroup: Objects that are included inside this space, such as furniture
  • DANESpaceType: The type of this space
  • DANEFloorThickness: The thickness of the floor finish
  • DANENumberOfPeople: The number of people who typically occupy this space
  • DANELightingPower: The electric power needed to light this space in Watts
  • DANEEquipmentPower: The electric power needed by the equipment of this space in Watts
  • DANEAutoPower: If True, Equipment Power will be automatically filled by the equipment included in this space
  • DANEConditioning: The type of air conditioning of this space
  • DANEInternal: Specifies if this space is internal or external
  • WIDOKText: The text to show. Use $area, $label, $tag, $floor, $walls, $ceiling to insert the respective data
  • WIDOKFontName: The name of the font
  • WIDOKTextColor: The color of the text
  • WIDOKFontSize: The size of the text
  • WIDOKFirstLine: The size of the first line of text (multiplies the font size. 1 = same size, 2 = double size, etc..)
  • WIDOKLineSpacing: The space between the lines of text
  • WIDOKTextPosition: The position of the text. Leave (0,0,0) for automatic position
  • WIDOKTextAlign: The justification of the text
  • WIDOKDecimals: The number of decimals to use for calculated texts
  • WIDOKShowUnit: Show the unit suffix or not

Options

  • To create zones that group several spaces, use an Arch BuildingPart and set its IFC type to "Spatial Zone".
  • The Space object has the same display modes as other Arch and Part objects, with one more, called Footprint, that displays only the bottom face of the space.

Tworzenie skryptów

Zobacz również: API: Architektura i Podstawy tworzenia skryptów FreeCAD.

The Space tool can be used in macros and from the Python console by using the following function:

Space = makeSpace(objects=None, baseobj=None, name="Space")
  • Creates a Space object from the given objects or baseobj, which can be
    • one document object, in which case it becomes the base shape of the Space object, or
    • a list of selection objects as returned by FreeCADGui.Selection.getSelectionEx(), or
    • a list of tuples (object, subobjectname)

Przykład:

import FreeCAD, Arch

Box = FreeCAD.ActiveDocument.addObject("Part::Box", "Box")
Box.Length = 1000
Box.Width = 1000
Box.Height = 1000

Space = Arch.makeSpace(Box)
Space.ViewObject.LineWidth = 2
FreeCAD.ActiveDocument.recompute()

Po utworzeniu obiektu przestrzeni można dodać do niego wybrane powierzchnie za pomocą następującego kodu:

import FreeCAD, FreeCADGui, Draft, Arch

points = [FreeCAD.Vector(-500, 0, 0), FreeCAD.Vector(1000, 1000, 0)]
Line = Draft.makeWire(points)
Wall = Arch.makeWall(Line, width=150, height=2000)
FreeCAD.ActiveDocument.recompute()

# Select a face of the wall
selection = FreeCADGui.Selection.getSelectionEx()
Arch.addSpaceBoundaries(Space, selection)

Granice można również usunąć, ponownie wybierając wskazane ściany:

selection = FreeCADGui.Selection.getSelectionEx()
Arch.removeSpaceBoundaries(Space, selection)