Arch Space/en: Difference between revisions

From FreeCAD Documentation
(Importing a new version from external source)
 
(Updating to match new version of source page)
Line 6: Line 6:
# 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.
# 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.


[[Image:Arch Space example.jpg|640px]]
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.


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


[[File:Space_it.png|left]]
{{clear}}
==How to use==
==How to use==


Line 21: Line 19:
[[File:SpaceProperties_it.png|left]]
[[File:SpaceProperties_it.png|left]]


===Data===
==Scripting==


The space tool can be used in python scripts and [[macros]] by using the following function:
====Arch====


<syntaxhighlight>
* {{PropertyData|Base}}
makeSpace(objects)
</syntaxhighlight>


* Creates a space object from the given objects.
====Base====
* 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}}
<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>

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

<syntaxhighlight>
import FreeCADGui
Arch.addSpaceBoundaries(sp, FreeCADGui.Selection.getSelectionEx())
</syntaxhighlight>

Boundaries can also be removed with:

<syntaxhighlight>
Arch.removeSpaceBoundaries(sp, FreeCADGui.Selection.getSelectionEx())
</syntaxhighlight>


{{clear}}
{{clear}}
==Limitation==
==Limitation==
* See [http://forum.freecadweb.org/viewtopic.php?f=9&t=4275 Arch Space] .
* See [http://forum.freecadweb.org/viewtopic.php?f=9&t=4275 Arch Space] .

* 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]

{{clear}}

<languages/>
<languages/>

Revision as of 13:19, 23 February 2014

Arch_Space

Menu location
Arch → Space
Workbenches
Arch
Default shortcut
S P
Introduced in version
-
See also
None

Description

Basically it is a solid shape (but represented as "empty") that can be defined either

  1. by an underlying solid shape object or
  2. 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.

How to use

  • Select faces or objects
  • Press the Space button, or press S, P keys

Properties

File:SpaceProperties it.png

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

Limitation

  • Not available below FreeCAD version 0.14
  • The boundaries properties is currently not editable via GUI
  • See the forum announcement