Arch Site: Difference between revisions

From FreeCAD Documentation
(Declination: The angle between the true North and the North direction in this document, that is, the Y axis.)
No edit summary
(21 intermediate revisions by 7 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:30-->
<!--T:30-->
{{Docnav
{{docnav|[[Arch_Building|Building]]|[[Arch_Reference|Reference]]|[[Arch_Module|Arch]]|IconL=Arch_Building.svg |IconC=Workbench_Arch.svg |IconR=Arch_Reference.svg}}
|[[Arch_Building|Building]]
|[[Arch_Reference|Reference]]
|[[Arch_Module|Arch]]
|IconL=Arch_Building.svg
|IconR=Arch_Reference.svg
|IconC=Workbench_Arch.svg
}}


<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand|Name=Arch Site|Workbenches=[[Arch Module|Arch]]|MenuLocation=Arch → Site|Shortcut=S I|SeeAlso=[[Arch Floor|Arch Floor]], [[Arch Building|Arch Building]]}}
|Name=Arch Site
|Workbenches=[[Arch_Module|Arch]]
|MenuLocation=Arch → Site
|Shortcut={{KEY|S}} {{KEY|I}}
|SeeAlso=[[Arch_Floor|Arch Floor]], [[Arch_Building|Arch Building]]
}}


==Description== <!--T:2-->
==Description== <!--T:2-->
Line 12: Line 25:
The Arch Site is a special object that combines properties of a standard FreeCAD group object and Arch objects. It is particularly suited for representing a whole project site, or terrain. In IFC-based architectural work, it is mostly used to organize your model, by containing [[Arch Building|building]] objects. The site is also used to manage and display a physical terrain, and can computes volumes of earth to be added or removed.
The Arch Site is a special object that combines properties of a standard FreeCAD group object and Arch objects. It is particularly suited for representing a whole project site, or terrain. In IFC-based architectural work, it is mostly used to organize your model, by containing [[Arch Building|building]] objects. The site is also used to manage and display a physical terrain, and can computes volumes of earth to be added or removed.


==How to use== <!--T:4-->
==Usage== <!--T:4-->


<!--T:5-->
<!--T:5-->
# Optionally, select one or more objects to be included in your new site.
# Optionally, select one or more objects to be included in your new site.
# Press the {{Button|[[Image:Arch Site.svg|16px]] [[Arch Site]]}} button, or press the {{KEY|S}} then {{KEY|I}} keys.
# Press the {{Button|[[Image:Arch Site.svg|16px]] [[Arch Site|Arch Site]]}} button, or press the {{KEY|S}} then {{KEY|I}} keys.


