Arch Space/uk: Difference between revisions

From FreeCAD Documentation
(Created page with "Category:Arch/uk")
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
{{docnav|[[Arch_Roof|Roof]]|[[Arch_Stairs|Stairs]]|[[Arch_Module|Arch]]}}
<div class="mw-translate-fuzzy">
{{GuiCommand/uk|Name=Arch Space|Name/uk=Arch Space|Workbenches=[[Arch Module/uk|Arch]]|MenuLocation=Arch → Space|Shortcut=S P}}
{{GuiCommand/uk|Name=Arch Space|Name/uk=Arch Space|Workbenches=[[Arch Module/uk|Arch]]|MenuLocation=Arch → Space|Shortcut=S P}}
</div>


==Description==
==Description==
Line 6: Line 9:


[[Image:Arch Space example.jpg|640px]]
[[Image:Arch Space example.jpg|640px]]
{{Caption|Space object created from an existing solid object, then two wall faces are added as boundaries, and the display mode is set to "detailed" to show the floor area.}}

''In the above image, a space object is created from an existing solid object, then two wall faces are added as boundaries, and the display mode is set to "detailed" to show the floor area.''


==How to use==
==How to use==


# Select an existing solid object, or faces on boundary objects
# Select an existing solid object, or faces on boundary objects.
# Press the {{KEY|[[Image:Arch_Space.png|16px]] [[Arch Space]]}} button, or press {{KEY|S}}, {{KEY|P}} keys
# Press the {{Button|[[Image:Arch_Space.svg|16px]] [[Arch Space]]}} button, or press {{KEY|S}}, {{KEY|P}} keys.

=== Limitations ===

* The boundaries properties is currently not editable via GUI.
* See the [http://forum.freecadweb.org/viewtopic.php?f=9&t=4275 forum announcement].


==Properties==
==Properties==
Line 20: Line 27:


==Scripting==
==Scripting==
{{Emphasis|See also:}} [[Arch API]] and [[FreeCAD Scripting Basics]].


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

{{Code|code=
{{Code|code=
makeSpace(objects)
Space = makeSpace(objects=None, baseobj=None, name="Space")
}}
}}


* Creates a space object from the given objects.
* Creates a {{incode|Space}} object from the given {{incode|objects}} or {{incode|baseobj}}, which can be
* Objects 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).
** one document object, in which case it becomes the base shape of the space object, or
** a list of selection objects as returned by {{incode|FreeCADGui.Selection.getSelectionEx()}}, or
* Returns the newly created space object.
** a list of tuples {{incode|(object, subobjectname)}}


Example:
Example:
{{Code|code=
import FreeCAD, Arch


Box = FreeCAD.ActiveDocument.addObject("Part::Box", "Box")
{{Code|code=
Box.Length = 1000
import FreeCAD, Arch, Part
Box.Width = 1000
b = Part.makeBox(2,2,2)
Box.Height = 1000
FreeCAD.ActiveDocument.addObject("Part::Feature","Box").Shape=b

sp = makeSpace([FreeCAD.ActiveDocument.Box])
Space = Arch.makeSpace(Box)
Space.ViewObject.LineWidth = 2
FreeCAD.ActiveDocument.recompute()
}}
}}


After a space object is created, selected faces can be added to it with the following function:
After a space object is created, selected faces can be added to it with the following code:

{{Code|code=
{{Code|code=
import FreeCADGui
import FreeCAD, FreeCADGui, Draft, Arch

Arch.addSpaceBoundaries(sp, FreeCADGui.Selection.getSelectionEx())
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)
}}
}}


Boundaries can also be removed with:
Boundaries can also be removed, again by selecting the indicated faces:

{{Code|code=
{{Code|code=
Arch.removeSpaceBoundaries(sp, FreeCADGui.Selection.getSelectionEx())
selection = FreeCADGui.Selection.getSelectionEx()
Arch.removeSpaceBoundaries(Space, selection)
}}
}}


<div class="mw-translate-fuzzy">
==Limitations==

* Not available below FreeCAD version 0.14
* The boundaries properties is currently not editable via GUI
* See the [http://forum.freecadweb.org/viewtopic.php?f=9&t=4275 forum announcement]

[[Category:Arch/uk]]
[[Category:Arch/uk]]
</div>

Revision as of 19:43, 30 January 2019

Arch Space

Меню прокату
Arch → Space
Верстаки
Arch
Ярлик за умовчанням
S P
Введено у версії
-
Дивись також
Жоден

Description

The Space tool allows you to define an empty volume, either by basing it on a solid shape, or by defining its boundaries, or a mix of both. If it is based solely on boundaries, the volume is calculated by starting from the bounding box of all the given boundaries, and subtracting the spaces behind each boundary. The space object always defines a solid volume. The floor area of a space object, calculated by intersecting a horizontal plane at the center of mass of the space volume, can also be displayed, by setting the display mode of the space object to "detailed".

Space object created from an existing solid object, then two wall faces are added as boundaries, and the display mode is set to "detailed" to show the floor area.

How to use

  1. Select an existing solid object, or faces on boundary objects.
  2. Press the Arch Space button, or press S, P keys.

Limitations

Properties

  • ДаніBase: The base object, if any (must be a solid)
  • ДаніBoundaries: A list of optional boundary elements

Scripting

See also: Arch API and FreeCAD Scripting Basics.

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)

Example:

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()

After a space object is created, selected faces can be added to it with the following code:

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)

Boundaries can also be removed, again by selecting the indicated faces:

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