Arch Space: Difference between revisions
(Marked this version for translation) |
No edit summary |
||
Line 4: | Line 4: | ||
==Description== <!--T:2--> |
==Description== <!--T:2--> |
||
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". |
|||
Basically it is a solid shape (but represented as "empty") that can be defined either |
|||
# by an underlying solid shape object or |
|||
# by a set of boundary faces from other objects. In that case, the space volume is defined by taking the bounding box of all the faces, then removing exterior parts behind the boundary faces. |
|||
⚫ | |||
New boundary faces can be added later with the Arch Add button, even to spaces created from a solid. Existing boundaries can be removed with the Arch Remove button. |
|||
<!--T:4--> |
|||
Finally, the space uses the new "detailed" display mode (that will in the future be used by all Arch objects) to show the area, taken from a horizontal section plane that cuts the space at its center. |
|||
</translate> |
</translate> |
||
[[Image:Arch Space example.jpg|640px]] |
|||
[[File:Space_it.png|left]] |
|||
⚫ | |||
<translate> |
<translate> |
||
⚫ | |||
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== <!--T:5--> |
==How to use== <!--T:5--> |
||
<!--T:6--> |
<!--T:6--> |
||
# 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 |
|||
==Properties== <!--T:7--> |
==Properties== <!--T:7--> |
||
<!--T:8--> |
<!--T:8--> |
||
* {{PropertyData|Base}}: The base object, if any (must be a solid) |
|||
[[File:SpaceProperties_it.png|left]] |
|||
* {{PropertyData|Boundaries}}: A list of optional boundary elements |
|||
==Scripting== |
|||
⚫ | |||
The space tool can be used in python scripts and [[macros]] by using the following function: |
|||
====Arch==== <!--T:10--> |
|||
</translate> |
|||
<!--T:11--> |
|||
<syntaxhighlight> |
|||
* {{PropertyData|Base}} |
|||
makeSpace(objects) |
|||
</syntaxhighlight> |
|||
<translate> |
|||
* Creates a space object from the given objects. |
|||
====Base==== <!--T:12--> |
|||
* 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). |
|||
* {{PropertyData|Label}} |
|||
* Returns the newly created space object. |
|||
* {{PropertyData|Placement}} |
|||
** {{PropertyData|Angle}} |
|||
Example: |
|||
** {{PropertyData|Axis}} |
|||
** {{PropertyData|Position}} |
|||
{{clear}} |
|||
==Limitation== <!--T:13--> |
|||
⚫ | |||
</translate> |
</translate> |
||
<syntaxhighlight> |
|||
import FreeCAD, Arch, Part |
|||
b = Part.makeBox(2,2,2) |
|||
FreeCAD.ActiveDocument.addObject("Part::Feature","Box").Shape=b |
|||
sp = makeSpace([FreeCAD.ActiveDocument.Box]) |
|||
</syntaxhighlight> |
|||
<translate> |
|||
After a space object is created, selected faces can be added to it with the following function: |
|||
</translate> |
|||
<syntaxhighlight> |
|||
import FreeCADGui |
|||
Arch.addSpaceBoundaries(sp, FreeCADGui.Selection.getSelectionEx()) |
|||
</syntaxhighlight> |
|||
<translate> |
|||
Boundaries can also be removed with: |
|||
</translate> |
|||
<syntaxhighlight> |
|||
Arch.removeSpaceBoundaries(sp, FreeCADGui.Selection.getSelectionEx()) |
|||
</syntaxhighlight> |
|||
<translate> |
|||
⚫ | |||
* Not available below FreeCAD version 0.14 |
|||
* The boundaries properties is currently not editable via GUI |
|||
⚫ | |||
</translate> |
|||
⚫ | |||
<languages/> |
<languages/> |
Revision as of 16:05, 22 February 2014
Arch_Space |
Menu location |
---|
Arch → Space |
Workbenches |
Arch |
Default shortcut |
S P |
Introduced in version |
- |
See also |
None |
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".
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
- Select an existing solid object, or faces on boundary objects
- Press the Arch Space button, or press S, P keys
Properties
- DataBase: The base object, if any (must be a solid)
- DataBoundaries: A list of optional boundary elements
Scripting
The space tool can be used in python scripts and macros by using the following function:
makeSpace(objects)
- Creates a space object from the given objects.
- 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).
- Returns the newly created space object.
Example:
import FreeCAD, Arch, Part
b = Part.makeBox(2,2,2)
FreeCAD.ActiveDocument.addObject("Part::Feature","Box").Shape=b
sp = makeSpace([FreeCAD.ActiveDocument.Box])
After a space object is created, selected faces can be added to it with the following function:
import FreeCADGui
Arch.addSpaceBoundaries(sp, FreeCADGui.Selection.getSelectionEx())
Boundaries can also be removed with:
Arch.removeSpaceBoundaries(sp, FreeCADGui.Selection.getSelectionEx())
Limitations
- Not available below FreeCAD version 0.14
- The boundaries properties is currently not editable via GUI
- See the forum announcement