==Options== <!--T:6-->
==Options== <!--T:6-->
Line 44: Line 57:
* {{PropertyData|Extrusion Vector}}: An extrusion vector to use when performing boolean operations
* {{PropertyData|Extrusion Vector}}: An extrusion vector to use when performing boolean operations
* {{PropertyData|Remove Splitter}}: Remove splitters from the resulting shape
* {{PropertyData|Remove Splitter}}: Remove splitters from the resulting shape
* {{PropertyData|Declination}}: The angle between the true North and the North direction in this document, that is, the Y axis.{{version|0.18}} This means that by default (declination of 0 degrees) North points to the Y axis, and East to the X axis. This property was previously known as {{PropertyData|North Deviation}}.
* {{PropertyData|Declination}}: The angle between the true North and the North direction in this document, that is, the Y axis. {{version|0.18}} This means that by default North points to the Y axis, and East to the X axis; the angle increments counterclockwise. This property was previously known as {{PropertyData|North Deviation}}.
* {{PropertyData|EPW File}}: Allow to attach an EPW file from the [https://www.ladybug.tools/epwmap/ Ladybug EPW data website] to this site. This is needed to display wind rose diagrams {{version|0.19}}


=== View === <!--T:26-->
=== View === <!--T:26-->
Line 51: Line 65:
* {{PropertyView|Solar Diagram Position}}: The position of the solar diagram
* {{PropertyView|Solar Diagram Position}}: The position of the solar diagram
* {{PropertyView|Solar Diagram Scale}}: The scale of the solar diagram
* {{PropertyView|Solar Diagram Scale}}: The scale of the solar diagram
* {{PropertyView|Wind Rose}}: Shows or hides the wind rose diagram (requires the '''EPW File''' data property filled, and the Ladybug Python module installed (see below)


== Typical workflow == <!--T:14-->
== Typical workflow == <!--T:14-->
Line 72: Line 87:
[[Image:Arch site example 03.jpg]]
[[Image:Arch site example 03.jpg]]


== Solar diagram == <!--T:21-->
== Solar and wind diagrams == <!--T:21-->


<!--T:22-->
<!--T:22-->
If [http://pysolar.org/ pysolar] is installed on your system, [[Arch Site|Arch Sites]] can display a solar diagram. For this, {{PropertyData|Longitude}}, {{PropertyData|Latitude}} and {{PropertyData|Declination}} (previously {{PropertyData|North Deviation}}) must be correctly set, and {{PropertyView|Solar Diagram}} set to {{TRUE}}. {{Version|0.17}}
If [https://www.ladybug.tools/ladybug.html Ladybug] is installed on your system, [[Arch Site|Arch Sites]] can display a solar diagram and/or a wind rose. For this, {{PropertyData|Longitude}}, {{PropertyData|Latitude}} and {{PropertyData|Declination}} (previously {{PropertyData|North Deviation}}) must be correctly set, and {{PropertyView|Solar Diagram}} or {{PropertyView|Wind Rose}} set to {{TRUE}}. Respectively {{Version|0.17}} and {{Version|0.19}}


<!--T:36-->
'''Note''': If you don't have Ladybug, [http://pysolar.org/ pysolar] is still supported to generate solar diagrams, but not wind roses. Pysolar 0.7 or above is required; this version only works with Python 3. If you require this feature with Python 2, you should have Pysolar 0.6 as this is the last version that works with Python 2. However, Ladybug is a much more powerful tool that will probably be used more in the future, so we recommend using it instead of pysolar. Ladybug can be installed simply via [https://github.com/ladybug-tools/ladybug pip].


<!--T:23-->
<!--T:23-->
Line 81: Line 100:


==Scripting== <!--T:8-->
==Scripting== <!--T:8-->
{{Emphasis|See also:}} [[Arch API]] and [[FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[Arch API|Arch API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].


<!--T:9-->
<!--T:9-->
The Site tool can be used in [[macros]] and from the [[Python]] console by using the following function:
The Site tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:

</translate>
</translate>
{{Code|code=
{{Code|code=
Line 114: Line 134:
<translate>
<translate>


=== Solar diagram ===
=== Solar diagram === <!--T:33-->


<!--T:34-->
As long as the {{incode|pysolar}} module is present, a solar diagram can be added to the site. Set the longitude, latitude and declination angles as appropriate, as well as an adequate scale for the size of your model.
As long as the {{incode|pysolar}} module is present, a solar diagram can be added to the site. Set the longitude, latitude and declination angles as appropriate, as well as an adequate scale for the size of your model.


<!--T:35-->
Please note that modern versions of {{incode|pysolar}} only work with Python 3.
Please note that Pysolar 0.7 or above is required, and this version only works with Python 3.

</translate>
</translate>
{{Code|code=
{{Code|code=
Line 154: Line 177:
}}
}}
<translate>
<translate>

<!--T:25-->
<!--T:25-->
{{Docnav
{{docnav|[[Arch_Building|Building]]|[[Arch_Reference|Reference]]|[[Arch_Module|Arch]]|IconL=Arch_Building.svg |IconC=Workbench_Arch.svg |IconR=Arch_Reference.svg}}
|[[Arch_Building|Building]]
|[[Arch_Reference|Reference]]
|[[Arch_Module|Arch]]
|IconL=Arch_Building.svg
|IconR=Arch_Reference.svg
|IconC=Workbench_Arch.svg
}}


<!--T:31-->
{{Arch Tools navi}}

<!--T:32-->
{{Userdocnavi}}
</translate>
</translate>
{{Arch Tools navi{{#translation:}}}}

{{Userdocnavi{{#translation:}}}}

Revision as of 14:15, 29 November 2020

Arch Site

Menu location
Arch → Site
Workbenches
Arch
Default shortcut
S I
Introduced in version
-
See also
Arch Floor, Arch Building

Description

The Arch Site is a special object that combines properties of a standard FreeCAD group object and Arch objects. It is particularly suited for representing a whole project site, or terrain. In IFC-based architectural work, it is mostly used to organize your model, by containing building objects. The site is also used to manage and display a physical terrain, and can computes volumes of earth to be added or removed.

Usage

  1. Optionally, select one or more objects to be included in your new site.
  2. Press the Arch Site button, or press the S then I keys.

Options

  • After creating a site, you can add more objects to it by drag and dropping them in the Tree View or by using the Arch Add tool. This only determines which object is part of the given site, and has no effect on the terrain itself.
  • You can remove objects from a site by drag and dropping them out of it the Tree View or by using the Arch Remove tool
  • You can add a terrain object by editing the Site's DataTerrain property. The terrain must be an open shell or surface.
  • You can add volumes to be added or subtracted from the base terrain, by double-clicking the Site, and adding objects to its Subtractions or Additions groups. The objects must be solids.
  • The DataExtrusion Vector property can be used to solve some problems that can appear when working with subtractions and additions. In order to perform those additions/subtractions, the terrain surface is extruded into a solid, which is then appropriately unioned/subtracted. Depending on the terrain topology, this extrusion might fail with the default extrusion vector. You might therefore be able to remedy the problem by changing this to a different value.

Properties

Data

  • DataTerrain: The base terrain of this site
  • DataAddress: The street and housenumber of this site
  • DataPostal Code: The postal or zip code of this site
  • DataCity: The city of this site
  • DataCountry: The country of this site
  • DataLatitude: The latitude of this site
  • DataLongitude: The longitude of this site
  • DataUrl: An url that shows this site in a mapping website
  • DataProjected Area: The area of the projection of this object onto the XY plane
  • DataPerimeter: The perimeter length of this terrain
  • DataAddition Volume: The volume of earth to be added to this terrain
  • DataSubtraction Volume: The volume of earth to be removed from this terrain
  • DataExtrusion Vector: An extrusion vector to use when performing boolean operations
  • DataRemove Splitter: Remove splitters from the resulting shape
  • DataDeclination: The angle between the true North and the North direction in this document, that is, the Y axis. introduced in version 0.18 This means that by default North points to the Y axis, and East to the X axis; the angle increments counterclockwise. This property was previously known as DataNorth Deviation.
  • DataEPW File: Allow to attach an EPW file from the Ladybug EPW data website to this site. This is needed to display wind rose diagrams introduced in version 0.19

View

  • ViewSolar Diagram: Shows or hides the solar diagram
  • ViewSolar Diagram Color: The color of the solar diagram
  • ViewSolar Diagram Position: The position of the solar diagram
  • ViewSolar Diagram Scale: The scale of the solar diagram
  • ViewWind Rose: Shows or hides the wind rose diagram (requires the EPW File data property filled, and the Ladybug Python module installed (see below)

Typical workflow

Start by creating an object that represents your terrain. It must be an open surface, not a solid. For example, it is easy to import mesh data, that can be turned into a Part Shape from menu Part → Create Shape from Mesh. Then, create a Site object, and set its DataTerrain property to the Part we just created:

Create some volumes (they must be solids) that represent the areas that you wish to be excavated or filled. Double-click the Site object in the Tree View, and add these volumes to the Additions or Subtractions groups. Click OK.

The site geometry will be recomputed and the areas, perimeter, and volumes properties recalculated.

Solar and wind diagrams

If Ladybug is installed on your system, Arch Sites can display a solar diagram and/or a wind rose. For this, DataLongitude, DataLatitude and DataDeclination (previously DataNorth Deviation) must be correctly set, and ViewSolar Diagram or ViewWind Rose set to true. Respectively introduced in version 0.17 and introduced in version 0.19


Note: If you don't have Ladybug, pysolar is still supported to generate solar diagrams, but not wind roses. Pysolar 0.7 or above is required; this version only works with Python 3. If you require this feature with Python 2, you should have Pysolar 0.6 as this is the last version that works with Python 2. However, Ladybug is a much more powerful tool that will probably be used more in the future, so we recommend using it instead of pysolar. Ladybug can be installed simply via pip.

Scripting

See also: Arch API and FreeCAD Scripting Basics.

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

Site = makeSite(objectslist=None, baseobj=None, name="Site")
  • Creates a Site object from objectslist, which is a list of objects, or baseobj, which is a Shape or Terrain.

Example:

import FreeCAD, Draft, Arch

p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(2000, 0, 0)
baseline = Draft.makeLine(p1, p2)
Wall = Arch.makeWall(baseline, length=None, width=150, height=2000)
FreeCAD.ActiveDocument.recompute()

Building = Arch.makeBuilding([Wall])
Site = Arch.makeSite([Building])

FreeCAD.ActiveDocument.recompute()
FreeCAD.Gui.ActiveDocument.ActiveView.viewIsometric()

Solar diagram

As long as the pysolar module is present, a solar diagram can be added to the site. Set the longitude, latitude and declination angles as appropriate, as well as an adequate scale for the size of your model.

Please note that Pysolar 0.7 or above is required, and this version only works with Python 3.

Site.Longitude = -46.38
Site.Latitude = -23.33
Site.Declination = 30
#Site.Compass = True

Site.ViewObject.SolarDiagram = True
Site.ViewObject.SolarDiagramScale = 10000
FreeCAD.ActiveDocument.recompute()

Solar diagram independent of Site

A solar diagram can be created with the following function, independently of any site.

Node = makeSolarDiagram(longitude, latitude, scale=1, complete=False)
  • Creates a solar diagram as a Pivy node, using longitude and latitude, with an optional scale.
  • If complete is True, the 12 months are drawn, which shows the full solar analemma.
import FreeCADGui, Arch

Node = Arch.makeSolarDiagram(-46.38, -23.33, scale=10000, complete=True)
FreeCAD.Gui.ActiveDocument.ActiveView.getSceneGraph().addChild(Node)